Printing on an LCD What is received on RX pin

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Printing on an LCD What is received on RX pin

Post 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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post by acestu »

Hi Jordy,

Thanks for the info, I will have a go now...

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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.
Attachments
RS232 TXRX PC Test1.fcf
(11.5 KiB) Downloaded 281 times
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post by acestu »

Hi Jordy,

Sorry I am getting mixed up here, It's quite late now :oops: I want to display what the chip is sending out on the Tx pin for troubleshooting purposes...

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Jordy101091
Posts: 519
Joined: Sat Jan 08, 2011 4:02 pm
Location: The Netherlands
Has thanked: 25 times
Been thanked: 188 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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
the will to learn, should not be stopped by any price

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post by acestu »

Hi Jordy,

Yes this sounds like it is exactly what I want to do....

Cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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
Martin

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Printing on an LCD What is received on RX pin

Post 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.... :D

thanks
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

Post Reply