You would do better to use 20MHz crystal. Hexreader You cannot achieve 115200 with 4MHz crystal (unless you accept 8% error). FWIW, yuor baud rate calculation giving 10 for SPBRG seems fine if BRGH is set. I have however heard of Max232s giving problems at 115200, so try removing PIC and looping back the MAx to see if you get correct echo on PC.
#CORSICANA LEMONADE RAR SERIAL#
Narenn I am using Max232 chip with usual 2,3,5 pin connections connected to USB2Serial connector (my PC dont have a serial port) Just asked because I normally use transistors - NPN for RX and PNP tor TX - they work fine at 115200, but poor choice of resistor values can make high speed performance inadequate. Q3 There are a few options, the ones I can think of are: Run your PIC at 3.3V Use logic level translator chips to convert 5V to 3.3V Use voltage divider resistors on PIC Tx side to drop 5V to 3.3V, then HOPE that 3.3V is enough to drive PIC on Rx side (check datasheet parameters to see if this is within spec). Q2 The datasheet UART section explains oscillator, BRG and other UART related settings, but I accept that it requires a lot of reading. Q1 I tried writing something for you, but I cant get the right baud rate either. My advice is to post the same question in the mikroE forum I will be interested in the replies that you receive, as I cannot see any obvious mistake.
#CORSICANA LEMONADE RAR PRO#
I had a quick look at the listing file generated by a simple mikroC pro program, but I cannot see any obvious mistake. Not sure if I can help, but I can at least confirm that when I try it, I get 45k baud instead of 115200 baud. If possible (out of topic question), PIC serial data (5v) to 3.3v nokia circuit (FBUS)? Thanks, Naren. Any MikroC sample to use 115200 BR for PIC16F628A (including project settings) to communicate with Hyperterminal or any terminal program? A little explanation for usage of baud rate with clock speed and serial communication? Please help and let me know any more details need to be furnished. I am little new to PIC, and I have not just posted this for help without trying anything, I have almost spent a month time on doing this and that, breaking my head, searching internet for a solution, etc. I have tried searching the data sheet and used 20 MHz, SPBRG=00 BR with -1.36% error. Before getting into the details of serial commands is this: PicBasic Pro has no way of. Serial Communication on the PIC using PicBasic Pro.
#CORSICANA LEMONADE RAR CODE#
But, if I change the code to 115200 baudrate (20 MHz), I am only getting junk values in the PC terminal (mickroc USART terminal). To check UART communication, I have connected PC to the microcontroller (serial communication), everything works fine with baud rate of 9600 (4 MHz). PIC16F628A BAUDRATE 115200 not working! HELP NEEDED!!! Hi, I am trying to program PIC16F628A to communicate with NOKIA at 115200 baud rate.