'************************************************* ********
'
' LED FLASHING PROGRAM
' ======================
'
' This program flashes an LED connected to port RB0 of PORTB. The
' LED is flashed with 1 second intervals.
'************************************************* ************
'
LED VAR PORTB.0 ' Define RB0 as LED
'
' START OF MAIN PROGRAM
'
TRISB = 0 ' Set PORTB pins as outputs
AGAIN:
LED = 1 ' Turn ON LED
PAUSE 1000 ' Wait 1 second
LED = 0 ' Turn OFF LED
PAUSE 1000 ' Wait 1 second
GOTO AGAIN ' Repeat forever
END ' End of program




Bookmarks