Page 1 of 1

HIDKeys with atmega168

Posted: Tue Mar 11, 2008 11:40 pm
by Nicolas
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.

Posted: Wed Mar 12, 2008 8:19 am
by Grendel
Fuses set right ?

Posted: Wed Mar 12, 2008 1:07 pm
by Nicolas
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.

Posted: Tue Mar 18, 2008 5:58 pm
by Nicolas
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...

Posted: Tue Mar 18, 2008 9:32 pm
by Grendel
Try E:0xF9 H:0xDD L:0xDF

Posted: Wed Jul 09, 2008 3:17 pm
by Ingmar
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