Code :
program PROGRAMME; var t : longint; txt : string[10]; procedure interrupt; begin portb.1:=1; while (portb.0=1) do begin delay_us(1); t:=t+1; end; intcon:=$90; end;
begin trisb:=01; portb:=0; t:=0; LCD_init(portc); lcd_cmd(lcd_cursor_off); lcd_out(1,1,'salut'); intcon:=$90; while (true) do begin if t > 0 then begin inttostr(t,txt); lcd_out(1,1,txt); lcd_out(1,8,'unite'); t:=0; end; end; end.
|