frecuencimetro.bas
来自「Program in basic that simulates a frecue」· BAS 代码 · 共 21 行
BAS
21 行
declare xtal=20
device=16f877
DECLARE LCD_RSPIN PORTB.2
DECLARE LCD_ENPIN PORTB.3
DECLARE LCD_DTPIN PORTB.4
input portc
Dim Estado as bit
DIM Periodo as word
Dim Frec as Float
Programa:
Estado=portc.0
if estado=0 then
Periodo=pulsin PORTC.0,1
else
Periodo=pulsin PORTC.0,0
end if
Frec=52359.877566667/Periodo
Print at 1,1,"f:",at 1,5, dec frec
goto Programa
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?