led3.bas.txt
来自「example for avr beginners with bascom」· 文本 代码 · 共 18 行
TXT
18 行
'Program LED3.bas
Dim Led As Byte 'LED is a Byte variable since it will controls
'entire port P1 (8 LED diodes in total)
'Its value can be anything between 0 and 255
Led = 146 'set initial value: 10010010
Do 'Do is a start of a Do-Loop loop
P1 = Led 'LED is now on port P1
Wait 1 'wait 1 second
Led = 36 'value of LED is now 00100100
P1 = Led 'LED is now on port P1
Wait 1 'wait 1 second
Led = 73 'value of LED is now 01001001
P1 = Led 'LED is now on port P1
Wait 1 'wait 1 second
Led = 146 'value of LED is now 10010010
Loop 'end of Do-Loop loop
End 'end of program
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?