changing the code in the MR-C3024

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
223 postsPage 11 of 151 ... 8, 9, 10, 11, 12, 13, 14, 15
223 postsPage 11 of 151 ... 8, 9, 10, 11, 12, 13, 14, 15

Post by pio » Thu Nov 01, 2007 4:53 pm

Post by pio
Thu Nov 01, 2007 4:53 pm

i-Bot wrote:You can just modify the asm file to skip the test and it will work then OK.


Do modify the scode.asm ? How to do that ?It looks difficulty? :?

i-Bot wrote:If you want the bootloader, you will have to program it to the boot block and also set the correct fuse bits so it jumps there at power on. Once the bootloader is present, you can use Roboflash.


What is the bootloader ? The cboot.asm file or others ??

How to program it to the boot block ?? Can use ISP with ponyprog ??

"Set the correct fuse bits" seems the point.

How stupid am I, :shock:
i-Bot wrote:You can just modify the asm file to skip the test and it will work then OK.


Do modify the scode.asm ? How to do that ?It looks difficulty? :?

i-Bot wrote:If you want the bootloader, you will have to program it to the boot block and also set the correct fuse bits so it jumps there at power on. Once the bootloader is present, you can use Roboflash.


What is the bootloader ? The cboot.asm file or others ??

How to program it to the boot block ?? Can use ISP with ponyprog ??

"Set the correct fuse bits" seems the point.

How stupid am I, :shock:
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Post by NewBreedWarrior » Thu Nov 01, 2007 6:28 pm

Post by NewBreedWarrior
Thu Nov 01, 2007 6:28 pm

I'm still scratching my head as to what language you use to control servo movement after doing all of this. C++ ? Opic ? what?
I'm still scratching my head as to what language you use to control servo movement after doing all of this. C++ ? Opic ? what?
In the fell clutch of circumstance
I have not winced nor cried aloud.
Under the bludgeonings of chance
My head is bloody, but unbowed.
NewBreedWarrior offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 53
Joined: Fri Jul 28, 2006 1:00 am
Location: United States, Kentucky

Post by i-Bot » Thu Nov 01, 2007 11:29 pm

Post by i-Bot
Thu Nov 01, 2007 11:29 pm

For more complex programs C is still my language of choice, giving a good balance of high level language and low level hardware control. An Atmega is obviously stretched to support 24 channels of bidirectional servo channels at the same time as supporting the other I/O options and point to point. Even programming in C with a motion library based on that of the RoboBasic has performance limits and needs a good understanding of operation of the C3024.

Much of my progamming has been as patches to the C3024 code, and so in assembler. The advantage here is that one can still use robobasic to access the additional patches in code. This enables new instructions to be written and accessed from Robobasic, Robobasic goes through byte code instructions in EEPROM about one per millisec. By coding larger assembler routines behind one or two new instructions, a speed increase of about 100 times is possible for commonly used chunks of code.
For more complex programs C is still my language of choice, giving a good balance of high level language and low level hardware control. An Atmega is obviously stretched to support 24 channels of bidirectional servo channels at the same time as supporting the other I/O options and point to point. Even programming in C with a motion library based on that of the RoboBasic has performance limits and needs a good understanding of operation of the C3024.

Much of my progamming has been as patches to the C3024 code, and so in assembler. The advantage here is that one can still use robobasic to access the additional patches in code. This enables new instructions to be written and accessed from Robobasic, Robobasic goes through byte code instructions in EEPROM about one per millisec. By coding larger assembler routines behind one or two new instructions, a speed increase of about 100 times is possible for commonly used chunks of code.
i-Bot offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Thu Nov 15, 2007 3:30 pm

Post by pio
Thu Nov 15, 2007 3:30 pm

Hi,all

Test report,

In c3024.pdf ,pin63 should GND,I burned one. :cry: :cry:

Again,used the ISP programmer with PonyProg to program,its failed. :?

Image

MISO to pin 3,

MOSI to pin 2,

SCK to pin 11,

RESET to pin 20

GND to ground.

then tried http://www.lancos.com/prog.html

AVR ISP with SI-Prog pinout

Image

and the connection

Image

failed,too.

That's all I tried :oops:
Hi,all

Test report,

In c3024.pdf ,pin63 should GND,I burned one. :cry: :cry:

Again,used the ISP programmer with PonyProg to program,its failed. :?

Image

MISO to pin 3,

MOSI to pin 2,

SCK to pin 11,

RESET to pin 20

GND to ground.

then tried http://www.lancos.com/prog.html

AVR ISP with SI-Prog pinout

Image

and the connection

Image

failed,too.

That's all I tried :oops:
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Post by i-Bot » Thu Nov 15, 2007 5:29 pm

Post by i-Bot
Thu Nov 15, 2007 5:29 pm

Sorry about the error and the chip :oops:

I have used both an SPI Duo and the JTAG ICE2 with this pinout like the Olimex board.

http://www.olimex.com/dev/images/AVR-H128-sch.gif

This seems to agree with your pins on the processor, though the connectors are obviously different.

I assume the processor is powered up, and you have a Xtal connected.
Sorry about the error and the chip :oops:

I have used both an SPI Duo and the JTAG ICE2 with this pinout like the Olimex board.

http://www.olimex.com/dev/images/AVR-H128-sch.gif

This seems to agree with your pins on the processor, though the connectors are obviously different.

I assume the processor is powered up, and you have a Xtal connected.
i-Bot offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Fri Nov 16, 2007 1:12 am

Post by pio
Fri Nov 16, 2007 1:12 am

i-Bot wrote:I have used both an SPI Duo and the JTAG ICE2 with this pinout like the Olimex board.

http://www.olimex.com/dev/images/AVR-H128-sch.gif

I assume the processor is powered up, and you have a Xtal connected.


Thanks the reply :lol: I'll try again, If try the SCH. Both the Q1,Q2 should be connected ??

ICSP's setup used the ponyprog's Interface setup

Image

should be the same as the pic or others??

The JTAG interface,I don't know how to used?? :?:

Yes,I had powered up and Xtal in 4 and 7.3728Mhz all tried.

Thanks a lot.
i-Bot wrote:I have used both an SPI Duo and the JTAG ICE2 with this pinout like the Olimex board.

http://www.olimex.com/dev/images/AVR-H128-sch.gif

I assume the processor is powered up, and you have a Xtal connected.


Thanks the reply :lol: I'll try again, If try the SCH. Both the Q1,Q2 should be connected ??

ICSP's setup used the ponyprog's Interface setup

Image

should be the same as the pic or others??

The JTAG interface,I don't know how to used?? :?:

Yes,I had powered up and Xtal in 4 and 7.3728Mhz all tried.

Thanks a lot.
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Post by Voelker » Tue Nov 20, 2007 9:07 pm

Post by Voelker
Tue Nov 20, 2007 9:07 pm

I have just changed the Atmega128 on my C3024 and its easier than it seems. I cutted all the pin of the atmega with a cutter, then removed the atmega, and removed the soldered pins with a soldering iron. I put some glue under the new chip then placed it on the board and soldered it without adding any solder. I checked all the connection and everything seems to be ok (no short-circiut). I ll soon try to load some code on it with my ISP. Does anyone know if there is any multi-task OS that can run on the atmega128 ?
I have just changed the Atmega128 on my C3024 and its easier than it seems. I cutted all the pin of the atmega with a cutter, then removed the atmega, and removed the soldered pins with a soldering iron. I put some glue under the new chip then placed it on the board and soldered it without adding any solder. I checked all the connection and everything seems to be ok (no short-circiut). I ll soon try to load some code on it with my ISP. Does anyone know if there is any multi-task OS that can run on the atmega128 ?
Voelker offline
Savvy Roboteer
Savvy Roboteer
Posts: 85
Joined: Thu Sep 06, 2007 7:32 pm

Post by pio » Wed Nov 21, 2007 12:36 am

Post by pio
Wed Nov 21, 2007 12:36 am

Voelker wrote:I have just changed the Atmega128 on my C3024 and its easier than it seems.

Hi,Voelker

That's wonderful,amazing to me. :shock: I afraid to do that,only I can do the same one,I admired your boldness in doing that. :)
Voelker wrote:I have just changed the Atmega128 on my C3024 and its easier than it seems.

Hi,Voelker

That's wonderful,amazing to me. :shock: I afraid to do that,only I can do the same one,I admired your boldness in doing that. :)
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Post by Voelker » Wed Nov 21, 2007 7:29 am

Post by Voelker
Wed Nov 21, 2007 7:29 am

In fact i broke my C3024 tow months ago (continuous reset) and bought a new one, so i didn't want to waste the broken C3024 just because the controller was dead.
In fact i broke my C3024 tow months ago (continuous reset) and bought a new one, so i didn't want to waste the broken C3024 just because the controller was dead.
Voelker offline
Savvy Roboteer
Savvy Roboteer
Posts: 85
Joined: Thu Sep 06, 2007 7:32 pm

Post by pio » Thu Nov 22, 2007 4:34 am

Post by pio
Thu Nov 22, 2007 4:34 am

Hi all,

Programming the scode to the ATmega128 successfully,connect the crystal,24C512 and RS-232 level change to the chip.

Run the roboBASIC, appear the message

Image

Image

That's all I try. :!: :!:
Hi all,

Programming the scode to the ATmega128 successfully,connect the crystal,24C512 and RS-232 level change to the chip.

Run the roboBASIC, appear the message

Image

Image

That's all I try. :!: :!:
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Post by i-Bot » Thu Nov 22, 2007 10:42 am

Post by i-Bot
Thu Nov 22, 2007 10:42 am

Some things to check
1) what fuse bits do you set
2) is the oscillator running after programming
3) There may be an error in the serial interface circuit. This can be either mine or yours. I did not build this level converter myself, since I used a ttl level serial cable. Use hyperterm or similar to send characters at 9600 bps and check if they get to the ATmega. running controller information should make the ATmega send characters.
Some things to check
1) what fuse bits do you set
2) is the oscillator running after programming
3) There may be an error in the serial interface circuit. This can be either mine or yours. I did not build this level converter myself, since I used a ttl level serial cable. Use hyperterm or similar to send characters at 9600 bps and check if they get to the ATmega. running controller information should make the ATmega send characters.
i-Bot offline
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Thu Nov 22, 2007 1:56 pm

Post by pio
Thu Nov 22, 2007 1:56 pm

i-Bot wrote:Some things to check
1) what fuse bits do you set
2) is the oscillator running after programming
3) There may be an error in the serial interface circuit. This can be either mine or yours. I did not build this level converter myself, since I used a ttl level serial cable. Use hyperterm or similar to send characters at 9600 bps and check if they get to the ATmega. running controller information should make the ATmega send characters.


1) I burned the scode.hex to the chip and read the code then as the pic below in ponyporg.

Image

I don't know what that pic as you mean?? Thanks.


2) Yes.

3) My circuit is below:

Image

I had tried the interface circuit,it seem ok to communication with another like this test(mean the serial communication).

Deeply thanks.
i-Bot wrote:Some things to check
1) what fuse bits do you set
2) is the oscillator running after programming
3) There may be an error in the serial interface circuit. This can be either mine or yours. I did not build this level converter myself, since I used a ttl level serial cable. Use hyperterm or similar to send characters at 9600 bps and check if they get to the ATmega. running controller information should make the ATmega send characters.


1) I burned the scode.hex to the chip and read the code then as the pic below in ponyporg.

Image

I don't know what that pic as you mean?? Thanks.


2) Yes.

3) My circuit is below:

Image

I had tried the interface circuit,it seem ok to communication with another like this test(mean the serial communication).

Deeply thanks.
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

scode or cboot

Post by pio » Mon Dec 24, 2007 2:39 pm

Post by pio
Mon Dec 24, 2007 2:39 pm

If want to understand the two programs,I'll try the AVR Studio.

Can you helpe me,Thanks a lot.

Regards,
pio
If want to understand the two programs,I'll try the AVR Studio.

Can you helpe me,Thanks a lot.

Regards,
pio
pio offline
Robot Builder
Robot Builder
Posts: 15
Joined: Sun Oct 28, 2007 9:23 am

Succeed to copy the MR-C3024 board

Post by ayu » Wed Dec 26, 2007 4:17 pm

Post by ayu
Wed Dec 26, 2007 4:17 pm

Hi all,

Thaks i-Bot to share the resources,and iRobot(H.K.)'s help,I used ATMEGA128,AVR Studio 4, PonyProg and parallel ISP to copy the board successfully.
Hi all,

Thaks i-Bot to share the resources,and iRobot(H.K.)'s help,I used ATMEGA128,AVR Studio 4, PonyProg and parallel ISP to copy the board successfully.
Last edited by ayu on Wed May 07, 2008 4:01 pm, edited 1 time in total.
ayu offline
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by ayu » Mon Dec 31, 2007 1:20 am

Post by ayu
Mon Dec 31, 2007 1:20 am

Sorry,

Only can real-time control,but *.bas burn to the eeprom ,it cann't work like MR-C3024 :oops:
Code: Select all
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0
SPEED 8
MOTOR G24



MOVE G6A,100,  76, 184,  93, 100, 100
MOVE G6A,100,  76,  17,  93, 100, 100
MOVE G6A,100,  76, 100,  93, 100, 100
MOVE G6A,100,  76,  20,  93, 100, 100
MOVE G6A,100,  76, 183,  93, 100, 100
Sorry,

Only can real-time control,but *.bas burn to the eeprom ,it cann't work like MR-C3024 :oops:
Code: Select all
GETMOTORSET G24,1,1,1,1,1,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,0
SPEED 8
MOTOR G24



MOVE G6A,100,  76, 184,  93, 100, 100
MOVE G6A,100,  76,  17,  93, 100, 100
MOVE G6A,100,  76, 100,  93, 100, 100
MOVE G6A,100,  76,  20,  93, 100, 100
MOVE G6A,100,  76, 183,  93, 100, 100
ayu offline
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

PreviousNext
PreviousNext
223 postsPage 11 of 151 ... 8, 9, 10, 11, 12, 13, 14, 15
223 postsPage 11 of 151 ... 8, 9, 10, 11, 12, 13, 14, 15
cron