HSER baudrate


Closed Thread
Results 1 to 15 of 15

Thread: HSER baudrate

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755

    Default parity

    I continue where I left off ...
    This is code:
    Code:
             define OSC 4
            OSCCON=%01010110
    
    DEFINE HSER_CLROERR 1 'Hser clear overflow automatically 
    '        SPBRG = 25  ' 9600 Baud @ 4MHz, 0.16%
    '        TXSTA = $24 ' Enable transmit, BRGH = 1
    '        RCSTA = $90 ' Enable serial port & continuous receive
    DEFINE HSER_BAUD 9600        'Set Baud rate to 9600bps
    DEFINE HSER_BITS 9        'Set to 9 bit mode
    DEFINE HSER_EVEN 1        'Set Even Parity
    
    TRISB.7 = 0 'Make Tx output
    TRISB.5 = 1 'Make Rx input
    
    main:
     pause 1000
     HSerOut ["Parity:)"]
    goto main
    Use this or not
    Code:
    DEFINE HSER_BITS 9        'Set to 9 bit mode
    DEFINE HSER_EVEN 1        'Set Even Parity
    Always get a 9600, N, 1. PIC never send parity bit.
    I'm banging head all day, but I can't catch what I missed.

  2. #2
    Join Date
    Sep 2009
    Posts
    755

    Default Re: HSER baudrate

    Problem solved, thanks to Darrel.
    I find solution in this topic.

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