Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LINKS: GLCD and touch screen: tutorials, code and info

Status
Not open for further replies.

3v0

Coop Build Coordinator
Forum Supporter
Links to GLCD and touch screen tutorials and code both here on ETO and on the web in general. If you have written one or know of a good link post to this thread and we will edit this list which will be made sticky.

Please start a new thread to ask question.

The basic format will be

Controller Number
Tutorial Links
Code Links

ST7565

T6963C
Part 1:Initialization Procedure
PIC16F887 and a 240x64 GLCD display. Complete with code examples in ASM for the base initialization procedure and a full explanation of what each code segment does.
 
Last edited:
Here's one I just finished for the Toshiba T6963C controller. In my example I use a 16F887 and a 240x64 GLCD display. Complete with code examples in ASM and a full explanation of what each code segment does.

https://www.electro-tech-online.com/threads/npn-transistor.482/

This article will get you through the base initialization procedure to prepare the display to accept data and place it on the display. Hopefully soon I will have a second article to illustrate how to both display text as well as graphics.
 
Last edited:
Nice idea for a thread.

Attached is a driver I wrote for an ADS7843 Touch Screen Controller. I have used a PIC32MX795F512L and MPLAB with C32. It should take little to convert it to another other PIC with a free SPI port though. Though not sure if the SPI libraries are compatible between PIC releases. All the info is in the header file and should be pretty easy to get up and running. It's pretty-well commented.

Sometime soon I will post a driver for an ILI9325 TFT Colour LCD Controller with simple graphic functions. Probably after christmas holidays :)
 

Attachments

  • ADS7843.h
    2 KB · Views: 768
  • ADS7843.c
    3.2 KB · Views: 909
Last edited:
Just recently, I too had to access a touch screen (4 wire resistive ) using a pic ( and a max 232 chip if needed) to send digital data from the touch panel.
Very easy to implement... This uses oshonsoft basic..
 

Attachments

  • touchrx.PNG
    touchrx.PNG
    3.6 KB · Views: 1,114
  • Touch rx.bas
    809 bytes · Views: 633
Last edited:
please tell me how to interface it with an avr controller and which touch screen will be better i have to control about 20 different appliances through touch screen
 
please tell me how to interface it with an avr controller and which touch screen will be better i have to control about 20 different appliances through touch screen

In case you missed it on the very first post here,

Please start a new thread to ask question.
 
3v0, this is a spectacular thread. Perhaps someone could chime in with the sources of the GLCD panels / touchscreens?
 
I use eBay :)

There are many different modules on eBay, including bare LCD's without a controller up to full modules including Touch Screen, Touch Screen Controller, SD Card Socket, Flash Memory all in the one 40-pin module.

They range in sizes from < 1" all the way up to > 7".

The main thing I would look at when choosing a screen is which controller it uses. If you are unsure of writing the driver yourself then make sure you choose one which already has a driver floating around on the net or one which is supported by (e.g.) Microchips Graphics Library.
 
Here's my post for the ST7565, which is finally finished: **broken link removed**
 
Last edited:
Here are a couple of drivers which I have adapted from elsewhere/written to work on my hardware. Each driver is for a RGB565 65K color LCD. Hardware is PIC32 using 16-bit PMP.

There is basic functions for each including Init and PutPixel and GetPixel.

There is a driver for SSD1963 and for ILI9325.
 
I have updated the touch controller!! It seemed a little unstable.. Usable, but unstable..

Using two ADC inputs and two 100k resistors is all that's needed.. ( You can use two 47nF decoupling caps, but I don't read the ADC's too fast and I need a bit of noise as I oversample... Up to you ).

You only ever need to read two of the wire's... X+ and Y-.
First look at the schematic..
touch.png


To read your X plane Tris state Y+ and Y- ... Place logic 1 on X+ and logic 0 on X-.. Read Y-.
To read your Y plane Tris state X+ and X- ... Place logic 1 on Y+ and logic 0 on Y-.. Read X+.

Now there is another plane you need to worry about.... The Z plane!! This is how much pressure has been applied to the panel..

To read the Z plane you need to do the same as you do for the X plane but both X+ and X- are given a logic 1 and when you read the Y- pin the higher the value the harder the press... BUT!!! The reading is logarithmic, so the threshold has to be set high.. on a 10 bit ADC you are looking at an ADC reading of 950 +..

The Z plane sensitivity can be increased by using lower pulldown resistors... I have seen them as low as 300ohm but as the screen planes are in the order of 300 ohm it will decrease the sensitivity of the X and Y planes...

The beauty of the Z plane is, you only need to read the X and Y values when a valid press is detected...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top