Digistump Forums
The Digispark => Digispark Project Ideas => Topic started by: psergiu on February 04, 2013, 01:32:35 pm
-
Hi everyone.
Check-out this TV-Out lib: http://code.google.com/p/arduino-tvout/
I have tried modifying-it for Digispark, defined output pins in TVOut/spec/hardware_setup.h but got defeated by 'TIMSK1', 'TCCR2A', 'TCCR2B' and other ATMega specific variables inside the code.
Can anyone take a look ? As composite TV-out only requires 2 pins, a Digispark can easily become a PONG machine (with 2 pots).
Thank you.
PS: Is the Digispark Arduino compiling environment defining some special Digispark-related vars or only __ATtinyX5__ and __ATtiny85__ ?
-
When making a library digispark compatible you should target attiny85 generally. If you need very specific timing, you can check F_CPU == 16500000 - however please do note this is a lie - it only runs at that speed when the digispark boots off a computer usb port. When powered externally it runs at 16.0mhz +/- 10%
I'm trying to think up a good mechanism for calibrating the digispark in the future, so it can run with a more precise clock speed even when not powered by a USB connection.
-
Couldn't the calibration value be stored somewhere (eeprom/flash) by the bootloader?
-
That's a pretty cool idea - when the bootloader takes a program upload it could store it's calibration with the program's meta data and then when booting it could restore that if it doesn't have a chance to calibrate off USB. Cool beans!
-
And another bootloader update for you ;D ! Thanks for your dedication by the way.
-
Hi. I'm new to this but managed to do the pong game on my UNO. I would love to port the TV OUT Library but really don't know how. Anybody had figured this out???
Cheers