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 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

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

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

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

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

    Default

    What I suggest is to set the TX pin to the normal idle State at the top of your program and add a pause of few mSec. True mode idle high, while inverted idle low.
    Steve

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

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

    Default Progress

    I changed the baud rate setting from 396 to T2400 and the correct data was sent out. What's the difference between 396 and T2400? I don't know. Something similar to this happened before and I ended up using N2400 when a line driver is not used. I didn't see a reference to T2400 in the book.

    Is there a way to clear the output buffer in the PIC 16F628a? The PIC sends a D0 first time, every time. Nowhere in the program do I load a D0. When I send the proper data twice, the receiving program discards the D0 and recognizes the correct data and accepts that. Strange.

    Thanks for all suggestions earlier.

    B

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

    Default

    You need to set the idle level first at the top of your program, then send your data.

    For true mode, your serial output must be set high, for inverted, it's low.

    T2400, N2400 are for SEROUT, all other numbers 396,16780 are for SEROUT2
    Steve

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

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