Hi All,
Has anyone tried to make a Controller for LED Strips?, the crazy part is most of the Controlling Chip Datasheets are all in Chinese and not easy to make out any useful information. So Far I can gather they use +5V/0V/DATA/CLK, so I assume you can control them via the Shift Out Command. I have tried some code but to none avail I can't seem to get the strip running or flash, can anyone give me some suggestions?, I have out some code below
define OSC 32
Define LOADER_USED 1
Define LCD_DREG PORTB ' Define LCD connections
Define LCD_DBIT 0
Define LCD_RSREG PORTB
Define LCD_RSBIT 4
Define LCD_EREG PORTB
Define LCD_EBIT 5
DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD
DEFINE LCD_COMMANDUS 2000 'Command delay time in us
DEFINE LCD_DATAUS 50 'Data delay time in us
led1 var portc.0
led2 var portc.1
B0 VAR BYTE
B1 VAR BYTE
B2 VAR byte
B3 VAR byte
B4 VAR byte
B5 VAR byte
B6 VAR byte
B7 VAR BYTE
B8 VAR BYTE
B9 VAR BYTE
B10 VAR byte
B11 VAR BYTE
B12 VAR byte
B13 VAR byte
B14 VAR byte
B15 VAR byte
B16 VAR byte
B17 VAR BYTE
B18 VAR BYTE
B19 VAR BYTE
B20 VAR byte
ADCON1 = 15 ' PORTA and E digital
pause 100
Lcdout $fe, 1,"DMX "
Lcdout $fe,$C0,"CONTROLLER "
goto startup
STARTUP:
Lcdout $fe, 1,"SHIFTOUT "
Lcdout $fe,$C0,"ROUTINE "
for b0 = 1 to 64
shiftout led1, led2, 0, [%00000000/8]
pause 500
shiftout led1, led2, 0, [%10000000/8]
pause 500
shiftout led1, led2, 0, [%11000000/8]
pause 500
shiftout led1, led2, 0, [%11100000/8]
pause 500
shiftout led1, led2, 0, [%11110000/8]
pause 500
shiftout led1, led2, 0, [%11111000/8]
pause 500
shiftout led1, led2, 0, [%11111100/8]
pause 500
shiftout led1, led2, 0, [%11111110/8]
pause 500
shiftout led1, led2, 0, [%11111111/8]
pause 500
shiftout led1, led2, 0, [%11111111/8]
pause 500
Next
goto startup
END
Bookmarks