Re: Program ATTiny 4313 w/ISP Shield?

#20992
craiglindley
Participant

OK. I bought and built the ispShield and the 2313 target board. On the target board I installed a 6 pin ISP header with the leads facing upward and a 20 pin ZIF socket. I put positioned the jumpers to disable autoreset and to provide target power.

I then connected the boards with your 6 pin cable. On the ispShield I oriented the ribbon cable connector with the red stripe connected to the triangle on the board. However on the target board the red stripe is opposite the triangle on the board. Is that correct or should the ISP header be installed on the bottom of the target board?

I put the attiny4313 into the ZIF socket on the target board.

I brought up the Arduino IDE and selected an Arduino Uno as the board then loaded and uploaded the ArduinoISP sketch. The pulse LED then cycles.

I then ran avrdude with the following command line on my Mac:
avrdude -c arduino -p t4313 -P /dev/tty.usbmodem1411 -F -U flash:w:TinyMatrix.hex:i

I have to use the -F switch because the device signatures don’t match. The signature returned is for the atmega 328 in the UNO I think.

Here is the result:

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: Expected signature for ATtiny4313 is 1E 92 0D
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 “TinyMatrix.hex”
avrdude: writing flash (2016 bytes):

Writing | ################################################## | 100% 0.52s

avrdude: 2016 bytes of flash written
avrdude: verifying flash memory against TinyMatrix.hex:
avrdude: load data flash data from input file TinyMatrix.hex:
avrdude: input file TinyMatrix.hex contains 2016 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.39s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0000
         0x4c != 0x00
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK

avrdude done.  Thank you.

It looks like the code is not being programmed.

Any idea what is going on?

One other thing, when I load the sketch the pulse LED flashes until I try to program the device and then it goes off and stays off. The Prog LED never flashes.