Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

changing the code in the MR-C3024

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

Post by Doerk » Sat Oct 13, 2007 5:10 pm

Post by Doerk
Sat Oct 13, 2007 5:10 pm

Hi,

i tryed to change the code in the robonovas controller board, now he is dead
and no serial communication seems possible.

I need a way to reflash the robonova with the original bootloader,
can anybody please help me with that ???

mfg

Thomas
Hi,

i tryed to change the code in the robonovas controller board, now he is dead
and no serial communication seems possible.

I need a way to reflash the robonova with the original bootloader,
can anybody please help me with that ???

mfg

Thomas
Doerk
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 2:43 pm

Post by i-Bot » Sat Oct 13, 2007 10:29 pm

Post by i-Bot
Sat Oct 13, 2007 10:29 pm

It is not clear how you changed the flash. The loader is well protected, so you should just have to reload the code in flash.

Did you use jtag or ISP to program, if so are you sure you have the right fuse bits set ?

This is the loader if you need it
http://robosavvy.com/Builders/i-Bot/cboot.asm
It is not clear how you changed the flash. The loader is well protected, so you should just have to reload the code in flash.

Did you use jtag or ISP to program, if so are you sure you have the right fuse bits set ?

This is the loader if you need it
http://robosavvy.com/Builders/i-Bot/cboot.asm
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Doerk » Sat Oct 13, 2007 11:08 pm

Post by Doerk
Sat Oct 13, 2007 11:08 pm

Ok,

it was very stupid i has tried the freeloader and the payload.bin,
i have start the programm and select the bin file then i turned on the robonova and the upload begins in the terminal window.

When it has finished i turned off the robonova and disconnect the serial link.

Then i turned on the robonova again and nothing happens, all dead....

So i think i have done a misstake, and now i think it will be better to
reflash back the original bootloader to robonova anyway.

But i need help for this i dont have the bin file and i dint know the way back
and need please help to do this ...

Thnx

Thomas
Ok,

it was very stupid i has tried the freeloader and the payload.bin,
i have start the programm and select the bin file then i turned on the robonova and the upload begins in the terminal window.

When it has finished i turned off the robonova and disconnect the serial link.

Then i turned on the robonova again and nothing happens, all dead....

So i think i have done a misstake, and now i think it will be better to
reflash back the original bootloader to robonova anyway.

But i need help for this i dont have the bin file and i dint know the way back
and need please help to do this ...

Thnx

Thomas
Doerk
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 2:43 pm

Post by i-Bot » Sat Oct 13, 2007 11:40 pm

Post by i-Bot
Sat Oct 13, 2007 11:40 pm

Try Roboflash:
http://robosavvy.com/Builders/i-Bot/roboflash.zip
with payload .bin

It may be best to keep the C3024 powered off, until roboflash asks you to power it on. Some bad code streams data from the serial port, and this upsets the loader
Try Roboflash:
http://robosavvy.com/Builders/i-Bot/roboflash.zip
with payload .bin

It may be best to keep the C3024 powered off, until roboflash asks you to power it on. Some bad code streams data from the serial port, and this upsets the loader
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Doerk » Sun Oct 14, 2007 10:00 am

Post by Doerk
Sun Oct 14, 2007 10:00 am

Hi,

i have flashed the robonova with your roboflash, i have used the scode.asm and converted it with avr studio via build to scode.hex.

It has worked fine now i think my robonova will work as before.

Now my question, i think i dont have understand some ...

Can you please explain me again what to do to programm
the robonova with c code ?

thnx

thomas
Hi,

i have flashed the robonova with your roboflash, i have used the scode.asm and converted it with avr studio via build to scode.hex.

It has worked fine now i think my robonova will work as before.

Now my question, i think i dont have understand some ...

Can you please explain me again what to do to programm
the robonova with c code ?

thnx

thomas
Doerk
Newbie
Newbie
Posts: 6
Joined: Wed Aug 29, 2007 2:43 pm

Can I copy the MR-C3024 board??

Post by horatio » Fri Oct 26, 2007 3:11 pm

Post by horatio
Fri Oct 26, 2007 3:11 pm

Such a stupid question, hope don't mind.

If I burned it :oops: , could I diy a same board :( ??

Thanks.
Such a stupid question, hope don't mind.

If I burned it :oops: , could I diy a same board :( ??

Thanks.
horatio
Robot Builder
Robot Builder
Posts: 12
Joined: Fri Oct 26, 2007 4:17 am

Post by i-Bot » Fri Oct 26, 2007 3:47 pm

Post by i-Bot
Fri Oct 26, 2007 3:47 pm

If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.

Unless you sacrifice some pin functions, you will not have JTAG or SPI, after setting the fuse bits.
If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.

Unless you sacrifice some pin functions, you will not have JTAG or SPI, after setting the fuse bits.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Sun Oct 28, 2007 9:49 am

Post by pio
Sun Oct 28, 2007 9:49 am

i-Bot wrote:If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.

Unless you sacrifice some pin functions, you will not have JTAG or SPI, after setting the fuse bits.


What a stupid question,pls don't mind.

What's bootloader, JTAG,SPI ??

EEPROM is 24C512CW or not ,we should burn code to it or other??

THx
i-Bot wrote:If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.

Unless you sacrifice some pin functions, you will not have JTAG or SPI, after setting the fuse bits.


What a stupid question,pls don't mind.

What's bootloader, JTAG,SPI ??

EEPROM is 24C512CW or not ,we should burn code to it or other??

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

Post by i-Bot » Sun Oct 28, 2007 10:22 am

Post by i-Bot
Sun Oct 28, 2007 10:22 am

There are four ways to program the flash memory on the ATMega128.

1) Parallel, this takes quite a few pins and programmers are not common. This is the only way to reprogam if you disable the other program modes

2) SPI uses the SPI interface and low cost programmers are available. THis does use the SPI pins and these are already used on the C3024

3)JTAG similar to above except it can also support debugging, and uses a different set of pins

4) Self programming requires a boot loader to be programmeed to the boot section of memory. The Atmega on the C3024 has a bootloader programmed, which allows Hitec to update the code. It is this bootloader which Roboflash or other programs use to reprogram the C3024. Alternative bootloaders are available, but the C3024 firmware checks for the signature of its own bootloader or it will not run robobasic code

The external 24C512 EEPROM is used to hold the Robobasic executable code, so must also be present. This does not ned any programming, that is down during the Robobasic download.

For further information check the ATMega128 datashet from Atmel, and the source code for the bootloader and C3024 in my file area
There are four ways to program the flash memory on the ATMega128.

1) Parallel, this takes quite a few pins and programmers are not common. This is the only way to reprogam if you disable the other program modes

2) SPI uses the SPI interface and low cost programmers are available. THis does use the SPI pins and these are already used on the C3024

3)JTAG similar to above except it can also support debugging, and uses a different set of pins

4) Self programming requires a boot loader to be programmeed to the boot section of memory. The Atmega on the C3024 has a bootloader programmed, which allows Hitec to update the code. It is this bootloader which Roboflash or other programs use to reprogram the C3024. Alternative bootloaders are available, but the C3024 firmware checks for the signature of its own bootloader or it will not run robobasic code

The external 24C512 EEPROM is used to hold the Robobasic executable code, so must also be present. This does not ned any programming, that is down during the Robobasic download.

For further information check the ATMega128 datashet from Atmel, and the source code for the bootloader and C3024 in my file area
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Mon Oct 29, 2007 2:03 am

Post by pio
Mon Oct 29, 2007 2:03 am

In c3024.pdf 's circuit

Image

C1,C2= ?? F.

Image

the two resistors=?? ohm,R6=?? ohm .

RRX just connect together ,no connect to chip ??

Image

These capacitors's value=?? F.

Is IC2 =7806 ??

Image

Where the TP1 to connect ??

C4=10mF or 10nF ??

Where's the IR(REMOCON) receiver ??

Thanks a lot.
In c3024.pdf 's circuit

Image

C1,C2= ?? F.

Image

the two resistors=?? ohm,R6=?? ohm .

RRX just connect together ,no connect to chip ??

Image

These capacitors's value=?? F.

Is IC2 =7806 ??

Image

Where the TP1 to connect ??

C4=10mF or 10nF ??

Where's the IR(REMOCON) receiver ??

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

Post by i-Bot » Mon Oct 29, 2007 3:04 pm

Post by i-Bot
Mon Oct 29, 2007 3:04 pm

The diagram is what I could trace from the board, so I could not measure all values.

The Capacitors on the crystal are probably around 22 or 33 pf and not critical to value in this range

The serial interface is done by the dual digital transistor. The resistors are internal and I did not measure them. I would guess around 10K. I could not identify the actual SMT digital transistor used from the marking


C13 is 100mfd 16V and C14 is 220mfd 6V. the other decoupling capacitors are likely 10 or 100nf and spread around the board, especially close to ATMega power pins.

IC2 is a 5V low drop out regulator. Not a 7805, since this would drop too much voltage at low battery and higher current loads. A 7805 would give resets.

C4 is not polarised and is probably 10nf

The TP1 is the reset and connection is only made here for programming with SPI or JTAG

The IR receiver is seperate and connected to the AD pins. It is inside heatshrink sleeeving.. I expect just a standard IR receiver with a series R and parallel C to stop any noise problems.
The diagram is what I could trace from the board, so I could not measure all values.

The Capacitors on the crystal are probably around 22 or 33 pf and not critical to value in this range

The serial interface is done by the dual digital transistor. The resistors are internal and I did not measure them. I would guess around 10K. I could not identify the actual SMT digital transistor used from the marking


C13 is 100mfd 16V and C14 is 220mfd 6V. the other decoupling capacitors are likely 10 or 100nf and spread around the board, especially close to ATMega power pins.

IC2 is a 5V low drop out regulator. Not a 7805, since this would drop too much voltage at low battery and higher current loads. A 7805 would give resets.

C4 is not polarised and is probably 10nf

The TP1 is the reset and connection is only made here for programming with SPI or JTAG

The IR receiver is seperate and connected to the AD pins. It is inside heatshrink sleeeving.. I expect just a standard IR receiver with a series R and parallel C to stop any noise problems.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Wed Oct 31, 2007 12:32 pm

Post by pio
Wed Oct 31, 2007 12:32 pm

i-Bot wrote:If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.


If change the 24C512 to 24C1024,because can't find the chip,shouldn't we ??

i-Bot wrote:
C13 is 100mfd 16V and C14 is 220mfd 6V.

IC2 is a 5V low drop out regulator. Not a 7805,

IR receiver is seperate and connected to the AD pins.


mfd = uf ?? Such a stupid question.

LD1117 Input Max 15V output 800mA , AIC1734 Input Max 12V output 300mA , What we should selected ?? Or must select ouput 1000mA ??

AD0-AD7,What we selected ??


Thanks.
i-Bot wrote:If you DIY it, you must have the external EEPROM, and you must have the proper bootloader on the chip, since the firmware checks for it.


If change the 24C512 to 24C1024,because can't find the chip,shouldn't we ??

i-Bot wrote:
C13 is 100mfd 16V and C14 is 220mfd 6V.

IC2 is a 5V low drop out regulator. Not a 7805,

IR receiver is seperate and connected to the AD pins.


mfd = uf ?? Such a stupid question.

LD1117 Input Max 15V output 800mA , AIC1734 Input Max 12V output 300mA , What we should selected ?? Or must select ouput 1000mA ??

AD0-AD7,What we selected ??


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

Post by i-Bot » Wed Oct 31, 2007 1:41 pm

Post by i-Bot
Wed Oct 31, 2007 1:41 pm

I did not try a 24C1024, but it looks like it should work OK.

Yes mfd is uf.

I think the regulator is rated at about 600 or 800 mA. The current rating is to include the devices plugged into the top row of ports which use 5 Volts (Gyro, IR, bluetooth, etc)
The input voltage is set by the battery, so you can use anything over about 8 Volts.

The IR connects onto AD7
I did not try a 24C1024, but it looks like it should work OK.

Yes mfd is uf.

I think the regulator is rated at about 600 or 800 mA. The current rating is to include the devices plugged into the top row of ports which use 5 Volts (Gyro, IR, bluetooth, etc)
The input voltage is set by the battery, so you can use anything over about 8 Volts.

The IR connects onto AD7
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by pio » Thu Nov 01, 2007 2:55 pm

Post by pio
Thu Nov 01, 2007 2:55 pm

Hi,all

Preparing the Atmeag128 TQFP->PDIP, LM2940CT-5.0 TO-220 ,
IRM-2638 , 24c1024w-2.7 SOP for test.

i-Bot wrote:The cboot is the bootloader and sits in high flash memory on th ATMega128. scode is the operating code of the C3024 and makes the payload2.5 file which is loaded by Roboflash into the ATMega128 low flash memory. The eeprom does not contain ATMega code, but only Robobasic intermediate code.

I have not actually loaded the cboot into a new ATMega, since the objective was to change code in the existing, not to make copies. If you just want a loader, then I recommend Megaload as being much better.

A genuine C3024 needs the scode to work. Also for download and execute of Robobasic/Roboscript code, then you need the eeprom. Also the scode does check for a valid cboot bootlloader before it will execute from eeprom.


I'll program the scode.hex to the new ATMega by Isp,and PonyProg2000.

I don't know the cboot.hex how to program into the flash again :oops:??

jeffchifu wrote:Hi Fritzoid,
I have tried i-bot scode.asm to run in my virgin ATMEGA128 but it's not successful.


I don't know why jeffchifu failed??but I'll try again,hope ok.

Doerk wrote:i have flashed the robonova with your roboflash, i have used the scode.asm and converted it with avr studio via build to scode.hex.

It has worked fine now i think my robonova will work as before.


Should we burn the scode.hex to the new ATMega and run roboflash with payload .bin .

Those what I understand :idea: , If wrong,hope your help.

Thanks.
Hi,all

Preparing the Atmeag128 TQFP->PDIP, LM2940CT-5.0 TO-220 ,
IRM-2638 , 24c1024w-2.7 SOP for test.

i-Bot wrote:The cboot is the bootloader and sits in high flash memory on th ATMega128. scode is the operating code of the C3024 and makes the payload2.5 file which is loaded by Roboflash into the ATMega128 low flash memory. The eeprom does not contain ATMega code, but only Robobasic intermediate code.

I have not actually loaded the cboot into a new ATMega, since the objective was to change code in the existing, not to make copies. If you just want a loader, then I recommend Megaload as being much better.

A genuine C3024 needs the scode to work. Also for download and execute of Robobasic/Roboscript code, then you need the eeprom. Also the scode does check for a valid cboot bootlloader before it will execute from eeprom.


I'll program the scode.hex to the new ATMega by Isp,and PonyProg2000.

I don't know the cboot.hex how to program into the flash again :oops:??

jeffchifu wrote:Hi Fritzoid,
I have tried i-bot scode.asm to run in my virgin ATMEGA128 but it's not successful.


I don't know why jeffchifu failed??but I'll try again,hope ok.

Doerk wrote:i have flashed the robonova with your roboflash, i have used the scode.asm and converted it with avr studio via build to scode.hex.

It has worked fine now i think my robonova will work as before.


Should we burn the scode.hex to the new ATMega and run roboflash with payload .bin .

Those what I understand :idea: , If wrong,hope your help.

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

Post by i-Bot » Thu Nov 01, 2007 3:37 pm

Post by i-Bot
Thu Nov 01, 2007 3:37 pm

If you have ISP and ponyprog, then you can initilally test by loading the scode direct to the AtMega.
The scode.hex made from scode.asm should be the same as payload.bin, you can load either. They are not quite byte for byte the same due to different fill characters, but code for code are.
The loaded scode should communicate with the PC Robobasic and respond to controller information.

You will find that Robobasic programs do not run after download. This is beacuse it did not find the bootloader during initialisation. You can just modify the asm file to skip the test and it will work then OK.

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.
If you have ISP and ponyprog, then you can initilally test by loading the scode direct to the AtMega.
The scode.hex made from scode.asm should be the same as payload.bin, you can load either. They are not quite byte for byte the same due to different fill characters, but code for code are.
The loaded scode should communicate with the PC Robobasic and respond to controller information.

You will find that Robobasic programs do not run after download. This is beacuse it did not find the bootloader during initialisation. You can just modify the asm file to skip the test and it will work then OK.

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.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

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