HIDKeys with atmega168

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Nicolas

HIDKeys with atmega168

Post by Nicolas » Tue Mar 11, 2008 11:40 pm

Hello everybody,

I'm trying to run the HIDkeys project on an atmega168 but I can't.

I've downloaded the latest usbdriver from the powerswitch project, i've changed the -mmcu directive in Makefile to atmega168 and i've inserted these defines in the main.c file :


#if !defined TCCR0 && defined TCCR0B
#define TCCR0 TCCR0B
#endif
#if !defined TIFR && defined TIFR0
#define TIFR TIFR0
#endif

Compilation goes without errors and i can program my atmega168 thanks to an arduino board.

The problem is that when I build the circuit on my breadboard and I plug it in a computer it doesn't work. Windows doesn't recognise the HID device and Mac Os X does nothing.

I'm better with software than with hardware and I'm not able to modify the circuit if it have to be modified.

Does anybody have already realized that project with the atmega168?
Do I have to modify the circuit?
Are my modifications to source code enough?
In other words: where am I doing wrong?

Thanks in advance for any help and sorry for my English.

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

Post by Grendel » Wed Mar 12, 2008 8:19 am

Fuses set right ?

Nicolas

Post by Nicolas » Wed Mar 12, 2008 1:07 pm

Maybe i've found out what is the problem.
The arduino board that i'm using to program the chip burns also a bootloader with the source code.

I'll try to burn the project without the bootloader. Let's hope it works.

Nicolas

Post by Nicolas » Tue Mar 18, 2008 5:58 pm

Grendel wrote:Fuses set right ?


I've tried to reburn the hidkeys with a parallel programmer but the situation didn't change.
Can someone please tell me which values should i put in the hfuse lfuse and efuse? I'm not very sure i did it right...

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

Post by Grendel » Tue Mar 18, 2008 9:32 pm

Try E:0xF9 H:0xDD L:0xDF

Ingmar

Post by Ingmar » Wed Jul 09, 2008 3:17 pm

Nicolas,

Did you get this to work ? The only app I can get working on my 168 chips is the USBasp bootloader. Nothings else I have tried (c64key, yake) will work. I know the hardware is right as the bootloader runs. Is the 168 really that different ?

I'm going to have to build a mega16 board just to find out I guess.

Ingmar

Post Reply