示例#1
0
void timer0Init(uint8_t prescale)
{
	// initialize timer 0
	timer0SetPrescaler(prescale);			// set prescaler
	TCNT0 = 0;								// reset TCNT0

	timer0ClearOverflowCount();				// initialize time registers
}
示例#2
0
void sample(void)
{
//vt100ClearScreen();

	if(timer0GetOverflowCount() == 17){		// After 17 overflows we set a flag that will tell main() to read the
											// Temperature off the MAX6675
	timer0ClearOverflowCount();				// Clear timer0's overflow counter. 	
	SET_SAMPLE_FLAG;						//set sample flag and reset overflow counter
	}
	//vt100SetAttr(VT100_REVERSE_OFF);
	/*
#define VT100_ATTR_OFF		0
#define VT100_BOLD			1
#define VT100_USCORE		4
#define VT100_BLINK			5
#define VT100_REVERSE		7
#define VT100_BOLD_OFF		21
#define VT100_USCORE_OFF	24
#define VT100_BLINK_OFF		25
#define VT100_REVERSE_OFF	27
*/

}