1 Attachment(s)
Question about sending data serially
Hi, I have two RF modules from Linx - HP3 series. They can be programmed serially. I would like to know how? I have never used synchronous way of sending data upto now.
can someone provide a little insight into how to perform the function as mentioned in the attachment please.
Attachment 5810
Thanks in advance.
Re: Question about sending data serially
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.
Re: Question about sending data serially
I have not looked at the data sheet for your part but i will guess the SHIFTOUT command will work.
Re: Question about sending data serially
Quote:
Originally Posted by
mackrackit
I have not looked at the data sheet for your part but i will guess the SHIFTOUT command will work.
Wow. They have a feature that includes all of that. That looks even easier.
Re: Question about sending data serially