go_away

Author Topic: $50 Robot Atmega 328 and the AVRISP MkII  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
$50 Robot Atmega 328 and the AVRISP MkII
« on: October 19, 2011, 01:47:33 PM »
Hi all,

I was working in my lab today on trying to get my servo zeroed out so I can finish the mod on it. I figured I would use the board  I made from the microcontroller tutorial for this to see if it worked or not. It passed the smoke test from the tutorial and all pins check out fine. I dropped in an atmega 328 instead of using the atmega 8 specified by the tutorial. I hope it is a viable replacement for the atmega 8 's wiring diagram lol. My thinking was that I can't very well upload the full $50 photivore.hex file since I have no bot to use it yet so I figured I would use the hold_servo.hex file to check the controller. Anyway I installed the newest version of avrdude and hooked up my new avrisp mk II to it and then to the micro and its board. I powered the board up and I get two green lights on the programmer. When I try uploading the .hex I get this.


donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics/Atmega_8/Programs$ sudo avrdude -c avrispmkII -p m328p -P usb -B 200000 -U hold_servo.hex
avrdude: stk500v2_recv_mk2: error in USB receive

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 2.08s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


__________________________________________________________________________________________________

I ran the -vvvv and got the following:


avrdude: Version 5.10, compiled on Jun 29 2010 at 21:09:48
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/donald/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : avrispmkII
         Setting bit clk period        : 200000.0
avrdude: usbdev_open(): Found AVRISP mkII, serno: 000200105413
avrdude: usbdev_open(): using read endpoint 0x82
avrdude: Sent: . [01]
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32]
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
Using p = inf us for SCK (param = 164)
avrdude: Sent: . [03] . [98]
avrdude: Recv: . [03] . [00] . [a4]
avrdude: Skipping paramter write; parameter value already set.
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel AVR ISP mkII
         Programmer Model: AVRISP mkII
avrdude: Sent: . [03] . [90]
avrdude: Recv: . [03] . [00] . [01]
avrdude: Sent: . [03] . [91]
avrdude: Recv: . [03] . [00] . [01]
avrdude: Sent: . [03] . [92]
avrdude: Recv: . [03] . [00] . [0a]
         Hardware Version: 1
         Firmware Version Master : 1.10
avrdude: Sent: . [03] . [94]
avrdude: Recv: . [03] . [00] 0 [30]
         Vtarget         : 4.8 V
avrdude: Sent: . [03] . [98]
avrdude: Recv: . [03] . [00] . [a4]
         SCK period      : inf us

avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00]
avrdude: usbdev_recv_frame(): usb_bulk_read(): No error
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: Sent: . [01]
avrdude: usbdev_recv_frame(): usb_bulk_read(): No error
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: Sent: . [01]
avrdude: Recv: . [10] . [c0]
avrdude: Sent: . [01]
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32]
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
avrdude: AVR device initialized and ready to accept instructions

Reading |                                                    | 0% 0.00savrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [01] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
Reading | #################                                  | 33% 1.39savrdude: Sent: . [1d] . [04] . [04] . [00] 0 [30] . [00] . [02] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
Reading | ################################################## | 100% 2.08s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, hfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, hfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, hfuse value: ff
avrdude: safemode: hfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, efuse value: 7
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, efuse value: 7
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, efuse value: 7
avrdude: safemode: efuse reads as 7
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fc] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fd] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [fe] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: Sent: . [1d] . [04] . [04] . [00] . [a0] . [03] . [ff] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: erasing chip
avrdude: Sent: . [12] . [09] . [00] . [ac] . [9f] . [7f] . [00]
avrdude: Recv: . [12] . [00]
avrdude: Sent: . [10] . [c8] d [64] . [19]   [20] . [00] S [53] . [03] . [ac] S [53] . [00] . [00]
avrdude: usbdev_recv_frame(): usb_bulk_read(): No error
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: Sent: . [01]
avrdude: usbdev_recv_frame(): usb_bulk_read(): No error
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: Sent: . [01]
avrdude: Recv: . [10] . [c0]
avrdude: Sent: . [01]
avrdude: Recv: . [01] . [00] . [0a] A [41] V [56] R [52] I [49] S [53] P [50] _ [5f] M [4d] K [4b] 2 [32]
avrdude: stk500v2_getsync(): found AVRISP mkII programmer
avrdude: reading input file "hold_servo.hex"
avrdude: error opening hold_servo.hex: No such file or directory
avrdude: input file hold_servo.hex auto detected as invalid format
avrdude: can't open input file hold_servo.hex: No such file or directory
avrdude: write to file 'hold_servo.hex' failed

avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, lfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [00] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, lfuse value: ff
avrdude: safemode: lfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, hfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, hfuse value: ff
avrdude: Sent: . [1d] . [04] . [04] . [00] X [58] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, hfuse value: ff
avrdude: safemode: hfuse reads as FF
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 1, efuse value: 7
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 2, efuse value: 7
avrdude: Sent: . [1d] . [04] . [04] . [00] P [50] . [08] . [00] . [00]
avrdude: Recv: . [1d] . [00] . [ff] . [ff] . [ff] . [ff] . [00]
avrdude: safemode read 3, efuse value: 7
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK
avrdude: Sent: . [11] . [01] . [01]
avrdude: Recv: . [11] . [00]

avrdude done.  Thank you.

-I think there is some error with the USB port or driver or something.
-My system is a Lenovo x200 Tablet running Ubuntu 11.4 with a dual boot to Win 7 Home Pro.
-I have a Axon that have yet to use that I was thinking of hooking up to get the servo zeroed out but I wanted to test the            SoR tutorial one 1st. Should I try the Axon to srule out the ISP and the computer software / drivers ?



Thanks ,
sorry for the wall of text
-Don

« Last Edit: October 20, 2011, 12:46:23 PM by Silver_79 »
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #1 on: October 19, 2011, 04:14:29 PM »
I'm just guessing, but you might try it without the -B 200000.

If you don't get an answer here, try posting this on avrfreaks.net, Joerg Wunsch hangs out there at times.

Joe

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #2 on: October 20, 2011, 12:48:26 PM »

__________________________________Update****  Update****_________________________________________________

I got the thing to start an upload to the board today here is what its currently doing:


donald@donald-ThinkPad-X200-Tablet:~$ sudo avrdude -c avrispmkII -p m328p -P usb :3 -F  -U hold_servo.hex
[sudo] password for donald:

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 2.08s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
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: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: reading input file "hold_servo.hex"
avrdude: error opening hold_servo.hex: No such file or directory
avrdude: input file hold_servo.hex auto detected as invalid format
avrdude: can't open input file hold_servo.hex: No such file or directory
avrdude: write to file 'hold_servo.hex' failed

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

donald@donald-ThinkPad-X200-Tablet:~$ cd Documents
donald@donald-ThinkPad-X200-Tablet:~/Documents$ cd robtics
bash: cd: robtics: No such file or directory
donald@donald-ThinkPad-X200-Tablet:~/Documents$ dir
Eagle\ Cad\ Activation\ Files  libsub  Programming  Robtics
donald@donald-ThinkPad-X200-Tablet:~/Documents$ cd Robtics
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics$ dir
Atmega_8
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics$ cd Atmega_8
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics/Atmega_8$ dir
Programs
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics/Atmega_8$ cd Programs
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics/Atmega_8/Programs$ dir
hold_servo  hold_servo.hex
donald@donald-ThinkPad-X200-Tablet:~/Documents/Robtics/Atmega_8/Programs$ sudo avrdude -c avrispmkII -p m328p -P usb :3 -F  -U hold_servo.hex

avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 2.08s

avrdude: Device signature = 0xffffff
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATMEGA328P is 1E 95 0F
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: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: reading input file "hold_servo.hex"
avrdude: input file hold_servo.hex auto detected as Intel Hex
avrdude: writing flash (2158 bytes):

Writing |                                                    | 0% 0.00savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ###                                                | 5% 89.03savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ######                                             | 11% 178.76savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | #########                                          | 17% 268.48savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ############                                       | 23% 358.20savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ###############                                    | 29% 447.92savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ##################                                 | 35% 537.64savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | #####################                              | 41% 627.36savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ########################                           | 47% 717.08savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ###########################                        | 53% 806.80savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ##############################                     | 59% 896.52savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | #################################                  | 65% 986.24savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ####################################               | 71% 1075.97savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | #######################################            | 77% 1165.69savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ##########################################         | 83% 1255.41savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ############################################       | 88% 1345.13savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ###############################################    | 94% 1434.85savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
Writing | ################################################## | 100% 1512.15s

avrdude: 2158 bytes of flash written
avrdude: verifying flash memory against hold_servo.hex:
avrdude: load data flash data from input file hold_servo.hex:
avrdude: input file hold_servo.hex auto detected as Intel Hex
avrdude: input file hold_servo.hex contains 2158 bytes
avrdude: reading on-chip flash data:

Reading |                                                    | 0% 0.00savrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: stk500v2_recv_mk2: error in USB receive
*** stack smashing detected ***: avrdude terminated

      I had the servo connected and it didn't zero out so guess that is a fail :P I can't seem to figure out what is causing the USB receive error though as google searches have brought me nothing so far. the led on my controllers board isn't lighting up when the programmers changes to program mode though so maybe my resistor is to large. It is a 1K ohm. Any help would be cool.

Thanks,
-Don
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline Neogs Red

  • Jr. Member
  • **
  • Posts: 16
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #3 on: October 21, 2011, 12:34:59 AM »
does AVR dude use a makefile? I would check that out to see if it uploads that way. I use Atmel's ladybug compiler thingy (its late and don't want to turn on my other comp  :P ) and uploaded the $50 robot zero center hex file with that. Afterwards I zeroed the servos with a pair of needle nose pliers while they were all apart.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16

Offline adanvasco

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #5 on: October 21, 2011, 06:33:41 PM »
What Atmega328 do you have? Avrdude it's not compatible with the 328, only with the 328p.
Knowledge does not weigh.

Offline joe61

  • Supreme Robot
  • *****
  • Posts: 417
  • Helpful? 16
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #6 on: October 22, 2011, 04:41:03 AM »
What Atmega328 do you have? Avrdude it's not compatible with the 328, only with the 328p.
That's true as it comes, but it's easy to add the 328. Just copy the section of the config file for 328p and remove the 'p' from the identifiers. Then change the signature bytes and program away.

Works for me anyway.

Joe
« Last Edit: October 22, 2011, 04:45:45 AM by joe61 »

Offline adanvasco

  • Full Member
  • ***
  • Posts: 107
  • Helpful? 6
  • Necessity is the mother of invention.
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #7 on: October 22, 2011, 01:40:09 PM »
Thanks for the tip. I'll try that later on.
Knowledge does not weigh.

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #8 on: October 22, 2011, 11:02:13 PM »
Its a 328p. The tutorial with the atmega8 micro controller is compatible with the 328p right ? I was looking at the chip data sheet today and it looks like the family of chips that the 328p belongs to have a diff. pin out than the atmega8. The Vcc and grounds don't look like they match what the tutorials had but it was getting late and I was tired so gonna look again tomorrow lol. 
 
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #9 on: October 23, 2011, 03:57:21 PM »
      OK, here is an update, I can't get the $50 robot MCU to work keep getting that receive USB error in Linux and some different errors in AVR Studios. The Axon zeroed out the servos using AVR Studios no prob after hooking it up to check the software. Going to try to download a program to the Axon it in Linux as well and if that works than the prob is definitely in the $50 MCU board somewhere. Thanks for the input so far and have a good Sunday.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #10 on: October 23, 2011, 04:18:25 PM »
      UPDATE: OK, I completed sending the hex file hold_servo.hex to the Axon in both Ubuntu 11.10 with Avrdude and through Windows 7 using AVR Studios 4. Since the servos have been modded they just spin round and round in one direction once I upload the program in either UI. So the problem is in the way I wired the board on the $50 MCU. I do have a question though. I used the PDF to connect up the circuit board to the MCU and I just dropped a Atmega 328p in for the chip they had in the PDF document. Is this compatible with the $50 MCU board ? I went over it several times and all the connections looked good. I did forget to connect up the ceramic cap but I figured it wouldn't keep the board from programming so I held off on it till I get her up and running. Also the programmer had, at one time, shown the presence of a short (red blinking led) could this have killed the chip?

Notes: My led on the $50 robot board only lights up when a servo is placed on the connection right next to the resistor, any other connection causes the light to stay off and it never comes on during a programming attempt at all.

Thanks ,
-Don 
« Last Edit: October 23, 2011, 04:38:02 PM by Silver_79 »
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 289
  • Helpful? 10
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #11 on: October 23, 2011, 05:11:32 PM »
If the servo's spin continually while the servo hold program is running the servos are not modified correctly.

Conscripted

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 147
  • Helpful? 6
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #12 on: October 23, 2011, 09:39:10 PM »
Also the programmer had, at one time, shown the presence of a short (red blinking led) could this have killed the chip?
It could have, yes.

Here's what I recommend you do if you haven't already:
Power up the board with the Atmega pulled out.  Get out your multimeter and connect the negative side of it to GND somewhere on your board.  Now with the other side of your multimeter, touch pin 7.  You should get +5V.  Remember the pins start at the top left of the chip and go counterclockwise around the board.  The bottom right should be pin 15.  Now touch pins 20 and 21.  They should also be +5V.  Touch pin 8.  It should be 0V.  Touch pin 22.  It should also be 0V.

Now switch your multimeter to continuity mode.  With the negative side of the meter still connected to GND, check pins 8 and 22.  They should both have continuity to GND.  Check every other pin, especially pins 1, 7, 20, and 21.  None of them should have continuity to GND.

Now disconnect the negative side of your meter from GND and connect it to the positive side of your power bus.  Check continuity with pins 7, 20, and 21.  They should all have continuity with the positive power bus.  Check all the other pins, especially pins 8 and 22.  None of them should have continuity to the positive side of the power bus.

If all of this comes out correct then your board is wired up correctly.

Let me know if there is any specific part that you need clarification on.

Side note on the LED: Admin made a mistake on this part of the tutorial when he was writing it.  He instructs you to install the LED backwards.  So don't be surprised if your LED acts weird =)

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #13 on: October 24, 2011, 02:04:00 PM »
If the servo's spin continually while the servo hold program is running the servos are not modified correctly.

Conscripted

OK, this is weird to me. If I was modding a servo for continuous rotation and wired up a new servo with the Axon. Loaded the hold_servo.hex program through said Axon MCU and zeroed out the servo. Stopped the program, then modified said servo (Took out stop pin & Glued the pot). Once I ran the program again with the modified servo wouldn't it rotate continuously since it thinks the pot is always in the same place and the pot can't move since its glued in place for that purpose. Furthermore isn't that what I wanted was continuous rotation in the first place ? The program loaded with an unmodified servo causes the servo to twitch back and fourth in a very small range, which I assumed was center or zero for the servo. Hence, after the mod I assumed the procedure was good since the servo seemed to continuously try and "zero" itself with the program.

Thanks,
-Don
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline Conscripted

  • Robot Overlord
  • ****
  • Posts: 289
  • Helpful? 10
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #14 on: October 24, 2011, 03:44:15 PM »
When the servo is correctly adjusted it should stop when told to center. Any other value will cause it to move clockwise or counter clockwise. When you glue the pot to the "Center" position and then tell it to go to any other angle it will start to move and never get the feedback it expects. That is why it will continue to seek (continuously turn) the angle you asked for.

I have always glued the pot with the program still running and the servo not moving to make sure I get the pot in the position i wanted.

Conscripted

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #15 on: October 24, 2011, 10:07:35 PM »
Also the programmer had, at one time, shown the presence of a short (red blinking led) could this have killed the chip?
It could have, yes.

Here's what I recommend you do if you haven't already...............


      Thanks for the heads up I checked the voltages one more time and ran the continuity check for the first time and all checked out according to yours pin-outs and Atmel's data sheets. It must be the chip is fried, any way I can check this to be 100% or is it just get a new one and see if its good ?


Thanks Tons
-Don
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

Offline VegaObscura

  • Robot Overlord
  • ****
  • Posts: 147
  • Helpful? 6
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #16 on: October 25, 2011, 12:01:12 PM »
I was looking through your posts again and noticed you didn't mention anything about changing the source code files to accommodate for your 328p instead of the atmega8.  I don't know if you did this already and just didn't mention it or if you were not aware that it is necessary.  Make sure you make all the necessary changes for your atmega328 listed here.  Most of that page was written for the atmega168, but it does mention the 328p.

Try uploading your code from a windows machine.  I agree that linux tends to be the better operating system and I'm typing on it right now, but I recommend you get your project working with windows first and then make the switch.

If you have already made the changes in the source code for your chip, and you get the same problems when programming from a windows machine, then yes go ahead and replace the chip.  And try to buy at least a couple of extras.  Not only is it possible to brick them on occasion with bad programming/fuses, but they also have fragile pins which will break once in a while.

Offline Silver_79Topic starter

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: $50 Robot Atmega 328 and the AVRISP MkII
« Reply #17 on: October 25, 2011, 01:04:19 PM »
I was looking through your posts again and noticed you didn't mention anything about changing the source code files to accommodate for your 328p instead of the atmega8. 

Try uploading your code from a windows machine.  I agree that linux tends to be the better operating system and I'm typing on it right now, but I recommend you get your project working with windows first and then make the switch.

I made the changes that you have listed here before so its all good on that front. I successfully programmed the Axon I have in both UIs, Linux (with avrdude) and Windows 7 64 bit (with win-avr 4.XX) I get some sort off error in win avr but since I am unfamiliar with its bloated crap interface I have no idea what that would be.

-If I try and upload the :

C:\My_Robots\Photovore_v1\Photovore_v1.hex

I get a pop-up window titled "ISP Mode Error" , which is odd since this program uploads fine to the Axon so it can't to my knowledge be the ISP.

-Under messages I get:

Loaded plugin STK500
gcc plug-in: No AVR Toolchain installation found. The AVR GCC plug-in can still be used if you set up your own build tools.
Loaded plugin AVR GCC
Loaded partfile: C:\Program Files (x86)\Atmel\AVR Tools\PartDescriptionFiles\
Error Code: -2147467259:

**Note the ISP freq. I set was 2MHz.
**Also note that I have no desire what so ever to use Win AVR studios 4.XX , 5.XX or any other windows based C and C++ development tools ever. I was hoping to use avrdude.


** BTW I noticed that pin six on the check you had me do has a voltage of about 3V on it when powered up with no chip and nothing else. everything else checks out fine. I guess this would seem logical since the resistor is connected to the header pin connected to the socket for that pin in the tutorial.
I shall be telling this with a sigh
Somewhere ages and ages hence:
Two roads diverged in a wood, and I
I took the one less traveled by,
And that has made all the difference.

-Robert Lee Frost-

 


Get Your Ad Here