UART vs software RS232


Closed Thread
Results 1 to 28 of 28

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I have a pair of XStream units I've been using for a few years that work great. Just use
    true mode and connect PIC I/O-pins directly to them.

    It may be that you have them configured for another data-rate or something, but I would
    check with Digi or Maxstream to be sure they're working if having problems with them.

    Mine worked perfectly right out of the box.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  2. #2
    Join Date
    Jan 2007
    Location
    Houston, TX
    Posts
    96


    Did you find this post helpful? Yes | No

    Default

    For what its worth, I use LINX RXM/TXM-XXX-LR serial modules with inverted 9600 8N1 with no problems at all. I use serin/serout2 commands and just played with my timing to be able to update both my reciever boards with string data. The serial modules work GREAT up to 3000' away and can go up to 10k baud. I would give them a shot if you are frustrated with the other modules you are using. The price for the pair ~ 25.00 so not too bad. You can also purchase the development board.

    Here is one line of code using 8N1 9600 inverted

    Code:
    SERIN2 PORTB.0,16468,[WAIT("TENSION"),DEC4 TN]'TEST 3
    good luck!
    Attached Images Attached Images   
    Padawan-78

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Bruce and Earltyso --

    You know, I think it's because I don't have a wait command in my code.

    ??

    On my wired connection, that doesn't seem to be a problem although things are out of sequence a bit after power up....not a big deal with what I'm doing.....but with wireless, it may be mandatory? you think that may be it?

    I'm also using 2 qualifiers in my code which I wouldn't think would be a problem as in...
    qual1, qual2, data


    Bruce, I'm using the X24009 modules -- 1200,8N1 -- I just changed the data rate to 1200 (they're 9600 out of the box) and left everything else at default when I used the XCT-U software and the XIBR setup board.

    I'm going PIC serout to PIC serin pin to pin just like you. Both PICs true.

    Also, I've never experimented with "timing" -- I'm a picbasic novice in that department....maybe I need to look at that......are you talking about the pulse width or something?

    THANKS.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I always use a wait modifier to synch to the first byte in a packet.

    This is the line used to receive in my remote sprinkler controller using a pair of
    XStream 900MHz OEM modules;

    SERIN2 RX,84,[WAIT("A"),CMD,RlyNum,State]

    It waits for the A then grabs data. Really simple and it works.

    I would probably have used a pair of Linx LR series like Earltyso did, but I built
    the remote sprinkler controller LONG before the LR series were available.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Ok -- I'll keep playing with it.

    I remember now why I didn't have a wait in there....because I have to keep things moving for counters and other processes....I never tried the wait command but it probably won't hurt anything....few milliseconds at most I guess.

    It just keeps ticking me off though because it works prefectly wired, so I hate to be screwing with the code.

    Thanks for the input.

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


    Did you find this post helpful? Yes | No

    Default

    A wait with a time-out is what you need. After the time-out the code will jump to the label of you choice.
    Dave
    Always wear safety glasses while programming.

  7. #7


    Did you find this post helpful? Yes | No

    Default

    I'm out to lunch on how to use wait and timeout.

    here's my code for the receiver.....


    SERIN PORTA.4, T1200, [QUAL1, QUAL2], LOWER, HIGHER

    Works fine...looks for 2 qualifier bytes...then shows the data (lower and higher).

    Do I even need wait? Is it in there as default because I have the qualifiers?

    Also, in my PBP book it only talks about "WAIT" in the SERIN2 page ?


    If I'm doing something wrong, how would I write the line above using "wait"?

    I tried some things but got errors --

    [WAIT, QUAL1,QUAL2], ETC
    [WAIT,"QUAL1","QUAL2"] ETC

    THANKS AGAIN

Similar Threads

  1. PIC uart basics
    By Michael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 27th September 2008, 19:11
  2. Software RS232 and wireless modules
    By Michael in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th August 2008, 05:27
  3. Software Stack
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th December 2007, 10:04
  4. Replies: 3
    Last Post: - 26th November 2006, 21:47
  5. Infrared Communications over RS232 UART or with B0 interupt
    By modifyit in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th December 2005, 19:17

Members who have read this thread : 0

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