I started with the hardware and software found here, and have been modifying it.
To get this program to work with arduino-0017 and a Duemilanove with ATmega328, I made the following timing changes:
#define _ntscDelayHSyncStart 3
#define _ntscDelayBackPorch 1
#define _ntscDelayFrontPorch 1
#define _ntscDelayPerLine (2*21)
#define _ntscDelayVSync 25
#define _ntscDelayBackPorch 1
#define _ntscDelayFrontPorch 1
#define _ntscDelayPerLine (2*21)
#define _ntscDelayVSync 25
As well, rather than editing wiring.c or turning off all interrupts (sending serial commands requires one), I turned off only the one, in setup( ):
#ifndef cbi
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
// Disable timer 0 overflow interrupt, for precise timing.
cbi(TIMSK0, TOIE0);
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
#endif
// Disable timer 0 overflow interrupt, for precise timing.
cbi(TIMSK0, TOIE0);
No comments:
Post a Comment