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

Post by i-Bot » Mon Dec 31, 2007 3:28 am

Post by i-Bot
Mon Dec 31, 2007 3:28 am

That is probably because you have the scode in flash, but not the bootloader. The scode checks for the bootloader to be present or will not run Robobasic programs.

You need to either install the bootloader. Either first install the bootloader, then load the scode with Roboflash, or make an assembler file which has both scode located at 0000, and also the cboot code located at 0F00.


Or modify the scode.asm file so the subroutine at location sub00D4 always sets bit 7 of location 0x512 ( maybe replace the instruction at 00D4 with an RJMP to 00F7). It only does this on initialisation).
That is probably because you have the scode in flash, but not the bootloader. The scode checks for the bootloader to be present or will not run Robobasic programs.

You need to either install the bootloader. Either first install the bootloader, then load the scode with Roboflash, or make an assembler file which has both scode located at 0000, and also the cboot code located at 0F00.


Or modify the scode.asm file so the subroutine at location sub00D4 always sets bit 7 of location 0x512 ( maybe replace the instruction at 00D4 with an RJMP to 00F7). It only does this on initialisation).
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by ayu » Wed Jan 02, 2008 3:55 pm

Post by ayu
Wed Jan 02, 2008 3:55 pm

Hi all,

Copy problem was done.

Such a stupid guestion,

Now Piezo cannt play :?: IR remote's two wires,how to connected??one connects onto AD7,where the other to connected ?? :oops:

Thank your any reply. :)
Hi all,

Copy problem was done.

Such a stupid guestion,

Now Piezo cannt play :?: IR remote's two wires,how to connected??one connects onto AD7,where the other to connected ?? :oops:

Thank your any reply. :)
ayu
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by i-Bot » Wed Jan 02, 2008 4:08 pm

Post by i-Bot
Wed Jan 02, 2008 4:08 pm

I think the buzzer is magnetic, not piezo. mine measures about 42 ohms. I will check the pins again too.

I did make a change also to the schematic in my file area because the ERX and ETX were swapped.

The IR remote receiver has 3 pins. AD7, GND and +5V. I did not look inside the heatshrink on the receiver. there may be some decoupling capacitor on the GND and +5V.
I think the buzzer is magnetic, not piezo. mine measures about 42 ohms. I will check the pins again too.

I did make a change also to the schematic in my file area because the ERX and ETX were swapped.

The IR remote receiver has 3 pins. AD7, GND and +5V. I did not look inside the heatshrink on the receiver. there may be some decoupling capacitor on the GND and +5V.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by ayu » Fri Jan 04, 2008 3:10 am

Post by ayu
Fri Jan 04, 2008 3:10 am

Hi again,

The IR remote and Piezo tests were OK, I used the TP-010S 8ohms 0.4W's speaker to instead of the piezo,its big than piezo,but sound good. :)

Now,the other guestions are :

1)What the IR emitting signal ??

2)Can we change the IR remote into wireless remote??

maybe discussed somewhere before ? if you can help,there were appreciated.Thanks a lot.
Hi again,

The IR remote and Piezo tests were OK, I used the TP-010S 8ohms 0.4W's speaker to instead of the piezo,its big than piezo,but sound good. :)

Now,the other guestions are :

1)What the IR emitting signal ??

2)Can we change the IR remote into wireless remote??

maybe discussed somewhere before ? if you can help,there were appreciated.Thanks a lot.
Last edited by ayu on Fri Jan 04, 2008 3:34 pm, edited 1 time in total.
ayu
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by i-Bot » Fri Jan 04, 2008 7:53 am

Post by i-Bot
Fri Jan 04, 2008 7:53 am

I would suggest the 8 ohm speaker is too low resistance. The current out of the AtMega pins is 40mA max. This would mean a 100 ohm speaker. Even Hitec at 42 ohms looks a bit low. An 100 ohm resistor in series with the speaker would limit current, but you loose a lot of the power in the resistor, so it may be too quiet.

I did not check the format of the remote and whether is conforms to a standard (Sony, Panasonic). It will be on a IR carrier around 40KHz, and be a pulse train.

For a wireless alternative the most common is bluetooth, or you might try my PS2 remote:
http://robosavvy.com/Builders/i-Bot/Rob ... roller.pdf
I would suggest the 8 ohm speaker is too low resistance. The current out of the AtMega pins is 40mA max. This would mean a 100 ohm speaker. Even Hitec at 42 ohms looks a bit low. An 100 ohm resistor in series with the speaker would limit current, but you loose a lot of the power in the resistor, so it may be too quiet.

I did not check the format of the remote and whether is conforms to a standard (Sony, Panasonic). It will be on a IR carrier around 40KHz, and be a pulse train.

For a wireless alternative the most common is bluetooth, or you might try my PS2 remote:
http://robosavvy.com/Builders/i-Bot/Rob ... roller.pdf
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by ayu » Fri Jan 04, 2008 4:24 pm

Post by ayu
Fri Jan 04, 2008 4:24 pm

Hi, all

Had changed to Piezo.I'll solder the board and many thanks for your help,Without your help that's not done so quickly.

Can we know the details about the Robobasic's program by VB6 or other programs ??
Hi, all

Had changed to Piezo.I'll solder the board and many thanks for your help,Without your help that's not done so quickly.

Can we know the details about the Robobasic's program by VB6 or other programs ??
ayu
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by ayu » Sun Jan 06, 2008 1:03 am

Post by ayu
Sun Jan 06, 2008 1:03 am

Had soldered.

Image
Had soldered.

Image
ayu
Savvy Roboteer
Savvy Roboteer
Posts: 39
Joined: Wed Sep 26, 2007 3:28 pm

Post by stuuk » Wed May 07, 2008 11:29 am

Post by stuuk
Wed May 07, 2008 11:29 am

Hi Guys

I've ordered all the parts to make C3024

Pio

On your last posts you seem to have had problems loading the firmware, did you resolve this?
If so what was the problem?

Also you said you smoked a Atmega128 because you didn't ground pin 63.
Pin 63 is grounded on the shematic i have so was this a mistake on your part or did you have a different schematic?

Anyone

How complete does the c3024 circuit have to be to start programming it with the correct firmware and bootloader.

I'll be using a parallel ISP programmer so will only be using MOSI, MISO, LED, SCK, RST on the Atmega.

Aside from the power circuit, crystal circuit and eeprom circuit what else needs to be in place?

Thanks

Stu
Hi Guys

I've ordered all the parts to make C3024

Pio

On your last posts you seem to have had problems loading the firmware, did you resolve this?
If so what was the problem?

Also you said you smoked a Atmega128 because you didn't ground pin 63.
Pin 63 is grounded on the shematic i have so was this a mistake on your part or did you have a different schematic?

Anyone

How complete does the c3024 circuit have to be to start programming it with the correct firmware and bootloader.

I'll be using a parallel ISP programmer so will only be using MOSI, MISO, LED, SCK, RST on the Atmega.

Aside from the power circuit, crystal circuit and eeprom circuit what else needs to be in place?

Thanks

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

Post by i-Bot » Wed May 07, 2008 1:39 pm

Post by i-Bot
Wed May 07, 2008 1:39 pm

I corrected the diagram in my file area based on the feedback from pio.

To program the ATMega you will need the power, the programming connections and the crystal circuit.

Obviously you will need the serial interface to connect to the PC, and then the I/O pins to do something.

If you want to run robobasic programs the EEPROM must be connected, because this is where they are stored. The bootloader must also be present for Robobasic programs to run.
I corrected the diagram in my file area based on the feedback from pio.

To program the ATMega you will need the power, the programming connections and the crystal circuit.

Obviously you will need the serial interface to connect to the PC, and then the I/O pins to do something.

If you want to run robobasic programs the EEPROM must be connected, because this is where they are stored. The bootloader must also be present for Robobasic programs to run.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

Post by stuuk » Wed May 07, 2008 4:10 pm

Post by stuuk
Wed May 07, 2008 4:10 pm

Hi i-bot

Thanks for that.

Yeah i'll need the serial interface working to check it is working. :idea:

I plan to initially do the minimum necessary to get the controller programmed and talking to robobasic.

I don't fancy soldering 40 odd point to point wires for all the i/o only to find it doesn't work :)

If I start by keeping it simple and it doesn't work hopefully it will be easier to fault find.

cheers
Hi i-bot

Thanks for that.

Yeah i'll need the serial interface working to check it is working. :idea:

I plan to initially do the minimum necessary to get the controller programmed and talking to robobasic.

I don't fancy soldering 40 odd point to point wires for all the i/o only to find it doesn't work :)

If I start by keeping it simple and it doesn't work hopefully it will be easier to fault find.

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

need some quick help!!!

Post by stuuk » Sat May 10, 2008 12:30 pm

Post by stuuk
Sat May 10, 2008 12:30 pm

Hi All

I'm almost ready to program the atmega.
On Pio's connection diagram below between the atmega and the isp programmer he shows MOSI going to pin 2 and MISO to pin 3 on the atmega

Shouldn't this be 12 and 13 and not 2 and 3?

Thanks

Stu

Image
Hi All

I'm almost ready to program the atmega.
On Pio's connection diagram below between the atmega and the isp programmer he shows MOSI going to pin 2 and MISO to pin 3 on the atmega

Shouldn't this be 12 and 13 and not 2 and 3?

Thanks

Stu

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

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

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

You need the ATMega 128 datasheet from Atmel website. It states:
"Even though the SPI Programming interface re-uses the SPI I/O module, there is one important difference: The MOSI/MISO pins that are mapped to PB2 and PB3 in the SPI I/O module are not used in the Programming interface. Instead, PE0 and PE1 are used for data in SPI Programming mode as shown in Table 127."
You need the ATMega 128 datasheet from Atmel website. It states:
"Even though the SPI Programming interface re-uses the SPI I/O module, there is one important difference: The MOSI/MISO pins that are mapped to PB2 and PB3 in the SPI I/O module are not used in the Programming interface. Instead, PE0 and PE1 are used for data in SPI Programming mode as shown in Table 127."
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 12:47 pm

Post by stuuk
Sat May 10, 2008 12:47 pm

So if using an ISPdongle the correct pins are 2&3 ?

Is this correct?

Thanks
So if using an ISPdongle the correct pins are 2&3 ?

Is this correct?

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

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

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

Yes, pins 2 and 3 should be used.

I have not used an parallel dongle. I have had so many problems with parallel port devices on different OS, I tend to avoid them now. I use a JTAG ICE on USB normally, or sometimes an SP Duo on serial.
Yes, pins 2 and 3 should be used.

I have not used an parallel dongle. I have had so many problems with parallel port devices on different OS, I tend to avoid them now. I use a JTAG ICE on USB normally, or sometimes an SP Duo on serial.
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 9:00 pm

Post by stuuk
Sat May 10, 2008 9:00 pm

Hi i-Bot or anyone who is looking

i seem to have had some success

i uploaded the cboot.hex as program flash in ponyprog and it wrote successfully

I then set the fuse bits , successfull

I guess roboflash needs the standard serial interface to load payload.bin?
(i'm just adding the serial circuit now)

My main question is when i loaded cboot.hex in ponyprog it just seems to be full of FF's is this correct?

Thanks
Hi i-Bot or anyone who is looking

i seem to have had some success

i uploaded the cboot.hex as program flash in ponyprog and it wrote successfully

I then set the fuse bits , successfull

I guess roboflash needs the standard serial interface to load payload.bin?
(i'm just adding the serial circuit now)

My main question is when i loaded cboot.hex in ponyprog it just seems to be full of FF's is this correct?

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

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