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 13 of 151 ... 10, 11, 12, 13, 14, 15
223 postsPage 13 of 151 ... 10, 11, 12, 13, 14, 15

Post by i-Bot » Sat May 10, 2008 9:40 pm

Post by i-Bot
Sat May 10, 2008 9:40 pm

cboot sits up in top of the flash at 0xf000 if I recall . Your fuse bits should be set to jump to the bootloader at that location.
cboot sits up in top of the flash at 0xf000 if I recall . Your fuse bits should be set to jump to the bootloader at that location.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Sat May 10, 2008 10:11 pm

Post by stuuk
Sat May 10, 2008 10:11 pm

Hi Guys

i'm trying hard but still need help (haven't messed around with programming or electronics in years)

Can one of the guys who has done this Ayu, Pio, i-bot etc give me some step by step instructions?

My main stumblig block at the moment is when i load cboot.hex in ponyprog it just displays FF's for the entire file even though I can see in notepad that cboot.hex contains valid data.

I went ahead and wrote this to the atmega as Write Program (Flash), is this correct? the other options are Write All or Write Data (EEprom)

I then went ahead and wrote the fuse bits as per Ayu's instructions.

Both write operations were successfull

Am i ok so far or have i screwed up?

Thanks
Hi Guys

i'm trying hard but still need help (haven't messed around with programming or electronics in years)

Can one of the guys who has done this Ayu, Pio, i-bot etc give me some step by step instructions?

My main stumblig block at the moment is when i load cboot.hex in ponyprog it just displays FF's for the entire file even though I can see in notepad that cboot.hex contains valid data.

I went ahead and wrote this to the atmega as Write Program (Flash), is this correct? the other options are Write All or Write Data (EEprom)

I then went ahead and wrote the fuse bits as per Ayu's instructions.

Both write operations were successfull

Am i ok so far or have i screwed up?

Thanks
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by i-Bot » Sat May 10, 2008 10:37 pm

Post by i-Bot
Sat May 10, 2008 10:37 pm

0xf000 is the word address. If you look in Ponyprog at address 0x1e000 you should see the cboot code OK.

You need to set the config to jump to 0xF000 on boot
0xf000 is the word address. If you look in Ponyprog at address 0x1e000 you should see the cboot code OK.

You need to set the config to jump to 0xF000 on boot
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Sat May 10, 2008 10:45 pm

Post by stuuk
Sat May 10, 2008 10:45 pm

ok i can see the code at that address

but where do i set the config to jump to 0xF000 on boot?
ok i can see the code at that address

but where do i set the config to jump to 0xF000 on boot?
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by i-Bot » Sat May 10, 2008 11:00 pm

Post by i-Bot
Sat May 10, 2008 11:00 pm

That is done in the configuration and security bits given by Pio. You should be set to go now.
That is done in the configuration and security bits given by Pio. You should be set to go now.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Sun May 11, 2008 1:37 am

Post by stuuk
Sun May 11, 2008 1:37 am

Hi

Made serial circuit and tried roboflash no comms.
Checked circuit then reversed tx/rx on the rs232 plug from ayu's circuit and roboflash appeared to download payload to the controller.

then tried robobasic controller information and it either gisves error -4 timeout or error -5 error in data

Any idea's?

Thanks
Hi

Made serial circuit and tried roboflash no comms.
Checked circuit then reversed tx/rx on the rs232 plug from ayu's circuit and roboflash appeared to download payload to the controller.

then tried robobasic controller information and it either gisves error -4 timeout or error -5 error in data

Any idea's?

Thanks
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by i-Bot » Sun May 11, 2008 10:08 am

Post by i-Bot
Sun May 11, 2008 10:08 am

Did Roboflash complete the download OK ?

Did you cycle the power after the down load ? It does need that
Did Roboflash complete the download OK ?

Did you cycle the power after the down load ? It does need that
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Sun May 11, 2008 10:39 am

Post by stuuk
Sun May 11, 2008 10:39 am

Hi I-Bot

Yes it seemed to complete and i cycled the power.

When I connect hyperterminal i get a continous stream of right arrows >>>>>>>>>>>>>>>>>>>>>>> filling the screen at appx 10 chars per second.

Is it possible that roboflash only uses transmission and doesnt need any ack back from the controller and i have a tx fault in my rs232 circuit?

I've checked and double checked the circuit and it seems ok

Here is a quick summary of what I have done so far, have i missed anything?

I built the circuit and a ISP dongle

I used the cboot.hex file in Ayu files area to program the atmega with ponyprog.
I used the option write Program (flash) success it completed.

I set the fuse bits with bootsz1 and bootsz0 only options checked and it wrote successfully.

I used robo flash to download payload.bin and that seemed to work.

But when i try to connect with robobasic i get error -5 error in data!
Hyperterminal just receives continuous right arrows

Thanks

Stu
Hi I-Bot

Yes it seemed to complete and i cycled the power.

When I connect hyperterminal i get a continous stream of right arrows >>>>>>>>>>>>>>>>>>>>>>> filling the screen at appx 10 chars per second.

Is it possible that roboflash only uses transmission and doesnt need any ack back from the controller and i have a tx fault in my rs232 circuit?

I've checked and double checked the circuit and it seems ok

Here is a quick summary of what I have done so far, have i missed anything?

I built the circuit and a ISP dongle

I used the cboot.hex file in Ayu files area to program the atmega with ponyprog.
I used the option write Program (flash) success it completed.

I set the fuse bits with bootsz1 and bootsz0 only options checked and it wrote successfully.

I used robo flash to download payload.bin and that seemed to work.

But when i try to connect with robobasic i get error -5 error in data!
Hyperterminal just receives continuous right arrows

Thanks

Stu
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by i-Bot » Sun May 11, 2008 1:18 pm

Post by i-Bot
Sun May 11, 2008 1:18 pm

The > are from the bootlloader, so RoboFlash must not have programmed the flash.

Roboflash does not check the actual characters returned, so it can get confused.

I put a new hex file which has both the loader and the C3024 code in the same file.

http://robosavvy.com/Builders/i-Bot/testcboot.zip

Try loading that with ponyprog.
The > are from the bootlloader, so RoboFlash must not have programmed the flash.

Roboflash does not check the actual characters returned, so it can get confused.

I put a new hex file which has both the loader and the C3024 code in the same file.

http://robosavvy.com/Builders/i-Bot/testcboot.zip

Try loading that with ponyprog.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by ayu » Sun May 11, 2008 1:26 pm

Post by ayu
Sun May 11, 2008 1:26 pm

Hi stu,and all

Sorry, answer too late. :(

In my test, maybe something to notice,

Operating the roboflash,it talk to you must power off the ATmega128's power and power on again,then you can download the payload2.5.bin to the ATmega128.That's all O.k.

If something wrong,in my test,the other is :

download the roboflash.zip and unzip another file folder again.

Because first try fail, the files seem cannt to be downloaded again,so you must change another file folder again.

Why that, :?: It confused me
,but I try to change the other file folder,it can be done O.K.

Thanks i-Bot :)
Hi stu,and all

Sorry, answer too late. :(

In my test, maybe something to notice,

Operating the roboflash,it talk to you must power off the ATmega128's power and power on again,then you can download the payload2.5.bin to the ATmega128.That's all O.k.

If something wrong,in my test,the other is :

download the roboflash.zip and unzip another file folder again.

Because first try fail, the files seem cannt to be downloaded again,so you must change another file folder again.

Why that, :?: It confused me
,but I try to change the other file folder,it can be done O.K.

Thanks i-Bot :)
ayu
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by stuuk » Sun May 11, 2008 4:45 pm

Post by stuuk
Sun May 11, 2008 4:45 pm

I-Bot

testcboot extracted as I2ccboot.hex

I flashed this to the controller using ponyprog and hey presto i get controller info from robobasic

I can seem to do anything in real time ie set zero point, motor control etc but as soon as i try to download a robobasic program it compiles then comes back with error 5 error in data transmission

What do you think this could be?

Thanks

Stu
I-Bot

testcboot extracted as I2ccboot.hex

I flashed this to the controller using ponyprog and hey presto i get controller info from robobasic

I can seem to do anything in real time ie set zero point, motor control etc but as soon as i try to download a robobasic program it compiles then comes back with error 5 error in data transmission

What do you think this could be?

Thanks

Stu
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by stuuk » Sun May 11, 2008 4:57 pm

Post by stuuk
Sun May 11, 2008 4:57 pm

Picture added

Image
Picture added

Image
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by i-Bot » Sun May 11, 2008 5:41 pm

Post by i-Bot
Sun May 11, 2008 5:41 pm

Now you need the EEPROM. That is where the code is downloaded to.
Now you need the EEPROM. That is where the code is downloaded to.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Sun May 11, 2008 5:51 pm

Post by stuuk
Sun May 11, 2008 5:51 pm

I have the eeprom in the circuit

I'll double check everything but is there a way i can verify its presence with ponyprog etc?
I have the eeprom in the circuit

I'll double check everything but is there a way i can verify its presence with ponyprog etc?
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

Post by stuuk » Mon May 12, 2008 11:19 am

Post by stuuk
Mon May 12, 2008 11:19 am

Hi I-Bot

I've double checked everything and my eeprom circuit is as follows
(checked with meter)

Pins 1,2,3 and 8 are VCC
Pin 4 ground
Pin 7 n/c
pin 5 connects to atmega pin 26 SDA
pin 6 connects to atmega pin 25 SCI

Are pins 25 and 26 correct?

Both 5 and 6 also have a 10k pullup to VCC

I bought the eeprom from Farnell the bag it came in says AT4C512B serial eeprom but the writing printed on the ic says:
ATMLU736
2FB 2
P6J2327B

I've checked these numbers on google and they do seem to relate to a 24C512 eeprom.

With your combined code Robobasic can read and write to the controller in real time ie read motor positions, adjust motors, set and retrieve zero points etc but when I try to download a basic program it compiles but reports an immediate error code5 (errors in data transmission) when it tries to download.

Are my connections correct?
Can you think of anything else that would cause this?

I'm also still a little confused why the cboot.hex / roboflash method didnt work for me when it seemed to work for Ayu

The other strange thing is roboflash no longer see's the controller with the combined code loaded even though robobasic can talk to it quite happily (with the exception of dowloading basic code).

Thanks for all your help so far.

Stu
Hi I-Bot

I've double checked everything and my eeprom circuit is as follows
(checked with meter)

Pins 1,2,3 and 8 are VCC
Pin 4 ground
Pin 7 n/c
pin 5 connects to atmega pin 26 SDA
pin 6 connects to atmega pin 25 SCI

Are pins 25 and 26 correct?

Both 5 and 6 also have a 10k pullup to VCC

I bought the eeprom from Farnell the bag it came in says AT4C512B serial eeprom but the writing printed on the ic says:
ATMLU736
2FB 2
P6J2327B

I've checked these numbers on google and they do seem to relate to a 24C512 eeprom.

With your combined code Robobasic can read and write to the controller in real time ie read motor positions, adjust motors, set and retrieve zero points etc but when I try to download a basic program it compiles but reports an immediate error code5 (errors in data transmission) when it tries to download.

Are my connections correct?
Can you think of anything else that would cause this?

I'm also still a little confused why the cboot.hex / roboflash method didnt work for me when it seemed to work for Ayu

The other strange thing is roboflash no longer see's the controller with the combined code loaded even though robobasic can talk to it quite happily (with the exception of dowloading basic code).

Thanks for all your help so far.

Stu
stuuk
Savvy Roboteer
Savvy Roboteer
Posts: 44
Joined: Sun Apr 27, 2008 8:34 pm

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