Question about sending data serially


Closed Thread
Results 1 to 5 of 5
  1. #1

    Default 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.
    Name:  Serial.gif
Views: 336
Size:  107.7 KB

    Thanks in advance.

  2. #2
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default 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.

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default 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.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    May 2011
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Re: Question about sending data serially

    Quote Originally Posted by mackrackit View Post
    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.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Question about sending data serially

    http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1
    May help a little... Should be the same concept.
    Dave
    Always wear safety glasses while programming.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts