CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Is anybody using a 480x320 TFT with a PIC?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
starfire151



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

Is anybody using a 480x320 TFT with a PIC?
PostPosted: Thu Oct 12, 2023 4:32 pm     Reply with quote

Is there anyone using a graphics display (i.e. 480x320 TFT, like HX8357) with a PIC microcontroller?

If so, is there a library posted?

Thanks.
newguy



Joined: 24 Jun 2004
Posts: 1908

View user's profile Send private message

PostPosted: Thu Oct 12, 2023 5:10 pm     Reply with quote

Many years ago I used an FTDI EVE chip (probably the FT801) mated to a dsPIC with a *lot* of memory to interface to an RGB 320 x 240 display w/ capacitive overlay for touch detection. I've never tried mating a PIC directly to an RGB display.

The EVE chip had bugs but the end result wasn't too bad. Honestly, use something like an STM32 or the like - bite the bullet and learn a new toolchain because PICs aren't really meant to drive an RGB display.
Jerson



Joined: 31 Jul 2009
Posts: 125
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Thu Oct 12, 2023 8:24 pm     Reply with quote

If you're referring to an arduino TFT shield type display, they can be used with a 8 bit data bus. As far as I know, there is no ready library that you will find other than the ones written for arduino. You need to customise that to communicate with the TFT. Again, in the same form factor, there are many drivers that are on the TFT, not just the HX you mention.

Another point you should note, the amount of pixels to transfer (480x320) and doing it in code makes it very slow to refresh the TFT. You may not get more than 1 or 2 FPS doing a screen wipe. That is something you should consider if it matters to your project.

An easier option to consider would be a touch screen HMI like global.dwin.com or nextion which takes away the burden to drawing the screen and you just communicate with the HMI via serial UART.
temtronic



Joined: 01 Jul 2010
Posts: 9234
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Oct 13, 2023 5:45 am     Reply with quote

Since no CCS C driver or library exists, simply translate the ardunio version.
Ttelmah



Joined: 11 Mar 2010
Posts: 19531

View user's profile Send private message

PostPosted: Fri Oct 13, 2023 6:12 am     Reply with quote

The big problem is RAM.
If you are doing anything at all complex with a display, you end up having
to hold copies of a lot of the display RAM in the processor. Most PIC's do
not have enough RAM to do this. I have quite large graphic LCD's with
touchscreens on several systems, but the larger ones are all on DsPIC;s
not smaller chips.
The compiler does come with a complete graphic library for a display,
to give basic lines, circles text etc., without using too much RAM.
The example for this is EX_GLCD.c, and this is supplied to work with
a HDM64G12 controller. It can be adapted for others.
You will almost certainly find that 98% of PIC's will not have enough
RAM to use the Arduino libraries.
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Fri Oct 13, 2023 6:16 am     Reply with quote

Just google PIC TFT and you will find quite a bit.

In addition to the CCS version, there are at least two Github PIC-TFT projects
ut there which are fairly easy to translate. There is also a Mikroe driver I
converted initially that worked fairly well then I added a touch controller. I
had to eventually move to a 120MHZ DsPIC to get half decent response times
on a 4" TFT.
_________________
Google and Forum Search are some of your best tools!!!!
starfire151



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PostPosted: Fri Oct 13, 2023 8:30 am     Reply with quote

Thanks to all who responded! Great info!

Yeah, I kinda figured RAM would be the major stumbling block. I was thinking of using an external FRAM (like the FM25V10, 128K x 8) but I think the interface between the PIC, the FRAM, and the TFT would be way too slow for any practical use. I'm using a Teensy 4.0 with an Adafruit HX8357 right now in the Arduino environment and it works quite well. The Teensy 4.0 runs at 600MHz and has a lot of RAM and other functions. It's kind of a power hog, though. That's why I was looking at downsizing to a PIC.

If it works, don't fix it... Very Happy

Thanks again.
Ttelmah



Joined: 11 Mar 2010
Posts: 19531

View user's profile Send private message

PostPosted: Sat Oct 14, 2023 7:21 am     Reply with quote

Remember, there are 'smart' graphic LCD's, where you can just send
basic commands like the text screens. You then don't have to hold the
screen in your processor memory.
Historically these were expensive, but there are a surprising number now
at reasonable prices. You can get SPI and synchronous serial units.
Lot's of the OLED's offer this, and quite a few other displays also support
it.
starfire151



Joined: 01 Apr 2007
Posts: 195

View user's profile Send private message

PostPosted: Sun Oct 15, 2023 6:12 am     Reply with quote

Do you have some model numbers of some smart displays you've used or you know there's libraries for?
I've used the Nextion NX4832T035 before with an Arduino project. I was thinking of trying to use it with a PIC, since it uses a simple serial interface. Do you know of any that have a I2C or SPI interface?
Thanks, again.
temtronic



Joined: 01 Jul 2010
Posts: 9234
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Oct 15, 2023 6:28 am     Reply with quote

use google '480x320 tft' and you'll get a million hits...
most under $75, one ( PI ) is only $12 US !!! for a 3.5" screen.
Only you can decide which unit to buy, based upon availability, cost, features, etc.
In the 'dinodayze' I interfaced an 8 bit IDE VGA video card to the 'new' 16F877.sigh.....been a few changes since then.....

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19531

View user's profile Send private message

PostPosted: Mon Oct 16, 2023 4:51 am     Reply with quote

'480x320 tft' hits you get here are not the 'smart LCD' hits that you need
for the units with built in smart controllers.
Look for 'intelligent' or 'smart tft' for units with these controllers.
I've used the EVE3 and EVE4 controllers, but these are for much larger
screens (1280*760).
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Dec 18, 2023 12:03 pm     Reply with quote

Sorry I'm late to replying to this..

There used to be (haven't looked lately) PIC24 family micros that have RGB display capabilities built into the hardware. I don't know if microchip still makes them. They have buffer memory and can do the refresh rates for driving about the size display you mention.

I've hooked PIC18F's to an RGB OLED display (128x128) for something - but that used an onboard controller (SED1339 IIRC) and I essentially grafted some of Microchip's PLIB drivers into CCS to write the code that runs on the PIC.

So - writing to a controller based display is also always an option.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Ttelmah



Joined: 11 Mar 2010
Posts: 19531

View user's profile Send private message

PostPosted: Tue Dec 19, 2023 6:13 am     Reply with quote

These are the 24F DA family. They don't support normal full RGB, but a
256 maximum colour palette from a look-up table, which you program.
Normal max 480x272. So smaller than was being asked about.
You can go larger at lower frame rates though.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group