我想在BASCOM
中创建一个切换指示灯。我为此编写了以下代码:
$regfile = "m16def.dat"
$crystal = 1000000
Config Portc = &B11111111
Config Portd.0 = 0
Portd.0 = 1
Portc = &H00
Do
If Portd.0 = 1 Then
Portc = &B11000011
Waitms 500
Portc = &H00
Waitms 500
Else
Portc = &B00111100
Waitms 500
Portc = &H00
Waitms 500
End If
Loop
任何帮助将不胜感激。