hserout not working with parity


Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Aug 2008
    Posts
    66

    Question hserout not working with parity

    Code:
    'PIC18F4550
     __CONFIG    _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L
    	
           
    __CONFIG    _CONFIG1H, _FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
            
    __CONFIG    _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    __CONFIG    _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H 
     __CONFIG    _CONFIG4L, _LVP_OFF_4L & _ICPRT_OFF_4L & _XINST_OFF_4L
    
    
    DEFINE OSC 48      
    
    
    BAUDCON.3 = 1 'SETUP FOR HIGH SPEED.
    DEFINE HSER_RCSTA 90H
    DEFINE HSER_TXSTA 24H 'HIGH SPEED MODE BAUD RATE GENERATOR
    DEFINE HSER_BAUD 38400
    DEFINE HSER_SPBRG 38H '38400 BAUD =56 dec
    DEFINE HSER_SPBRGH 01H
    
    
    HSEROUT ["HELLO",13,10] 'test

    The above code works, but when i added the following, it gives out garbage character in hyperterm 38400,E,8,1

    DEFINE HSER_EVEN 1
    DEFINE HSER_BITS 9

    Any idea?
    Last edited by Pic2008; - 23rd March 2010 at 15:41.

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