Problem on sending data on serial port


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2011
    Posts
    37


    Did you find this post helpful? Yes | No

    Default Re: Problem on sending data on serial port

    Quote Originally Posted by cncmachineguy View Post
    I would start by checking the baud rate. this line:
    Code:
    DEFINE HSER_SPBRG 25
    is the same as I use with a 48mHz OSC. Now mind you, I am just starting to get into serial so I may be way off here.
    i've not understand you above,but i modified the code and tried to simulate it again,the results on the terminal is not what i sent.....
    code:
    Code:
    define osc 20
    char var byte
    trisb=1
    trisc=0
    RCSTA=$90
    TXSTA=$24
    SPBRG=25
    start:
    hserin 1000,mainloop,[char]
    mainloop:
    if portb.3=1 then
    hserout ["door is opened",13,10]
    hserout [char]
    endif
    goto start
    end
    Is there another way to send data to serial port...?an example will do...

    simulation results attached.
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Default Re: Problem on sending data on serial port

    Look at the SEROUT2 command in the manual.
    Dave
    Always wear safety glasses while programming.

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