No vidis, staci porozmyslatluccas píše:jo a mám to![]()
while PORTB.0 = 0 do nop;
i:=i+1;
while PORTB.0 = 1 do nop;
jednoduché ale účiné
![Wink :wink:](./images/smilies/icon_wink.gif)
Moderátor: Moderátoři
Kód: Vybrat vše
procedure interrupt;
begin
brojac := brojac + 1;
TMR0 := 96;
INTCON := $20;
end;
begin
OPTION_REG := $84;
TRISB := 0;
PORTB := $FF;
trisb.7 := 1;
brojac := 0;
TMR0 := 96;
INTCON := $A0;
Lcd_Init(PORTC);
Lcd_Cmd(LCD_CLEAR);
Lcd_Cmd(LCD_CURSOR_OFF);
Lcd_Out(1, 1, ('Rychlost: '));
Lcd_Out(1,13,' KMh');
polomer:=0.3;
repeat
begin
if brojac >= 3000 then
begin
v:=0;
byteToStr(v,txt_vys);
Lcd_Out(1,10,txt_vys);
end;
if portb.7 = 1 then
begin
t:=brojac/1000;
mereni;
Lcd_Out(1,10,txt_vys);
brojac := 0;
while PORTB.7 = 1 do nop;
end;
floattostr((brojac/1000),tt);
Lcd_Out(2,7,tt);
end;
until 0=1;
end.
Kód: Vybrat vše
http://www.youtube.com/watch?v=qaYcvN5yNGg&mode=related&search=
http://www.youtube.com/watch?v=k51irq9QiPg&mode=related&search=