non-inverting 2400 baud


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default non-inverting 2400 baud

    I have a PIC to PC and PC to PIC circuit operating just fine. However, when the circuit is moved to different PC's, I have noticed the data coming from the PC is not always detected by the PIC. It appears the voltage level from the IO port on the PC is lower. I have placed a MAX3180 on the receiving side of the PIC to boost the voltage. And it does. The MAX3180 inverts the data. I have been using N2400 and 16780 as buad rate perimeters on both sides of the PIC, Xmit and receive, and things had been running quite well. I changed the receiving side of the PIC to 396 but haven't had any luck making the connection. Is there another value or trick to this? This is the first time I have had to use a line driver with a PIC.
    The basic PIC data circuit is layed out like the manual suggests, nothing else.
    Thanks in advance.

    Brad

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Try the same with DEBUG or HSEROUT instead of SEROUT/SEROUT2 and see how better/worst it is.

    Side note, RS-232 @2400 baud already gave me few weirdies on some PCs. Problem disappear for me by using an higher baudrate.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default missing important information

    Sorry about that. I left out some important information. I am using a 16F628A, it does not have a USART so I am unable to use HSER function. Thanks for the suggestion though. I am also using the WAIT parameter. I am expecting to see a hex value between 31 and 39 but I am receiving fe. Not sure what fe is, but it is consistant.
    Again, thanks for any suggestions.

    b

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default

    Quote Originally Posted by cooksydesign View Post
    Sorry about that. I left out some important information. I am using a 16F628A, it does not have a USART so I am unable to use HSER function.
    Don't know where you got those, BUT the 16F628A chips I use has USART pin7 RX, pin 8 TX.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    May 2005
    Location
    Minnesota
    Posts
    31

    Default wrong datasheet

    You are correct, I clicked on the wrong link when I was looking at dataseets yesterday. As I mentioned earlier, the circuit was working for quite awhile so I made a few boards. Now I see there are some problems with a few other PC's. Back to my original question, if 16780 works for 2400 baud in a SER2 command, what is the True seeting? I tried 396, then I get something other than what I expect. Looks like a baud rate setting. I can remove the MAX8130 and the circuit works fine, when the SER2 commands are returned to the proper settings. Thanks for pointing out the USART pins. Unfortunately, I have made boards and those pins are used.

    b

  6. #6
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818

    Default Das Book

    Quote Originally Posted by cooksydesign View Post
    You are correct, I clicked on the wrong link when I was looking at dataseets yesterday. As I mentioned earlier, the circuit was working for quite awhile so I made a few boards. Now I see there are some problems with a few other PC's. Back to my original question, if 16780 works for 2400 baud in a SER2 command, what is the True seeting? I tried 396, then I get something other than what I expect. Looks like a baud rate setting. I can remove the MAX8130 and the circuit works fine, when the SER2 commands are returned to the proper settings. Thanks for pointing out the USART pins. Unfortunately, I have made boards and those pins are used.

    b
    In the back of the Book, Appendix A
    Code:
    B/R    OUTPUT  CONVERSION  PARITY      MODE 
    2400   DRIVEN  TRUE           NONE      396
    2400   DRIVEN  TRUE           EVEN     8588
    2400   DRIVEN  INVERTED       NONE    16780
    2400   DRIVEN  INVERTED       EVEN    24972
    2400   OPEN    TRUE           NONE    33164
    2400   OPEN    TRUE           EVEN    41356
    2400   OPEN    INVERTED       NONE    49548
    2400   OPEN    INVERTED       EVEN    57740
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. A Serial GLCD 128x64 Simple Project
    By Oldspring in forum Off Topic
    Replies: 0
    Last Post: - 8th March 2010, 20:58
  2. PIC 18f1220 EUSART Baud Rate Cache Problem
    By wklose99 in forum Off Topic
    Replies: 3
    Last Post: - 15th April 2008, 00:39
  3. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 02:17
  4. PIC12F675, accuracy of baud rate with Internal Oscillator
    By Chris Mayhew in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 31st August 2005, 22:41
  5. Baud Rate and Timing Calculator
    By picnaut in forum General
    Replies: 3
    Last Post: - 23rd January 2004, 16:48

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