try this 16 led strip on RC7
Code:
' PIC 16F690 @20MHz
#CONFIG
__config _FCMEN_OFF &_IESO_OFF &_CPD_OFF &_WDT_OFF &_HS_OSC &_BOR_OFF &_CP_OFF &_PWRTE_OFF &_MCLRE_OFF
#ENDCONFIG
CLEAR
TRISC = %00000000
DEFINE OSC 20
pinsel var byte
RED var byte
GREEN var byte
BLUE var byte
px var byte
bt var byte
pc var byte
pinsel = 128
MAIN:
GREEN=128
asm
MOVLW 16
MOVWF _pc
_nxRby
MOVF _GREEN,W
movwf _px
MOVLW 8
movwf _bt
RLF _px,F
_nxRbt movf _pinsel,W
IORWF PORTC ,F
BTFSS STATUS,C
GOTO XXR
NOP
NOP
NOP
XXR CLRF PORTC
NOP
RLF _px,F
DECFSZ _bt,F
GOTO _nxRbt
MOVF _RED,W
movwf _px
MOVLW 8
movwf _bt
RLF _px,F
_nxGbt movf _pinsel,W
IORWF PORTC,F
BTFSS STATUS,C
GOTO XXG
NOP
NOP
NOP
XXG CLRF PORTC
NOP
RLF _px,F
DECFSZ _bt,F
GOTO _nxGbt
MOVF _BLUE,W
movwf _px
MOVLW 8
movwf _bt
RLF _px,F
_nxBbt movf _pinsel,W
IORWF PORTC ,F
BTFSS STATUS,C
GOTO XXB
NOP
NOP
NOP
XXB CLRF PORTC
NOP
RLF _px,F
DECFSZ _bt,F
GOTO _nxBbt
DECFSZ _pc,F
GOTO _nxRby
endasm
PAUSE 100
GOTO MAIN
Bookmarks