William At MyBlueRoom
New Member
Win one of five Firefly PCBs. I've posted the details on my site. The contest starts Saturday Nov 11/06. Go to https://www.blueroomelectronics.com/ for details. Good luck.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
LIST p=16F88
INCLUDE "p16f88.inc"
ERRORLEVEL 0, -302
__CONFIG _CONFIG1, 0x2F30
__CONFIG _CONFIG2, 0x3FFC
movlf macro x,y ;MACRO move literal to file register W = literal
movlw x
banksel y ;make sure it's in the right bank
movwf y
endm ;end macro
cblock 0x20 ;start of general purpose registers
Delay_Count ;delay counter
endc
org 0x000 ;this is where the program starts running
movlf 0x07, CMCON ;turn comparators off (make it like a 16F84)
movlw b'11111111' ;I/O direction (inputs)
banksel TRISB ;switch to bank 1
movwf TRISB ;set PortB all inputs
movwf TRISA ;set PortA all inputs
Red1 ;LED1 RED
movlf b'01000000', PORTA
movlf b'10111110', TRISA
call Delay
Red2 ;LED2 RED
movlf b'10000000', PORTA
movlf b'00111111', TRISA
call Delay
Red3 ;LED3 RED
movlf b'00000001', PORTA
movlf b'01111110', TRISA
call Delay
Green3 ;LED3 GREEN
movlf b'10000000', PORTA
movlf b'01111110', TRISA
call Delay
Green2 ;LED2 GREEN
movlf b'01000000', PORTA
movlf b'00111111', TRISA
call Delay
Green1 ;LED1 GREEN
movlf b'00000001', PORTA
movlf b'10111110', TRISA
call Delay
goto Red1
Delay ;32KHz Clock (default internal OSC speed)
NOP
DECFSZ Delay_Count , f
GOTO Delay
RETURN
END