Hello Mr Raj, Thank for your PIC post series, it is great your work for every beginner like me. I had followed stricky this your Uart guide, but unlucky. First times, when run hardware with USB-rs232 P9 convertor (without GND common to COM port of convertor)I can turn on/off LED (not receive any thing in ternminal), but after some my small change in code to send only one character or shorter string also on test board for better program over icsp which i did'nt recognized excactly which change is cause, i even now can not turn Led on/off also receive any thing.
Apr 4, 2017 - A RS232 to USB converter is required to convert the serial data into computer. Programming PIC Microcontroller for UART Communication. Navigate to Set Up -> Port Configuration or press Alt+C, to get the following pop. Pic16f690 Serial Communication C Code Operators Rating: 10,0/10 7222reviews Search for: Post. Communication Using PIC (USART) Serial communication is very important for. Specification of the protocol and write a code.
When i common ground PIC and COM convertor, i can receive sometimes some weird characters. I had came back to simulate in Proteus with virtual terminal and oscilloscope to measure on A and C channel for rx/tx and i could see pules in channels but also didnt received any character also turn on/off LED. My hardware board is supplied by 12v adapter over LM7805cv to 5v, pin 1 connected to pin 1 icsp with isolate circuit as PICkit2 datasheet. Could you guide me how to investigate those error, Thank You alot for your any commend and guide! Thank for your soon reply, Mr Raj, (without GND common to COM port of convertor:That means when First time i tried in test board, i did'nt connect COM pin 5 to ground of test board but i could turn led on/off, but could not receive any thing on virtual terminal software.
That is sames status for about 10 times. But after some small change with code also hardware, or even recover back your original code, i even can not turn led on/off any more. When i connect COM pin 5 to ground of test board, sometimes i can see weird string in terminal (i understand that's for string in UART_init code), but still cannot turn led on/off.
That means i can not transmit or receive any things. Sorry i stiil find how to post my picture or attach file in this reply which captures pulses in rx/tx channels on Proteus oscilloscope emulation evironment. Thank Raj, 1-I had never think to change MCU frequence, i thought frequence from crystal, after change mcu freq from 1 to 20 Mhz, i can see weird string as pic but still can not turn on/off LED 2- You mention to hex file that means MCU firmware, i click to MCU firmware and replace again your origin code and simulate again with same above state, have some warning as i casting example from UART_send_string('UART Module Initialized and active') to UART_send_string((char *)'UART Module Initialized and active'); to avoid warning but that 's for skip code warning only, simulation is same. Thank Mr Raj, Everything follow guide, but i'm still unlucky, i added max232 to simulation also to testboard and i had better result but still not complete it, not receive the exact expected result. I get ok result with other uart lesson (on test board, not well with simulation) which use C prinf function and BRGH = 0 also RCIE. I'm trying to understand that code fully and will come back to investigate my issue in your lesson. Another way,I think i did'nt understand my proteus Hyper Terminal fully or it (Proteus 8.1) does not run exactly in Win7 64.