I am hoping somebody that really knows what they are talking about comes buy and sets you in the exact direction you need to be going but this should at least get you going in the general direction until somebody comes along and really saves you. The data line is just High or Low (1 or 0). You set the data pin high for a 1 and low for 0. The clock line is
just to let the Linx part know when you are sending a bit because otherwise it would not know whether a 1 is just a long bit for two successive 1s and the converse for 0. The easiest way to set this up that has worked in the past for me is to just have the clock pin alternate between high and low with a pause 1 for each (it is slow but it works). Every time the clock pin is high also set the data pin to the appropriate high or low. If you wanted to send a binary 01011 you would do the following.
Portx.x var clock
portx.x var data
pause 1
high clock
pause 1
low clock
pause 1
high data
high clock
pause 1
low data
low clock
pause 1
high clock
pause 1
low clock
pause 1
high data
high clock
pause 1
low clock
pause 1
high clock
(data was left high from last "1")
This is the longest most drawn out way to do this but probably the simplest to understand. I hope it helps.
Bookmarks