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 have used DEFINE OSC 4
    and N9600.
    I think the Problem is my COM Settings.
    What shoul i use there?

  2. #2
    Join Date
    Oct 2012
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    I know how frustrating it can be to get this problem. It cost me several hours (and a dead USB to RS232 dongle) to isolate my problem. It turns out the internal oscillator (4Mhz) on my 12F629 was too far off. I probably killed the internal calibration value by mistake at some other time.


    "for a= 0 to 255"

    You are getting some data in acceding order. Using printable characters can help by counting the number of correct ascending order before it breaks consistent order. The control characters can be muddying up things. Maybe:

    for a=32 to 126 'send only printable characters

    Also, characters pacing might help

    DEFINE CHAR_PACING 1000 'character pacing of 1ms

    My Hyper Terminal setting is on ASCII (chosen from a list in the setup)

  3. #3
    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

    In your code, change back to 2400
    N2400

    And leave the PC program at 2400.

    Let us know what happens so we can help more if needed.
    Dave
    Always wear safety glasses while programming.

  4. #4
    Join Date
    Oct 2012
    Posts
    4


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    Hello!
    I have tried this.
    INCLUDE "modedefs.bas"
    B0 var byte
    define OSC 4
    DEFINE CHAR_PACING 1000
    A var byte
    SI var PORTB.7
    start:
    SERIN si,N2400,B0
    if b0 <> "0" then
    for a= 32 to 126
    serout si,N2400,[a]
    next a
    endif
    goto start
    end

    And the PIC sends nothing more

  5. #5
    Join Date
    Oct 2012
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Re: Serin,Serout Problem

    It stops sending anything? Or the same garbage? Which?

    And I'm with Mike:

    "Serial out and serial in on same PIC pin? Normally separate pins. "
    Last edited by norohs; - 30th October 2012 at 14:59.

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