Révision 619
Ajouté par anclaud il y a presque 4 ans
SP4b2.c | ||
---|---|---|
}
|
||
}
|
||
|
||
void tpo_us(unsigned short duree){
|
||
tcspr = 0x8A;
|
||
ta0mr = 0x82;
|
||
ta0 = duree;
|
||
ta0ic = 0x00;
|
||
ta0s = 1;
|
||
ta0os = 1;
|
||
while(ir_ta0ic != 1);
|
||
ta0s = 0;
|
||
}
|
||
|
||
void tpo_ms(unsigned short duree){
|
||
tcspr = 0x8A;
|
||
ta0mr = 0x82;
|
||
ta0 = duree*1000;
|
||
ta0s = 1;
|
||
ta0os = 1;
|
||
ta0ic = 0x00;
|
||
while(ir_ta0ic != 1);
|
||
ta0s = 0;
|
||
}
|
||
// initialize the LCD display
|
||
void lcd_init(void)
|
||
{
|
||
LCD_DC=0;
|
||
//tpo_ms(15);
|
||
tpo_ms(15);
|
||
lcd_4b(0x30);
|
||
//tpo_ms(5);
|
||
tpo_ms(5);
|
||
lcd_4b(0x30);
|
||
//tpo_us(100);
|
||
tpo_us(100);
|
||
lcd_4b(0x30);
|
||
//tpo_us(100);
|
||
tpo_us(100);
|
||
lcd_4b(0x20);
|
||
lcd_com(0x28);
|
||
lcd_com(0x06);
|
||
lcd_com(0x0E);
|
||
lcd_com(0x01);
|
||
//tpo_ms(5);
|
||
tpo_ms(5);
|
||
}
|
||
|
||
void main(void)
|
Formats disponibles : Unified diff
Afficheur fonctionnel avec tempos = affiche chaine de caracteres