PIC16f1527 UART1 selection | Microcontroller › PIC › PIC16f1527 UART1 selection This topic has 0 replies, 1 voice, and was last updated 11 years, 8 months ago by Parthiban. Viewing 1 post (of 1 total) Author Posts March 2, 2013 at 4:51 am #2155 ParthibanParticipant PIC16f1527 FOSC-20mhz,baudrate-57600,Hi tech c compiler I have doubt,how to configure UART1 selection and UART1 configuration bits, baudxcon bits. Baudrate formula calculation in c program int X; /* calculate and set baud rate register */ /* for asynchronous mode */ tmp = 16UL * baud; X = (int)(FOSC/tmp) - 1; if((X>255) || (X<0)) { tmp = 64UL * baud; X = (int)(FOSC/tmp) - 1; if((X>255) || (X<0)) { return 1; /* panic - baud rate unobtainable */ } else BRGH=0; /* low baud rate */ } Author Posts Viewing 1 post (of 1 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In