Atmega8 works, Atmega48/88 don't

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
wilin
Posts: 4
Joined: Sat Nov 01, 2008 9:32 am

Atmega8 works, Atmega48/88 don't

Post by wilin » Wed Nov 26, 2008 1:34 pm

Hi

Does anybody know if atmega48/88 are sensitive to resistor values and such? Because I've tried using an atmega48 in a usbasp board (currently an atmega8 in it) with usbasp firmware and it doesn't work (led lights up, but I doesn't work -> errors in dmesg). I've also tried running my own code (works on an atmega8), and again it doesn't work. Same thing happened to Atmega88's (only tried my own code, and it didn't work).

I've used 5V for power on Atmega8 (and Atmega48; same board), 2x22R resistor, and in one board 1.5K (usbasp) and in one board 10K pullup (in my own board). One has 3.6V zener diodes, one 3.3V ones. On the Atmega88's I've used 3.4V power, 68R, and tried both 1.5K and 10K pullup. The fuses are correct on all chips.

I suspect that it's probably a minor fault that I've overlooked (somehow it's always the smallest details that get me), and it's a shame, because the project is pretty much finished (except for this).

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Nov 27, 2008 12:47 pm

Are you aware that you can't use the same hex file for ATMega8 and 48/88/168? You must specify the correct device in the compiler command line.

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Post by Grendel » Sat Nov 29, 2008 9:36 am

There are quite some changes to the I/O registers of the 88, chance is that the software needs to be modified as well. Atmel has a migration guide available here. I use the combination 3V6, 68R w/ a 2.2k pullup sucessfully w/ a tiny461 (same electrical specs as the 88 AFAICS).

wilin
Posts: 4
Joined: Sat Nov 01, 2008 9:32 am

Post by wilin » Sun Nov 30, 2008 12:47 pm

@ Christian

I had changed the Makefile to reflect that change, but it didn't work. I've also used the .hex file from usbasp for Atmega48, dropped it into my programmer, and it also didn't work. I've then sort of given up on Atmega48/88 and just used an Atmega8 to finish the project.

@Grendel

Since I've only used an integer as a counter in my testing code (along with the usb code), I don't think anything needed fixing. (Unless the usb code differs somehow from Atmega8)


All in all, I declare this project done (granted the code could use a bit of cleanup, but it works, and it works good). I'll post it on your wiki today.

remiq

Post by remiq » Fri Dec 05, 2008 6:47 pm

I've had this problem when I connected D+ to pin 4 and D- to pin 6. USBasb (http://www.fischl.de/usbasp/) uses atmega48 by connecting D+ to pin 4 and 15, and D- to pin 14. I've tried it and it works.

Post Reply