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 9 of 151 ... 6, 7, 8, 9, 10, 11, 12 ... 15
223 postsPage 9 of 151 ... 6, 7, 8, 9, 10, 11, 12 ... 15

Post by i-Bot » Wed Mar 07, 2007 5:15 pm

Post by i-Bot
Wed Mar 07, 2007 5:15 pm

You should find all my code here including sources:
http://robosavvy.com/site/Builders/i-Bot/

The problems were resolved, and the C3024 unbricked. My code could be improved to check the received characters and flush the buffers to make it more robust to this problem.
You should find all my code here including sources:
http://robosavvy.com/site/Builders/i-Bot/

The problems were resolved, and the C3024 unbricked. My code could be improved to check the received characters and flush the buffers to make it more robust to this problem.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

I want to make a circuit board of mega128

Post by jeffchifu » Thu Mar 08, 2007 3:05 pm

Post by jeffchifu
Thu Mar 08, 2007 3:05 pm

Sorry,I am a beginner .I want to make a circuit board of Mega128 .I want to copy MR-C3024 bootloader in my circuit.How can I do?http://www.bascom-avr.com/shop/images/STK12864.jpg
Sorry,I am a beginner .I want to make a circuit board of Mega128 .I want to copy MR-C3024 bootloader in my circuit.How can I do?http://www.bascom-avr.com/shop/images/STK12864.jpg
jeffchifu
Robot Builder
Robot Builder
Posts: 20
Joined: Thu Mar 08, 2007 4:16 am

Post by i-Bot » Thu Mar 08, 2007 11:15 pm

Post by i-Bot
Thu Mar 08, 2007 11:15 pm

The MR-C3024 bootloader is not really very good, nor is our support for it !. We use it because it is the only option when it is preprogrammed and the ISP and JTAG are disabled on the board.

If you have a virgin Atmega128, then there are other loaders available which are better function and better supported. Or just use the ISP or JTAG.
The MR-C3024 bootloader is not really very good, nor is our support for it !. We use it because it is the only option when it is preprogrammed and the ISP and JTAG are disabled on the board.

If you have a virgin Atmega128, then there are other loaders available which are better function and better supported. Or just use the ISP or JTAG.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

I have a virgin atmega128

Post by jeffchifu » Fri Mar 09, 2007 1:21 am

Post by jeffchifu
Fri Mar 09, 2007 1:21 am

Thanks ! i-Bot,
I have a virgin atmega 128 and my circuit board is differnet.It haven't 24LC512 .Do you have circuit diagram of MR-C3024?
My circuit board is already ISP and JTAG socket to connect and I have ISP and JTAG tools.
Is it cboot.asm of bootloader file and scode.asm of 24LC512 file?
All hardware is already but I don't know how to install it :?
thanks
Thanks ! i-Bot,
I have a virgin atmega 128 and my circuit board is differnet.It haven't 24LC512 .Do you have circuit diagram of MR-C3024?
My circuit board is already ISP and JTAG socket to connect and I have ISP and JTAG tools.
Is it cboot.asm of bootloader file and scode.asm of 24LC512 file?
All hardware is already but I don't know how to install it :?
thanks
jeffchifu
Robot Builder
Robot Builder
Posts: 20
Joined: Thu Mar 08, 2007 4:16 am

Post by i-Bot » Fri Mar 09, 2007 10:28 am

Post by i-Bot
Fri Mar 09, 2007 10:28 am

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.

The circuit is here: http://robosavvy.com/site/Builders/i-Bot/c3024.pdf

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.
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.

The circuit is here: http://robosavvy.com/site/Builders/i-Bot/c3024.pdf

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

Post by jeffchifu » Fri Mar 09, 2007 2:20 pm

Post by jeffchifu
Fri Mar 09, 2007 2:20 pm

I want to use Robobasic/Roboscript code to work in my virgin Atmega128 with 24C512.Is it only to install scode.asm in atmega128 then can use Robobasic?
thanks!
I want to use Robobasic/Roboscript code to work in my virgin Atmega128 with 24C512.Is it only to install scode.asm in atmega128 then can use Robobasic?
thanks!
jeffchifu
Robot Builder
Robot Builder
Posts: 20
Joined: Thu Mar 08, 2007 4:16 am

Post by limor » Fri Mar 09, 2007 4:46 pm

Post by limor
Fri Mar 09, 2007 4:46 pm

There was talk previously on the thread (myself including) about rewriting the Robonova code and controlling the servos using the HMI protocol.
The advantage would be that the HMI would also provide position feedback and torque feedback allowing for new types of closed loop control paradigms to emerge.

Has anyone tried taking this direction?
There was talk previously on the thread (myself including) about rewriting the Robonova code and controlling the servos using the HMI protocol.
The advantage would be that the HMI would also provide position feedback and torque feedback allowing for new types of closed loop control paradigms to emerge.

Has anyone tried taking this direction?
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by Fritzoid » Fri Mar 09, 2007 9:14 pm

Post by Fritzoid
Fri Mar 09, 2007 9:14 pm

I've done some work in this direction. I've gotten my RN to do smooth PTP-like motions using the serial-mode commands by varying the speed for each servo. I'm working on a scheme to orchestrate multiple movements in sequence now. The position feedback works fine but I can't find much use for it, the servos are already correcting for errors in position.

I've also tested current and voltage feedback in real-time which may be more useful information than postion feedback for a control loop. BTW the Hitec servos don't have torque measurement that's Robotis.
I've done some work in this direction. I've gotten my RN to do smooth PTP-like motions using the serial-mode commands by varying the speed for each servo. I'm working on a scheme to orchestrate multiple movements in sequence now. The position feedback works fine but I can't find much use for it, the servos are already correcting for errors in position.

I've also tested current and voltage feedback in real-time which may be more useful information than postion feedback for a control loop. BTW the Hitec servos don't have torque measurement that's Robotis.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by jeffchifu » Sat Mar 10, 2007 2:30 pm

Post by jeffchifu
Sat Mar 10, 2007 2:30 pm

Hi i-bot,
I tried your files of scode.asm and cboot.asm but I can't succes to convert to hex files.Could you give me hex files to install my virgin ATMEGA 128 board.
thanks
Hi i-bot,
I tried your files of scode.asm and cboot.asm but I can't succes to convert to hex files.Could you give me hex files to install my virgin ATMEGA 128 board.
thanks
jeffchifu
Robot Builder
Robot Builder
Posts: 20
Joined: Thu Mar 08, 2007 4:16 am

Post by limor » Sat Mar 10, 2007 3:57 pm

Post by limor
Sat Mar 10, 2007 3:57 pm

Fritzoid wrote: BTW the Hitec servos don't have torque measurement that's Robotis.

Please share some code for doing the HMI interaction.
External torque applied to a motor and the resulting current consumption are usually approximately linearly related. So the terms torque and current load are sometimes used synonymously.

:)
Fritzoid wrote: BTW the Hitec servos don't have torque measurement that's Robotis.

Please share some code for doing the HMI interaction.
External torque applied to a motor and the resulting current consumption are usually approximately linearly related. So the terms torque and current load are sometimes used synonymously.

:)
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by i-Bot » Sun Mar 11, 2007 12:01 am

Post by i-Bot
Sun Mar 11, 2007 12:01 am

Hi Jeffchifu,
It is very easy to build the scode .asm under AVR studio to a .hex file. You should take some time to understand this process and the loading of the code, otherwise you still have problems when the isp/JTAG conflict with the used C3024 pins.

Otherwise, you could always buy a RoboNova. This is a much better alternative, lots more fun and learning.
Hi Jeffchifu,
It is very easy to build the scode .asm under AVR studio to a .hex file. You should take some time to understand this process and the loading of the code, otherwise you still have problems when the isp/JTAG conflict with the used C3024 pins.

Otherwise, you could always buy a RoboNova. This is a much better alternative, lots more fun and learning.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by Fritzoid » Tue Mar 13, 2007 3:44 pm

Post by Fritzoid
Tue Mar 13, 2007 3:44 pm

OK, I posted some code in my files area that demonstrates control of a stock Robonova using the serial HMI protocol. The program can issue serial commands to 24 servos at once and receive their responses. There's also some routines to dump portions of the RAM back over the serial connection for debugging purposes. The program is:

http://robosavvy.com/Builders/Fritzoid/SerialMove.asm

You'll also need the include file:

http://robosavvy.com/Builders/Fritzoid/iodefs.inc

The only changes you should need are to the Center_A,B,C settings which are the zero settings for your robot.
OK, I posted some code in my files area that demonstrates control of a stock Robonova using the serial HMI protocol. The program can issue serial commands to 24 servos at once and receive their responses. There's also some routines to dump portions of the RAM back over the serial connection for debugging purposes. The program is:

http://robosavvy.com/Builders/Fritzoid/SerialMove.asm

You'll also need the include file:

http://robosavvy.com/Builders/Fritzoid/iodefs.inc

The only changes you should need are to the Center_A,B,C settings which are the zero settings for your robot.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by jeffchifu » Wed Mar 14, 2007 1:54 am

Post by jeffchifu
Wed Mar 14, 2007 1:54 am

Hi Fritzoid,
I have tried i-bot scode.asm to run in my virgin ATMEGA128 but it's not successful. :cry: Is it your SerialMove.asm run in virgin ATMEGA128?
thanks
jeffchifu
Hi Fritzoid,
I have tried i-bot scode.asm to run in my virgin ATMEGA128 but it's not successful. :cry: Is it your SerialMove.asm run in virgin ATMEGA128?
thanks
jeffchifu
jeffchifu
Robot Builder
Robot Builder
Posts: 20
Joined: Thu Mar 08, 2007 4:16 am

Post by Fritzoid » Wed Mar 14, 2007 12:31 pm

Post by Fritzoid
Wed Mar 14, 2007 12:31 pm

I'm not sure what you mean by a virgin ATMEGA128, Jeffchifu. There are many reasons why scode.asm might not work for you. Scode.asm is an entire operating system that has dependencies on the external eeprom and the bootloader among other things. SerialMove is only the movement generation part and thus has fewer dependencies but its only does one action, nothing more.

I suggest you start a lot smaller. If you have a serial connection between your ATMEGA128 and your PC like the MR-C3024, then you can use the subroutines in SerialMove to print messages to your PC over that line. You can monitor this with telnet or hyperterminal. It's a crude form of debugging but it is enough to see how far you are getting in the code.
I'm not sure what you mean by a virgin ATMEGA128, Jeffchifu. There are many reasons why scode.asm might not work for you. Scode.asm is an entire operating system that has dependencies on the external eeprom and the bootloader among other things. SerialMove is only the movement generation part and thus has fewer dependencies but its only does one action, nothing more.

I suggest you start a lot smaller. If you have a serial connection between your ATMEGA128 and your PC like the MR-C3024, then you can use the subroutines in SerialMove to print messages to your PC over that line. You can monitor this with telnet or hyperterminal. It's a crude form of debugging but it is enough to see how far you are getting in the code.
Fritzoid
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 331
Joined: Mon Dec 18, 2006 1:00 am

Post by i-Bot » Wed Mar 14, 2007 2:02 pm

Post by i-Bot
Wed Mar 14, 2007 2:02 pm

Do you have the correct serial port linked to an RS232 converter, and also a 7.3728Mhz crystal ?
Do you have the correct serial port linked to an RS232 converter, and also a 7.3728Mhz crystal ?
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

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