16F877A serin problem with baud rate 19200


Closed Thread
Results 1 to 2 of 2
  1. #1
    leemin's Avatar
    leemin Guest

    Exclamation 16F877A serin problem with baud rate 19200

    Hi every1,
    dis is my 1 time posted my problem. i encounter a problem when using de comman serin. my program working fine with baud rate 9600,8,N,1 but i do not know how 2 change de baud rate to 19200. any1 can help me out. thank you very much

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

    Default

    As far as i'm aware of, SERIN will never work @19200 bauds

    You must use HSERIN with the internal USART

    @4mhz
    Code:
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_SPBRG 12 ' 19200 Bauds
    DEFINE HSER_CLOERR 1
    @8MHZ
    Code:
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_SPBRG 25 ' 19200 Bauds
    DEFINE HSER_CLOERR 1
    @20MHZ
    Code:
    DEFINE HSER_RCSTA 90h
    DEFINE HSER_TXSTA 24h
    DEFINE HSER_SPBRG 64 ' 19200 Bauds
    DEFINE HSER_CLOERR 1
    But there's an alternative that could work, see DEBUG in the PBP manual
    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 : 1

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