Home \ Help \ Search \ Login RSS

Welcome, Guest. Please Login

This forum is now READ-ONLY! Please visit http://forum.wiring.co/ for the new forum.

Wiring ForumDiscussionExhibition › hexapod powered by wiring

Pages: 1 2 3 
hexapod powered by wiring (Read 94761 times)
Reply #15 - 11/27/10 at 12:08:14

mowcius   Offline
YaBB Newbies
North Yorkshire, UK

Posts: 17
*
 
Quote:
Don't worry about the 115200 it works very well at 16Mhz. I suggest you to try it. I have spaces within folders, it shouldn't be a problem.

It's about 3% error isn't it...

For just sending values to a serial monitor it's normally ok and for what you want to do it should be fine too.

I might sound like a lot of error but unless you're doing something which is very sensitive to perfect data, it will not be a problem.

Mowcius
 

IP Logged
 
Reply #16 - 11/27/10 at 15:09:24

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
well i found that radio modules i have supports up to 9600 speed, so looks like no issue with crystal.

boards are milled but it will be a challenge to solder it. i think chemical method might dive better result. but first will try with these.
 

IP Logged
 
Reply #17 - 11/27/10 at 15:51:00

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Yes, those. 7 second version waits seven seconds before jumping for the user program, very useful for boards with manual reset.
 
IP Logged
 
Reply #18 - 11/28/10 at 20:45:53

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
got some good news.
boards are created. also i make one leg for tests. have no more servos right now so it will be only one leg until whole system will be ready to run. also found one boob, on brainboard there is no power routed to max232. for now just solded two wires but in future will place updated board.

brain board
...

servo controller

...

leg

...

also have a question, for what purpose is J9 jumper which connects pin 34 and 43 of atmega?
 

IP Logged
 
Reply #19 - 11/29/10 at 00:50:40

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
those are not jumpers, just more I/O pins.
 
IP Logged
 
Reply #20 - 11/29/10 at 20:51:48

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
ok, had some struggle with running my avr doper on win7 64 bit but now looks working. tomorrow will check brain board for correct routing and powering and try to upload firmware.

Hernando did i understand well the fusebits for mega are also coded in those hex files?
 

IP Logged
 
Reply #21 - 11/29/10 at 23:09:21

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
no, you have to set the fuses yourself, there is a post about this on the forum, check it out for the right values.
 
IP Logged
 
Reply #22 - 11/30/10 at 21:15:08

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
Hernando, something is not ok. board is fine SinaProg see chip and i was able to wright fuses etc.chip find is ok, erase chip and reading fuses also ok, but when trying to program bootloader nothing happens (it using avrdude in background)

...
__________________________________________________
fuses I setup are following (found here on forum)

SPI enabled
Boot flash section size = 1024 BOOTSZ=10 start address $FC00
Boot reset vector enabled
Brown-out detection level 4.0V
Brown-out detection enabled
CKOPT fuse enabled
Ext Crystal 16K CK + 64ms

no memory or bootloader sector block, all in mode 1
max232 is out of socket, cable from programmer to chip ~1meter of UTP5 network cable. output power after 7805 is 5.05V

in meantime tried to put something to atmega8, all the same just another hex and was uploaded without any issue.
have any idea?
« Last Edit: 11/30/10 at 22:30:19 by TheZacharius »  

IP Logged
 
Reply #23 - 11/30/10 at 22:24:40

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
be careful with fuses, don't use fuses values from a different microcontroller, you might render your chip unusable.
If you use avrstudio (free to download) set fuses for the chip you have atmega128 as follows:

SPI enabled (NEVER DISABLE THIS, YOU'LL LOSE YOUR CHIP)
Boot flash section size = 1024
Boot reset vector enabled
Brown-out detection level 4.0V
Brown-out detection enabled
CKOPT fuse enabled
Ext Crystal 16K CK + 64ms

Boot loader protect mode 3.

Also there is a small tutorial here: http://wiki.wiring.org.co/index.php?title=Como_cargar_un_nuevo_atmega128_usando_ArduinoISP.pde_como_Programador_ISP_(Spanish)
 
IP Logged
 
Reply #24 - 11/30/10 at 22:32:37

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
Boot loader protect mode 3. before upload bootloader? Shocked

LOL think finally get to the point

avrdude -C avrdude.conf -c stk500v2 -P avrdoper -p m128 -U flash:w:"L:\WIRING MEGA128\firmware\7secdelay_test.hex":a -q



avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9702
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "L:\WIRING MEGA128\firmware\7secdelay_test.hex"
avrdude: input file L:\WIRING MEGA128\firmware\7secdelay_test.hex auto detected as Intel Hex
avrdude: writing flash (130572 bytes):
avrdude: 130572 bytes of flash written
avrdude: verifying flash memory against L:\WIRING MEGA128\firmware\7secdelay_test.hex:
avrdude: load data flash data from input file L:\WIRING MEGA128\firmware\7secdelay_test.hex:
avrdude: input file L:\WIRING MEGA128\firmware\7secdelay_test.hex auto detected as Intel Hex
avrdude: input file L:\WIRING MEGA128\firmware\7secdelay_test.hex contains 130572 bytes
avrdude: reading on-chip flash data:
avrdude: verifying ...
avrdude: 130572 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

ok. looks like loaded and verified ok.
fuses have like that now :

lock bits x0F
high fuse xCC
low fuse x3F
ext fuse xFF
 

IP Logged
 
Reply #25 - 12/02/10 at 00:20:05

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
Hernando i still have troubles, cant find what is wrong.
today uploaded bootloader without 7sec delay. than read flash and original hex and one from chip are different Sad

in meantime tried to load example with blinking led, no way, upload goes until avrdude timeouts. tried with usb-rs232 converter connected directly to pins 2&3 and with normal 232 port trough max232cpe. no one works on win7 neither on XP sp2. i see ISP is connected to same pins 2&3 and works.

i'm out of ideas
 

IP Logged
 
Reply #26 - 12/02/10 at 17:40:54

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
Does your board has autoreset? if not you have to press the reset button before uploading, then press reset again for your program to start. See below step 3 for this type of board. http://wiring.org.co/learning/tutorials/uploadingcode/index.html
 
IP Logged
 
Reply #27 - 12/02/10 at 19:14:57

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
schematics was taken from revision 4. i saw tutorials doesn't help. is it possible that i may be need smaller capacity on crystal? i put 22pf
 

IP Logged
 
Reply #28 - 12/02/10 at 21:01:44

barragan   Offline
YaBB Administrator

Posts: 939
*****
 
22pF are the ones used for the 16Mhz XTAl in the Wiring board. I don't think that's the problem. The pins 32 and 33 Serial RX and TX respectively are connected to MOSI and MISO in the ISP connector, the datasheet for the atmega128 is clear about those pins are the ones used for programming the bootloader for this chip (also for atmega1281 and atmega2561) Other chips use the regular MISO and MOSI respective pins for that purpose. The distributed bootloader also works on pins 32 and 33, those pins are the ones also connected to the FTDI232R chip. New code can be uploaded from Wiring if your chip Serial pins are connected right. You might be trying to upload the new program using the wrong atmega128 serial port.
 
IP Logged
 
Reply #29 - 12/02/10 at 21:59:47

TheZacharius   Offline
YaBB Newbies
Poland

Posts: 27
*
 
Hernando, do you mean bootloader awaiting data transfer on pins 32&33? now i'm confused.
wiring-Rev0004.pdf in schematic i see FTDI connected to pins 2 and 3, same as ISP. on my board have the same. to pin 33 there is LED connected. pins 27 28 of mega are uart1.
BTW same is in eagle files available in download section
 

IP Logged
 
Pages: 1 2 3