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

Development of new controller board for Robonova

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
25 postsPage 2 of 21, 2
25 postsPage 2 of 21, 2

Post by i-Bot » Sun Aug 27, 2006 8:23 pm

Post by i-Bot
Sun Aug 27, 2006 8:23 pm

1)To extract the existing code is fairly easy.

Use hexedit to display the Robobasic .exe

select the C3024 code ( 0024290c to 0024ED1B) to a file and run Bin2hex to make a hex file.

This can be loaded to AVR studio to down loan to a virgin ATMega, also to view the dissassembled code.

I used disavr2 to disassemble too, but this does seem to wrap addresses. However it is better since addresses are not relative.

I have commented the initalisation, serial command decode, and the Intermediate code interpretter, though not fixed all the addresses.

I still have problems with the serial interface over bluetooth, even at constant 115K. It is slow. I need to figure this out.

2) The existing code is pretty clever in the servo and timer level. the group moves, gyro support etc is accessible through data memory, as well as the serial commands. Hence why we want to reuse it through serial control.
If you can offer a replacement this is good, but do not underestimate the current capability (group moves, gyro support)

3) The weakness of the current protocol is that it is byte by byte ping pong. not very efficient over wireless ! Also the C3024 spend a lot of time waiting on serial replies.
1)To extract the existing code is fairly easy.

Use hexedit to display the Robobasic .exe

select the C3024 code ( 0024290c to 0024ED1B) to a file and run Bin2hex to make a hex file.

This can be loaded to AVR studio to down loan to a virgin ATMega, also to view the dissassembled code.

I used disavr2 to disassemble too, but this does seem to wrap addresses. However it is better since addresses are not relative.

I have commented the initalisation, serial command decode, and the Intermediate code interpretter, though not fixed all the addresses.

I still have problems with the serial interface over bluetooth, even at constant 115K. It is slow. I need to figure this out.

2) The existing code is pretty clever in the servo and timer level. the group moves, gyro support etc is accessible through data memory, as well as the serial commands. Hence why we want to reuse it through serial control.
If you can offer a replacement this is good, but do not underestimate the current capability (group moves, gyro support)

3) The weakness of the current protocol is that it is byte by byte ping pong. not very efficient over wireless ! Also the C3024 spend a lot of time waiting on serial replies.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by DanAlbert » Sun Aug 27, 2006 9:29 pm

Post by DanAlbert
Sun Aug 27, 2006 9:29 pm

Hmm,
OK I opened up rbv2.exe (i guess that's what you meant?).
Indeed at 0024290c was the beginning of some code. (or something)
However it ends at 24b10f.

I've put data that was there into a separate file.

A few questions.
Do I have the right file?
Is there a good disassembler to use on this kind of file?
(Some that I saw want a intel Hex style.)

Could you forward me what you have so far? dan@sjrobotics.org

Thanks
Hmm,
OK I opened up rbv2.exe (i guess that's what you meant?).
Indeed at 0024290c was the beginning of some code. (or something)
However it ends at 24b10f.

I've put data that was there into a separate file.

A few questions.
Do I have the right file?
Is there a good disassembler to use on this kind of file?
(Some that I saw want a intel Hex style.)

Could you forward me what you have so far? dan@sjrobotics.org

Thanks
DanAlbert
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 70
Joined: Fri Feb 04, 2005 1:00 am

Post by Bullit » Sun Aug 27, 2006 11:42 pm

Post by Bullit
Sun Aug 27, 2006 11:42 pm

That works for me.
DanAlbert, make sure you have robobasic 2.5e
Now if I only understood it all. Its tough weeding through disassembled code.
Thanks I-Bot.
That works for me.
DanAlbert, make sure you have robobasic 2.5e
Now if I only understood it all. Its tough weeding through disassembled code.
Thanks I-Bot.
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by DanAlbert » Mon Aug 28, 2006 1:33 am

Post by DanAlbert
Mon Aug 28, 2006 1:33 am

Robobasic.com has dead links. (Let's bury it)

I'm thinking maybe to just start rewriting something in C.
If we make it an "open" project we can enlist the help of others.

I've done a lot of PIC, ARM and 8051 programming.
This is the first AVR.

I assume I must first erase the chip to clear the fuses, right?
I also need to connect my JTAG to the reset line. Don't tell me the morons at
Hitec tried to protect us by not bringing out the reset pin?

Dan
Robobasic.com has dead links. (Let's bury it)

I'm thinking maybe to just start rewriting something in C.
If we make it an "open" project we can enlist the help of others.

I've done a lot of PIC, ARM and 8051 programming.
This is the first AVR.

I assume I must first erase the chip to clear the fuses, right?
I also need to connect my JTAG to the reset line. Don't tell me the morons at
Hitec tried to protect us by not bringing out the reset pin?

Dan
DanAlbert
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 70
Joined: Fri Feb 04, 2005 1:00 am

Post by i-Bot » Mon Aug 28, 2006 9:23 am

Post by i-Bot
Mon Aug 28, 2006 9:23 am

The reset pin is on the pad "RST" adjacent to pin 31 of the ATMega128 and next to C2. I sucked out the solder and added a single pin header.

The other JTAG pins are available on the AD4 AD5 AD6 AD7 header.

THIS ERASE PROCESS WILL PREVENT THE C-3024 FROM WORKING COMPLETELY WITH ROBOBASIC IN FUTURE !

If Hitec gave us the serial bootloader information, this would not be true.

Maybe you can avoid erasing the boot block 0xf000 to 0xffff

I bought a spare C-3024 to experiment with and actually replaced CPU. I now have a JTAG cable, instead of SPI, so will try that too.
The reset pin is on the pad "RST" adjacent to pin 31 of the ATMega128 and next to C2. I sucked out the solder and added a single pin header.

The other JTAG pins are available on the AD4 AD5 AD6 AD7 header.

THIS ERASE PROCESS WILL PREVENT THE C-3024 FROM WORKING COMPLETELY WITH ROBOBASIC IN FUTURE !

If Hitec gave us the serial bootloader information, this would not be true.

Maybe you can avoid erasing the boot block 0xf000 to 0xffff

I bought a spare C-3024 to experiment with and actually replaced CPU. I now have a JTAG cable, instead of SPI, so will try that too.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by DanAlbert » Mon Aug 28, 2006 1:33 pm

Post by DanAlbert
Mon Aug 28, 2006 1:33 pm

RoboBasic?

who needs it!

I've been an embedded programmer for 30 years.
This board is not that tough.
I've been reading up on the atmeag128. Cool chip. Fast instruction pipe,
lots of accumulators. Great indirect addressing. Plenty RAM and Flash.
What more could anyone want? As a PIC and 8051 programmer, this chip is a big step up.

So a few questions:
Should I use the GCC compiler?
Which I/O is most important to get working first?
Communications(Serial, I2C SPI).
Servo communication.
A/D conversion?
Boot loader.

None of these should be that difficult.

Dan
RoboBasic?

who needs it!

I've been an embedded programmer for 30 years.
This board is not that tough.
I've been reading up on the atmeag128. Cool chip. Fast instruction pipe,
lots of accumulators. Great indirect addressing. Plenty RAM and Flash.
What more could anyone want? As a PIC and 8051 programmer, this chip is a big step up.

So a few questions:
Should I use the GCC compiler?
Which I/O is most important to get working first?
Communications(Serial, I2C SPI).
Servo communication.
A/D conversion?
Boot loader.

None of these should be that difficult.

Dan
DanAlbert
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 70
Joined: Fri Feb 04, 2005 1:00 am

Post by i-Bot » Mon Aug 28, 2006 3:49 pm

Post by i-Bot
Mon Aug 28, 2006 3:49 pm

I have been looking more at my slow bluetooth.

There is a significant delay on every byte sent and echoed of around 250mSec.

This happens on two different Bluetooth USB connecting to a Sparkfun Blueradio. The radio is on the PC port, not on ERX/ETX

Does anyone know of a config. to speed this up ?
I have been looking more at my slow bluetooth.

There is a significant delay on every byte sent and echoed of around 250mSec.

This happens on two different Bluetooth USB connecting to a Sparkfun Blueradio. The radio is on the PC port, not on ERX/ETX

Does anyone know of a config. to speed this up ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Bullit » Mon Aug 28, 2006 5:25 pm

Post by Bullit
Mon Aug 28, 2006 5:25 pm

So if you connect tx and rx of the sparkfun and time single characters from and to the pc you get 250ms? I'll have to try that myself. It seems extremely long. I have some promi rs232 modules I can try it on also. That will remove the USB component. Were going to need much better response time then that to make this useful.
So if you connect tx and rx of the sparkfun and time single characters from and to the pc you get 250ms? I'll have to try that myself. It seems extremely long. I have some promi rs232 modules I can try it on also. That will remove the USB component. Were going to need much better response time then that to make this useful.
Image
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by i-Bot » Mon Aug 28, 2006 5:58 pm

Post by i-Bot
Mon Aug 28, 2006 5:58 pm

yes, I invert the serial cable ports and put them into a bluetooth radio (sparkfun bluesmirf)

Watch progress in serial port monitor. slow slow....slow.. zzzzz.

I have another Olimex board + 24c512 EEProm. which thinks it is a Robonova! direct connect to Bluesmirf,. Same problem on response time.
yes, I invert the serial cable ports and put them into a bluetooth radio (sparkfun bluesmirf)

Watch progress in serial port monitor. slow slow....slow.. zzzzz.

I have another Olimex board + 24c512 EEProm. which thinks it is a Robonova! direct connect to Bluesmirf,. Same problem on response time.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Bullit » Mon Aug 28, 2006 9:34 pm

Post by Bullit
Mon Aug 28, 2006 9:34 pm

So for a ping we are limited to 250ms which sort of kills any realtime control. For the ability to program and do normal catch and play stuff that should be ok at least we can be wireless.
So for a ping we are limited to 250ms which sort of kills any realtime control. For the ability to program and do normal catch and play stuff that should be ok at least we can be wireless.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Previous
25 postsPage 2 of 21, 2
25 postsPage 2 of 21, 2