Has anyone succeeded in using the emulated SPI code to run the AVR-ISP program in the arduino examples directory on a teensy 3?
I'm trying to program a ATMEGA328P-PU and I'm getting the following:
I've made some slight changes to the programmer source (attached) mostly just to move the SCK to pin 14 so I can see the LED blink.
Connections are as follows:
Teensy ATMEGA
5V <-> 7,20,21
GND <-> 8,22
11 (DO) <-> 17
12 (DI) <-> 18
14 (SCK) <-> 19
I've tried using 3.3V as well, but I think because I'm using a 16Mhz oscillator that I need 5V. Right? Maybe I need a resistor on DI? I'm really unfamiliar with AVR. Is there some way I can verify the connections? I haven't connected reset. I assume this is equivalent to powercycling the chip? Or is it needed for programming?
This is probably something dumb I'm doing...
Thanks for any suggestions,
-c
I'm trying to program a ATMEGA328P-PU and I'm getting the following:
Code:
> /usr/local/CrossPack-AVR/bin/avrdude -c arduino -p m328p -P /dev/tty.usbmodem12341 -b 19200
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10
avrdude done. Thank you.
I've made some slight changes to the programmer source (attached) mostly just to move the SCK to pin 14 so I can see the LED blink.
Connections are as follows:
Teensy ATMEGA
5V <-> 7,20,21
GND <-> 8,22
11 (DO) <-> 17
12 (DI) <-> 18
14 (SCK) <-> 19
I've tried using 3.3V as well, but I think because I'm using a 16Mhz oscillator that I need 5V. Right? Maybe I need a resistor on DI? I'm really unfamiliar with AVR. Is there some way I can verify the connections? I haven't connected reset. I assume this is equivalent to powercycling the chip? Or is it needed for programming?
This is probably something dumb I'm doing...
Thanks for any suggestions,
-c