Hello,
I'm interested in creating a simple HID joystick device using ATTiny26. I would like to use the internal clock as demonstrated in the EasyLogger project, but I'm having a difficult time trying to parse through the code to find where I will need to make the appropriate changes. Is there another project that you would recommend working from?
Anyone care to help???
Thanks,
Andrew
EasyLogger --> joystick?
-
- Posts: 4
- Joined: Thu Nov 15, 2007 11:18 am
I was under the impression that with the new EasyLogger firmware, you were supposed to use the PLL clock fuse. So, is it better to set it for Int. RC (8Mhz) ? Do I still use F_CPU 16500000?
I'm having a difficult time finding information on how to calculate the calibration byte for OSCCAL. If anyone has a link to some information, or a simple equation, that would be great.
I pulled the HID descriptor from the AVR-HID firmware, and I have the code compiling now to 99.1% of the 2K flash, and I can verify the device is sending information using Snoopy Pro on Windows XP. I'm unfortunately unable to get the joystick to show up in any applications as an HID device, and it doesn't get recognized by HID_n_Seek on Mac. It's maddening, but I feel I am close.
I'm having a difficult time finding information on how to calculate the calibration byte for OSCCAL. If anyone has a link to some information, or a simple equation, that would be great.
I pulled the HID descriptor from the AVR-HID firmware, and I have the code compiling now to 99.1% of the 2K flash, and I can verify the device is sending information using Snoopy Pro on Windows XP. I'm unfortunately unable to get the joystick to show up in any applications as an HID device, and it doesn't get recognized by HID_n_Seek on Mac. It's maddening, but I feel I am close.
Since you use the PLL for clock generation, the CPU actually runs on 16.5 MHZ and you should set F_CPU to 16500000.
We currently don't have a good standard method to obtain OSCCAL. I would recommend that you find it by trial and error by measuring the actual clock frequency.
Getting the HID descriptor right is often a challenge. I would recommend that you only work on one issue at a given time, e.g. move the code to an ATMega8 with a 12 MHz crystal clock to rule out code size problems and clock precision problems.
We currently don't have a good standard method to obtain OSCCAL. I would recommend that you find it by trial and error by measuring the actual clock frequency.
Getting the HID descriptor right is often a challenge. I would recommend that you only work on one issue at a given time, e.g. move the code to an ATMega8 with a 12 MHz crystal clock to rule out code size problems and clock precision problems.
Just for your information: We have released EasyLogger 2008-02-28 today. This version adds self-calibration of the RC oscillator.
In principle, this calibration algorithm can be used to calibrate the RC oscillator directly to 12 MHz. However, the precision is not high enough for the 12 MHz module (because it does not have a software PLL) and 12 MHz is outside the specified range of OSCCAL values. It's still an interesting field for experiments...
In principle, this calibration algorithm can be used to calibrate the RC oscillator directly to 12 MHz. However, the precision is not high enough for the 12 MHz module (because it does not have a software PLL) and 12 MHz is outside the specified range of OSCCAL values. It's still an interesting field for experiments...