Page 1 of 1
Printing on an LCD What is received on RX pin
Posted: Thu Sep 12, 2013 9:35 pm
by acestu
Hi,
I was wondering if somebody could tell me how to print on an lcd display what is being received on the RX pin for test purposes..
Thanks in advance
Acestu
Re: Printing on an LCD What is received on RX pin
Posted: Thu Sep 12, 2013 10:50 pm
by Jordy101091
If you mean RX as in serial receive, you can use the interrupt on RX function.
In this macro you put a macro that receives the rs232 data.
For displaying this you can set the macro in you main loop.
Hope this is easy to understand for you to work with I don't have a pc in reach so if you have trouble to understand I can make a example tomorrow.
Regards Jordy
Re: Printing on an LCD What is received on RX pin
Posted: Thu Sep 12, 2013 11:16 pm
by acestu
Hi Jordy,
Thanks for the info, I will have a go now...
cheers
Acestu
Re: Printing on an LCD What is received on RX pin
Posted: Thu Sep 12, 2013 11:51 pm
by medelec35
Hi Stuart.
I used the attached Flowchart to communicate two ways between a PC and microcontroller.
When uses with a terminal program, you type a letter/number on the PC then the corresponding letter appears on the LCD.
Re: Printing on an LCD What is received on RX pin
Posted: Thu Sep 12, 2013 11:56 pm
by acestu
Hi Jordy,
Sorry I am getting mixed up here, It's quite late now

I want to display what the chip is sending out on the Tx pin for troubleshooting purposes...
thanks
Acestu
Re: Printing on an LCD What is received on RX pin
Posted: Fri Sep 13, 2013 9:06 am
by Jordy101091
Do you want to display the transmitted value on the same chip as where you are sending from., or do you want to display the transmitted value on the receiving chip.
for the first one I would do something like this:
I would setup something like a echo system, which involves two chip but im see you only describe one chip so I don't know if that is a possibility.
So how this would work is as follow:
CHIP#1: send data
CHIP#2: receive data
CHIP#2: send received data
CHIP#1: receive data
CHIP#1: Display received data
For the seconds, you could use the seconds chip as you data display and use the method with RXINT as described above.
Hope this would help you,
Regards Jordy
Re: Printing on an LCD What is received on RX pin
Posted: Fri Sep 13, 2013 10:00 am
by acestu
Hi Jordy,
Yes this sounds like it is exactly what I want to do....
Cheers
Acestu
Re: Printing on an LCD What is received on RX pin
Posted: Fri Sep 13, 2013 9:22 pm
by acestu
Hi Martin,
Sorry, I didn't see your post, thanks for the chart, basically I cant get the Visi Genie component working, it is fine in simulation, but when uploaded to the chip nothing happens so I wanted to add an LCD and print anything that the chip transmits so that I can see what is going on or not for that matter...
cheers
Acestu
Re: Printing on an LCD What is received on RX pin
Posted: Fri Sep 13, 2013 9:46 pm
by medelec35
Hi Stuart,
acestu wrote:Sorry, I didn't see your post, thanks for the chart
No worries
acestu wrote: it is fine in simulation, but when uploaded to the chip nothing happens so I wanted to add an LCD and print anything that the chip transmits
Ah I see.
That may not be that simple.
For LCD to show character then baud rate has to be quite accurate with correct start bit data bits and stop bits.
If any of those are out, then your see either corrupt characters or no characters at all.
You might be lucky but you maybe best with some type of data analyser.
I have got the Testpod:
http://www.matrixmultimedia.com/product.php?Prod=Eb070
Which can analyse CAN SPI RS232 I2C etc.
I could set up hardware for you and analyze/measure what's appearing at the pin in question.
If you would like me to do that then let me know.
Martin
Re: Printing on an LCD What is received on RX pin
Posted: Sat Sep 14, 2013 12:52 am
by acestu
Hi Martin,
Thanks for the offer, but you can probably tell from my other posts that I don't need to do it now as I found out why it wasn't working, ie it needed the delay to allow 4D display time to initiate, once I had it going I tried an ADC test with your donated calculation in it which worked fine, I will post the chart when I have finished so others can try it....
thanks
Acestu