Re: Newbie help. RGB Led on a PIC10F202
Code:
Red var GPIO.0
Green var GPIO.1
Blue var GPIO.2
SwitchPin var GPIO.3
ButtonCount VAR BYTE
ButtonCount = 0
;Make sure LEDs are off
HIGH Red
HIGH Green
HIGH Blue
MAIN:
IF SwitchPin = 1 THEN
If ButtonCount<3 THEN
PWM GPIO.0(ButtonCount),127,100
ButtonCount = ButtonCount + 1
ELSE
ButtonCount = 0
ENDIF
endif
GOTO MAIN
Last edited by mister_e; - 14th August 2011 at 03:05.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks