Exemplo n.º 1
0
int main(void)
{
lcd_init(); // Initialize screen
P5DIR |= 0x02 ; // Set P5.1 to output direction
cpt = 0;
TACCR0 = 10486;
TACTL = TASSEL_2 + MC_1;

for(;;)
{
volatile unsigned int i;

if(TACTL & TAIFG == 1)
	{
	TACTL = TASSEL_2 + MC_1;
	lcd_display_number(cpt);
	cpt++;
	P5OUT = P5OUT ^ 0x02 ; // toggle P5.1 (LED4)
	}
}
}
Exemplo n.º 2
0
Arquivo: main.c Projeto: quan32/keil-c
void keyboard_do_job(const unsigned char pos) {
	lcd_display_number(pos);
}