mikromedia for PIC18FJ + VisualTFT

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
VladimirG
Posts: 39
Joined: 04 May 2012 10:52
Location: Canada

mikromedia for PIC18FJ + VisualTFT

#1 Post by VladimirG » 07 Feb 2019 06:54

Hi all,

I use the mikromedia for PIC18FJ and VisualTFT software. Could you please advise how to display data on the screen (on the Box component) being received from the UART port? Something looks like a Terminal program on a PC.
I am good with the data receiving but can't display it.
I will be appreciated for piece of code or some working example.

Thanks!

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikromedia for PIC18FJ + VisualTFT

#2 Post by stefan.filipovic » 07 Feb 2019 15:55

Hi Vladimir,

Please find in the attachment an example for displaying UART receive on the TFT.

Kind regards,
Attachments
Calculator Pascal.zip
(668 KiB) Downloaded 122 times
Stefan Filipović

VladimirG
Posts: 39
Joined: 04 May 2012 10:52
Location: Canada

Re: mikromedia for PIC18FJ + VisualTFT

#3 Post by VladimirG » 08 Feb 2019 05:06

Hi Stefan,

Thank you for the source code. It looks like it is compiled for the ILI9341 hardware but my old board based on the HX8347-D. I tried to recompile the project for the HX8347-D but my Visual TFT app stopped working at all. :) Even with examples. I re-installed the VTFT and repeated the same described above. The screenshots attached. The mikroPascal calculator project works/is compiling with no any issue, but I see only empty display after mikromedia programming.
Attachments
TFT2.JPG
TFT2.JPG (108.82 KiB) Viewed 2478 times
TFT1.JPG
TFT1.JPG (133.56 KiB) Viewed 2478 times

VladimirG
Posts: 39
Joined: 04 May 2012 10:52
Location: Canada

Re: mikromedia for PIC18FJ + VisualTFT

#4 Post by VladimirG » 08 Feb 2019 06:27

Hi again,
Finally I have your code in working condition and two 'UART READ' labels on the right bottom corner of the Calculator display. The 'UART READ' disappeared after a couple of bytes being received from the UART but there is not any data displayed.

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikromedia for PIC18FJ + VisualTFT

#5 Post by stefan.filipovic » 08 Feb 2019 11:55

Hi Vladimir,

This example is for the mikromedia for PIC18FJ which comes with MI0283QT-9A TFT display with ILI9341 driver.
And this is just a simple example of receiving and displaying UART data on the TFT.
There is a comment in the code which says that the function UART1_Read_Text(TextTest, 'OK', 10); actually reads the text from UART until 'OK' is found, and number 10 defines a number of received characters in which 'OK' sequence is expected.
So, try to send some text to the RC7 and after that send 'OK' to display text on the TFT.

Kind regards,
Stefan Filipović

VladimirG
Posts: 39
Joined: 04 May 2012 10:52
Location: Canada

Re: mikromedia for PIC18FJ + VisualTFT

#6 Post by VladimirG » 08 Feb 2019 23:31

Hi Stefan,

Yes, that works as you described.

One more question. I need the incoming data to be scrolled up, I mean the data being received overrides the previous one. But previous data should be scrolled up/presented above. Some similar screen appearance as we have when we start some Linux script/update.

Thanks again!

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: mikromedia for PIC18FJ + VisualTFT

#7 Post by stefan.filipovic » 11 Feb 2019 12:37

Hi Vladimir,

Unfortunately, for this graphics controller, there is not a scroll component in the tools palette.
Because of that, there's not an example similar to the example which simulates a UART Terminal and displays it on the TFT with scroll possibility.

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroPascal PRO for PIC General”