// Name : BLINK_1.BAS
Device = 18F1320
Clock = 4 // 4MHz clock
Include "junebug.bas"
Dim Count As Byte
OSCCON = $62 // select 4MHz internal clock
ADCON1 = %11110101 // digital I/O except RA1 & RA3
While True
Count = 1
While Count < 6
LED(Count) // light LED(1..6) or none LED(0)
DelayMS(100) // delay in 1000s of a second
inc(Count)
Wend
While Count > 1
LED(Count) // light LED(1..6) or none LED(0)
DelayMS(100) // delay in 1000s of a second
dec(Count)
Wend
Wend
End