We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi. I'm working on a project involving a java program and the micro controller NXP P89v664.
The java program which utilises the RXTX package, outputs to the serial port a string of characters to be deciphered by the micro controller.
My java program is completed and outputs correctly as checked by virtual com ports and a c program.
I have written a keil c program to receive the input but I somehow receive random inputs instead.
I used the _getkey() fuction to receive the input and putchar() function to check the output.
I'm new to keil c can anyone shed some light on this pls?
Thanks.
Always good to have your microcontroller try to send a couple of characters. Then you can measure the baudrate with an oscilloscope just to make sure that you don't have any computation errors. Large errors would result in constantly broken characters being received but switching two digits could result in baudrate errors that just make every 100 character fail.
So the baudrate should always be verified my actually measuring the data rate.
Always good to have your microcontroller try to send a couple of characters. Then you can measure the baudrate with an oscilloscope just to make sure that you don't have any computation errors Constantly transmitting uppercase U is excellent for this purpose, a properly coded UART will generate a a square vawe with the frequency of baudrate/2
Erik