Page 1 of 1

Attiny25 OSCALL calibration

Posted: Sat Apr 18, 2009 6:03 am
by Guest
Hi,

I'm quite new to the AVR micro, but anyway what I'm trying to accomplish shouldn't be that hard.

I've just found a nice USB-Snes which use your driver
http://hobbyelektronik.org/wiki/index.p ... NES-Joypad (Translate using Google ;))

I've manage to remove some bytes from the original source code (as it was compiling to more than 2048K on my PC) and it now fit on my Attiny25.

My only concern is the calibration of the oscall. I can't seem to find a working oscall value. I've only tryed about 10-15 value "by hand".

I've been trying for the last 3 days to create a little code (based on the Easy logger) only to populate the EEPROM with a calibration value. I don't have any equipment to do this by hardware so I was hopping that maybe if I can calibrate a specific Attiny25 chip with this little peice of code. Than keep the EEPROM oscall value. Flash the Snes-Usb code. Reflash EEPROM.... Plug in USB... I was hopping it should now work fine.

I can't seem to get it going. I'm using the LED to know when the code is loopping inside the calibration. It appear to stop for no apparent reason, but still I don't have any value in the EEPROM and the device doesnt get reconized by windows.

Anyone have a clue?

Here's the fact :

I've disabled Watchdog to make sure no Watchdog reset would occur during calibration.
I'm using the autocalibration mecanism found in the latest EasyLogger sources.
I'm using a breadboard to test my circuit.
I'm using Zenner diode on the Data pin with a 1.5k pull-up resistor on D-. ..Should I change the pull-up to something else?

Thanks !

Re: Attiny25 OSCALL calibration

Posted: Sun Apr 19, 2009 3:19 am
by Guest
I did it !!!

Finaly I was able to calibrate everything!

It's now working create!

My problem : The zener diode.

For some reason, I think they are not precise enought with internal oscal.
I've change my hardware using some diode to drop the VCC to somewhere near 3.6v and it's now all good to go!

It really bug me cause I've been using the same Zener with an Atmega8 (with external 12mhz crystal) and it was working fine.

Thanks anyway!

Re: Attiny25 OSCALL calibration

Posted: Wed Apr 22, 2009 11:48 am
by christian
You really should use some kind of regular calibration, something similar to the code in the libs-device directory of the driver. This may be very tight on the Tiny25, though.