Attiny25 OSCALL calibration

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

Attiny25 OSCALL calibration

Post by Guest » Sat Apr 18, 2009 6:03 am

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 !

Guest

Re: Attiny25 OSCALL calibration

Post by Guest » Sun Apr 19, 2009 3:19 am

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!

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

Re: Attiny25 OSCALL calibration

Post by christian » Wed Apr 22, 2009 11:48 am

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.

Post Reply