Download Programmable 24-bit RGB LED Color Panel via Bluetooth Technology

Transcript
' Otherwise.. if IntCount is not zero then
Else
check the DutyCycle of the signal
' If it's not the beginning of the PWM period, we need to compare
each DutyCycle to the value of IntCount.
' This is done by performing a subtraction and checking to see
whether the result is 0.
' When a match occurs, the output pin for the PWM channel is set to
0.
'
If Demo_bit = 1 Then
null = IntCount - DutyCycle0
If null = 0 Then OE_Red = 1
null = IntCount - DutyCycle1
If null = 0 Then OE_Green = 1
null = IntCount - DutyCycle2
If null = 0 Then OE_Blue = 1
EndIf
EndIf
TMR0IF = 0
' Clear the T0IF bit in the INTCON
register
TMR0ON = 1
'
'
INTCON.7 = 1 ' enable interrupts
INTCON.6 = 1
Context Restore
' Context restore and exit the interrupt
EndIf
End
87