Author Topic: TV Out  (Read 8570 times)

psergiu

  • Newbie
  • *
  • Posts: 3
TV Out
« 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__ ?

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: TV Out
« Reply #1 on: February 08, 2013, 04:14:40 pm »
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.

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: TV Out
« Reply #2 on: February 08, 2013, 05:51:21 pm »
Couldn't the calibration value be stored somewhere (eeprom/flash) by the bootloader?


Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: TV Out
« Reply #3 on: February 09, 2013, 02:38:58 pm »
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!

semicolo

  • Full Member
  • ***
  • Posts: 137
Re: TV Out
« Reply #4 on: February 10, 2013, 08:10:15 am »
And another bootloader update for you  ;D ! Thanks for your dedication by the way.

Rod-Singapore

  • Newbie
  • *
  • Posts: 1
Re: TV Out
« Reply #5 on: April 17, 2014, 08:43:16 pm »
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