Serin Serout Help


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Nov 2010
    Posts
    7


    Did you find this post helpful? Yes | No

    Thumbs up Update

    Thanks again i moved SERIN inside the loop but to no avail. I am assuming there is an issue with my baud rate. If i am sending should the sending and receiving baud rate be identical or should one be inverted?

    Thanks for the help

  2. #2
    Join Date
    Nov 2010
    Posts
    7


    Did you find this post helpful? Yes | No

    Lightbulb Serin Serout Solved!

    So after alot of headaches i have finally got SERIN SEROUT working . The first and biggest problem was the baud rate i was using the initial (3313) is only meant to communicate with a level converter. I am using (27889) which is 7bit with even parity. Here is the code i hope it helps anyone else who is stuck with the SERIN SEROUT.

    Send:

    clear
    DEFINE OCS 4
    ADCON1 = %00000111
    CMCON = %00000111
    TRISA = %11111111
    TRISD = %00000000
    X VAR BYTE
    X = 555

    LOOP1:
    SEROUT2 PORTA.5, 27889 , [244]
    PAUSE 500
    GOTO LOOP1
    END

    Recive:

    Clear
    define ocs 4
    ADCON1 = %00000111
    CMCON = %00000111
    TRISA = %11111111
    TRISD = %00000000
    X VAR BYTE

    LOOP1:
    LOW PORTD.3
    SERIN2 PORTA.5, 27889, [X]
    HIGH PORTD.3
    HIGH PORTD.2
    PAUSE (X * 10)
    LOW PORTD.2
    PAUSE (X * 10)

    GOTO LOOP1

    END

    Thanks Again to all those who helped solve this.

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