strange rs232 data displayed


Closed Thread
Results 1 to 7 of 7

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    Post your whole code, RX and TX.
    Remember that arrays start at zero [0]
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Jan 2009
    Location
    Alabama,USA
    Posts
    232


    Did you find this post helpful? Yes | No

    Default Reply:

    After testing at different Bauds, trying different Hser defines, I found that if I always use a short define string before my needed data all reception is exceptable. Sending a string of “SINKABCDEFG…… and receive with

    hserin 2000,TimeOut , [wait("SINK"),str Rxdata\16]

    is successful each loop without error. I’ve seen other examples like this and I’m sure it’s a good practice. I’m sending with 16F819 at 8Mhz internal driving a LT108CN RS232 shifter. Resulting in NO errors on Tera Term.

    Receive on X1 board, 16F877A at 20Mhz also with LT108CN. Wired connection from bread board w/ F819. My only question now is why this works on receive end:

    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_BAUD 9600 ' Baud rate
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically

    And this doesn’t work on receive end with my X1 board:

    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
    DEFINE HSER_SPBRG 0 ' 9600 KBaud @ 20MHz, -86.98%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically

    Thank you guys for all your comments!

  3. #3


    Did you find this post helpful? Yes | No

    Default need more information :)

    Hi Mountain :-)

    Glad you're winning !

    You left a few things out :-)

    Try this
    DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
    DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
    DEFINE HSER_SPBRG 12 ' 9600 Baud @ 8MHz, 0.16%
    DEFINE HSER_CLROERR 1 ' Clear overflow automatically

    Hope that helps :-)

    Dennis

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Nokia 3310 display text
    By chai98a in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th August 2007, 03:39
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 14:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 28th November 2004, 23:56

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