PIC HANGS with SERIN and Timeout?


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    I'm a real beginner with PICS and don't understand the posts about idling that good.

    If I connect he Serin Pin to ground it don't hang anymore, or if I rather use the "True" and not "inverted" state.
    Is any one of these a reliable solution?

  2. #2
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Sorry to jump in late. Just tie a 4.7 K between the serin pin and ground; should solve the problem.

    Regards,

    Anand

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thank you Anand, I will do!!

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ardhuru View Post
    Sorry to jump in late. Just tie a 4.7 K between the serin pin and ground; should solve the problem.
    Oh...hey...good point...no kidding.
    Jeez, sometimes the simplest fixes are the best.
    And if tying it to ground doesn't work (which it should), tie it high, or maybe use a 10K instead of a 4.7K, or maybe a 1K. Might take a bit of experimentation. But I don't see why 4.7K shouldn't work just fine.

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


    Did you find this post helpful? Yes | No

    Default

    I would try to find or fix the problem VS using the external resistor. Especially if you're using the same pin for sending & receiving serial data.

    If the other device is holding its pin at logic 1, and you do make it through to your SEROUT2 routine in the lower section, you have a potential short between two pins.

    The idle state just means the serial input or output pins are held at the idle logic level during periods when no serial data is being transmitted or received.

    For inverted, the TX output should idle at logic 0. And the RX input should be held at logic 0 by the sending device for the SERIN2 timeout/label options to work.

    PBP times the idle logic on the RX pin for the duration of the timeout period. If it sees noise, or a steady non-idle logic signal on the RX pin, the timeout period gets reset, and it never exits to the label.

    If you're using two PIC's talking together on a serial network type connection with the same pins on each side being used for TX & RX, then you might want to use one of the open baud modes.

    If you use SEROUT2/SERIN2 then use mode # 49548, and use the pull-down resistor on the serial network TX/RX pins.

    For inverted, open baud mode, the resistor holds the pin that's transmitting & receiving on the serial network at the idle logic level. Each PIC will TX a logic 1 only. Logic 0 for data bits and the idle state is handled by the pull-down resistor.

    For true mode you would use a pull-up resistor on the serial network pins, and each PIC would output only logic 0 when transmitting serial data. Logic 1 gets handled by the pull-up resistor. Open baud modes are really handy for single pin serial networks.
    Regards,

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

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    I would try to find or fix the problem..........
    Should sticky this in the FAQ's somewhere...
    Like I said, haven't had the problem myself, but I'm sure that day is coming...

Similar Threads

  1. Serin timeout not working properly!
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 1st January 2010, 20:56
  2. PIC Hangs when using Serin TimeOut
    By Squibcakes in forum Serial
    Replies: 2
    Last Post: - 20th July 2006, 01:59
  3. 16F628A Serin timeout and Timer1
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th March 2006, 23:20
  4. SERIN SERIN2 Timeout
    By markedwards in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd June 2005, 18:59
  5. SERIN & Timeout
    By BigWumpus in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th October 2004, 07:33

Members who have read this thread : 2

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