Serin,Serout Problem


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    Hello!
    I think i must send the CHR$ code of a.
    How can i do this?

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


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    About half way down is the Standard ASCII Character Set
    http://melabs.com/resources/ascii.htm
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Oct 2012
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    Quote Originally Posted by orwell101 View Post
    Hello!
    I think i must send the CHR$ code of a.
    How can i do this?
    I don't think so. By limiting the decimal value of 'a' to printable characters, the byte being sent will print that ASCII character. So, the way its being sent now is '32' will print a space, '33' will print "!",,,, '65' will print "A", etc..

    Are you willing to try separate and different ports for the SERIN and SEROUT? Sending and receiving on the same port pin is something I've never seen done using SERIN and SEROUT... and I have never considered doing it myself. It sure would eliminate one obvious anomaly.

    <snip...>
    SI var PORTB.7
    start:
    SERIN si,N2400,B0 <===== SERIN (on) PORTB.7
    if b0 <> "0" then
    for a= 32 to 126
    serout si,N2400,[a] <====== serout (on) PORTB.7

    Try not using the same port for SERIN and SEROUT.

    It may not be an issue for PBP to use the same port pin, but I can't imagine what the hookup to the RS232 would look like.

    EDIT: To be simple about it, just remark out:

    start:
    ' SERIN si,N2400,B0
    ' if b0 <> "0" then

    for a= 32 to 126
    serout si,N2400,[a]
    next a
    ' endif
    goto start
    Last edited by norohs; - 31st October 2012 at 04:33.

  4. #4
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    If that doesn't work try

    start:
    ' SERIN si,N2400,B0
    ' if b0 <> "0" then
    for a= 32 to 126
    serout si,T2400,[a]
    next a
    ' endif
    goto start

    I believe if the issue is only with inverted data that should get it to display.

Similar Threads

  1. Serin and Serout problem
    By rubisharmax in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 10th June 2012, 13:20
  2. problem with serout and serin 2
    By amtechnology in forum General
    Replies: 0
    Last Post: - 14th May 2012, 13:08
  3. Another Serin/Serout Problem!
    By jmbanales21485 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th June 2007, 16:26
  4. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  5. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44

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