Problem with AVRISP when programming an ATMEGA88PV

65 views
Skip to first unread message

Thiago

unread,
Dec 16, 2009, 9:19:11 AM12/16/09
to Micropendous
> I made a micropendous1 and have been problems with AVRISP firmware. I have
> connected all of those pins properly. The programmer (at90usb162) seems
> working good. But I can't have the communication over the target that is an
> atmega88PV. I have no idea what to do more.

What I did.

First I compiled and download AVRISP to micropendous1 (at90usb162)

../AVRISP# make clean
../AVRISP# make

--------- Target Information ---------
AVR Model: at90usb162
Board: USER
Clock: 8000000Hz CPU, 8000000Hz Master
--------------------------------------

Size after:
AVR Memory Usage
----------------
Device: at90usb162

Program: 5310 bytes (32.4% Full)
(.text + .data + .bootloader)

Data: 65 bytes (12.7% Full)
(.data + .bss + .noinit)

EEPROM: 1 bytes (0.2% Full)
(.eeprom)


../AVRISP# dfu-programmer at90usb162 flash AVRISP.hex

Validating...
5310 bytes used (32.41%)

reset the device

../AVRISP# lsusb

Bus 005 Device 004: ID 03eb:2104 Atmel Corp. AVR ISP mkII


Okay! To program a device like as an ATMEGA88PV with the following
commands

avr-gcc -g -mcall-prologues -Os -Wall -mmcu=atmega88 trab.c -o trab.o
avr-objcopy -j .text -j .data -O ihex trab.o trab.hex
avrdude -vv -F -P usb -c avrispmkII -B 2 -p m88 -U flash:w:trab.hex

I got:

avrdude: Version 5.8, compiled on Jul 20 2009 at 14:56:17
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 "/root/.avrduderc"
User configuration file does not exist or is not a regular
file, skipping

Using Port : usb
Using Programmer : avrispmkII
Setting bit clk period : 2.0
avrdude: usbdev_open(): Found LUFA AVRISP MkII Clone Programmer,
serno: 0000A00128255
avrdude: usbdev_open(): using read endpoint 0x82
AVR Part : ATMEGA88
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 512 4
0 3600 3600 0xff 0xff
flash 65 6 64 0 yes 8192 64
128 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0
0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0
0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0
0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0
0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0
0 0 0 0x00 0x00
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
Hardware Version: 0
Firmware Version Master : 1.12
Vtarget : 5.0 V
SCK period : 2.00 us

avrdude: stk500v2_command(): command failed
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA88 is 1E 93 0A
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be
performed
To disable this feature, specify the -D option.

avrdude done. Thank you.


And the schematic is:

http://groups.google.com/group/micropendous/web/schematic1.jpg
http://groups.google.com/group/micropendous/web/schematic2.jpg

Opendous Support

unread,
Dec 16, 2009, 12:04:03 PM12/16/09
to Micropendous
I am not sure why you are using the bitclock option (-B 2) as the
AVRISP firmware does not support it.

The 0x000000 received signature means there is a communication
failure.

Are you sure the Atmega88PV supports ISP Programming? I looked at the
datasheet and it does not mention "In-System-Programmable via SPI".
It only mentions Bootloader (UART) and DebugWire (which is a
proprietary Atmel protocol and requires an Atmel AVR Dragon ($50USD)
or JTAG ICE mkII($300USD)).

The closest AVR with ISP is the ATtiny88.

Also, you have not connected GND (Pin-8). You only connected GND
(Pin-22). Wiring looks correct otherwise.

Check the wiring of your Micropendous. Load it with
MicropendousKeyboardTest firmware and GND the IO pins one by one to
make sure there are no joined traces or shorts to GND. GND'ing a pin
should only type its name once.

If your AVR supports ISP please post the output of the following
command which just gets the signature of the device:
avrdude -vv -F -P usb -c avrispmkII -p m88
> Copyright (c) 2000-2005 Brian Dean,http://www.bdmicro.com/

Opendous Support

unread,
Dec 19, 2009, 6:05:52 PM12/19/09
to Micropendous
Another issue may be that the RESET line is PB4, not PB0. I updated
the incorrect information on the wiki page.

On Dec 16, 12:04 pm, Opendous Support <opendous.supp...@gmail.com>
wrote:

> >http://groups.google.com/group/micropendous/web/schematic1.jpghttp://...

Reply all
Reply to author
Forward
0 new messages