Cannot get touch screen display to initialize
Moderator: Benj
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Cannot get touch screen display to initialize
Hi,
I have recently purchased a 32ptu touch screen display from 4D systems. Using the 4D systems “workshop 4” I can create displays and download them to the display and using the touchscreen, the display animations all work ok.
I have now connected a 16F877A to the display. PortC 5 reset is connected to the reset pin on the display, portC 6 tx is connected to rx on the display and portc 7 rx is connected to tx on the display.
I have checked the configuration of the display in flowcode and have that selected as an EB076.
I have attached a simple program that has a 10sec delay then the initialization macro for the display and then in a loop I have A0 toggling on and off every second. If I run the program without the initialization for the display the output will toggle. When I run the program with the initialization macro after 10 seconds the screen will flash and” mounting” briefly appears on the screen and that is all that happens. The output A0 in the loop is now inactive like the program is tied up in the initialization macro. As a result no other functions for the display are able to work
I have tried using the software mode for the uart, have tried an 18F452 and have tried different speed crystals in the oscillator circuit all without any luck.
The only other thing I can think that it possibly might be is an issue with firmware revisions??? and the initialization code not being compatable with it. I’m not sure where to go from here. Any help would be most appreciated.
Cheers
Zane
I have recently purchased a 32ptu touch screen display from 4D systems. Using the 4D systems “workshop 4” I can create displays and download them to the display and using the touchscreen, the display animations all work ok.
I have now connected a 16F877A to the display. PortC 5 reset is connected to the reset pin on the display, portC 6 tx is connected to rx on the display and portc 7 rx is connected to tx on the display.
I have checked the configuration of the display in flowcode and have that selected as an EB076.
I have attached a simple program that has a 10sec delay then the initialization macro for the display and then in a loop I have A0 toggling on and off every second. If I run the program without the initialization for the display the output will toggle. When I run the program with the initialization macro after 10 seconds the screen will flash and” mounting” briefly appears on the screen and that is all that happens. The output A0 in the loop is now inactive like the program is tied up in the initialization macro. As a result no other functions for the display are able to work
I have tried using the software mode for the uart, have tried an 18F452 and have tried different speed crystals in the oscillator circuit all without any luck.
The only other thing I can think that it possibly might be is an issue with firmware revisions??? and the initialization code not being compatable with it. I’m not sure where to go from here. Any help would be most appreciated.
Cheers
Zane
- Attachments
-
- TestDisplay.fcf
- (9 KiB) Downloaded 357 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Cannot get touch screen display to initialize
Hello Zane,
First of all can you tell me what frequency crystal your using so I can check your config and clock speed settings are correct. These need to be correct so that the baud rate to drive the display is correct. A one second led flasher test should help as a sanity check to ensure all your settings are ok.
The 32PTU is a new device which I have not used yet, we currently supply the older 32PT device but the compatibility between the two should be ok.
The 32PT displays come with firmware options, one to drive the display using the 4D scripting language on a card and the other to drive the display using the microcontroller interface. Looking at the 32PTU it does not seem to have this option listed on the website so not sure if this display doesn't support this or if the information is just not there yet.
See the Pmmc information here in the downloads tab for the 32PT display.
http://www.4dsystems.com.au/prod.php?id=114
First of all can you tell me what frequency crystal your using so I can check your config and clock speed settings are correct. These need to be correct so that the baud rate to drive the display is correct. A one second led flasher test should help as a sanity check to ensure all your settings are ok.
The 32PTU is a new device which I have not used yet, we currently supply the older 32PT device but the compatibility between the two should be ok.
The 32PT displays come with firmware options, one to drive the display using the 4D scripting language on a card and the other to drive the display using the microcontroller interface. Looking at the 32PTU it does not seem to have this option listed on the website so not sure if this display doesn't support this or if the information is just not there yet.
See the Pmmc information here in the downloads tab for the 32PT display.
http://www.4dsystems.com.au/prod.php?id=114
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Cannot get touch screen display to initialize
Hi Ben,
I have tried two different crystals, most of the tesing has been done with a 19.660800mhz crystal, have also tried a 16mhz one as well.
Cheers
Zane
I have tried two different crystals, most of the tesing has been done with a 19.660800mhz crystal, have also tried a 16mhz one as well.
Cheers
Zane
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Cannot get touch screen display to initialize
Hi Ben,
I have had a bit more of look into this. The display can use the 4dgl programming language using the "workshop4" software. From this package running in the serial environment you can download the "spe" application which sets the display up as a slave serial module (this is the default mode from the factory).
Here is the link for the serial command set reference manual. http://www.4dsystems.com.au/downloads/S ... EV1.11.pdf.
I am not overly familiar with C code so i hope i have this right, looking in the component macros for flowcode, a clear for example is 0x45 however with the new display from the reference manual it is 0xffcd. At a brief glance all the commands are 2 bytes long.
How much work would it take to update the component macros to allow you to be able to use the newer type display?
Thanks for your help
Zane
I have had a bit more of look into this. The display can use the 4dgl programming language using the "workshop4" software. From this package running in the serial environment you can download the "spe" application which sets the display up as a slave serial module (this is the default mode from the factory).
Here is the link for the serial command set reference manual. http://www.4dsystems.com.au/downloads/S ... EV1.11.pdf.
I am not overly familiar with C code so i hope i have this right, looking in the component macros for flowcode, a clear for example is 0x45 however with the new display from the reference manual it is 0xffcd. At a brief glance all the commands are 2 bytes long.
How much work would it take to update the component macros to allow you to be able to use the newer type display?
Thanks for your help
Zane
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
Re: Cannot get touch screen display to initialize
this would be great if matrix could update the commands, i have two of the newer displays and am in the same situationI am not overly familiar with C code so i hope i have this right, looking in the component macros for flowcode, a clear for example is 0x45 however with the new display from the reference manual it is 0xffcd. At a brief glance all the commands are 2 bytes long.
How much work would it take to update the component macros to allow you to be able to use the newer type display?
Thanks for your help
Zane
Zane
Flowcode v5 User
Posts: 37
Joined: Thu Sep 10, 2009 2:57 pm
Location: New Zealand
Has thanked: 1 time
Have thanks: 1 time
-
- Posts: 438
- Joined: Mon Aug 29, 2011 12:26 am
- Location: arizona
- Has thanked: 175 times
- Been thanked: 173 times
- Contact:
Re: Cannot get touch screen display to initialize
dude check it out: upload pmmc file here and all will work https://dl.dropbox.com/u/10367218/uLCD- ... C-R22.PmmC test to be sure
heres the link i got it from http://www.4dsystems.com.au/prod.php?id=113
its SGC not gfx
heres the link i got it from http://www.4dsystems.com.au/prod.php?id=113
its SGC not gfx
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Cannot get touch screen display to initialize
Hi Brandon,
Thanks for coming up with this solution, i will give it try. Cheers.
Thanks for coming up with this solution, i will give it try. Cheers.
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Cannot get touch screen display to initialize
The above suggestion works as required, thank you, your help has been appreciated.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Cannot get touch screen display to initialize
Hi Zane,
I tried to download your file and Avast said it was a Malware and would not let me open it...
cheers
Acestu
I tried to download your file and Avast said it was a Malware and would not let me open it...
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.
Computers are like air conditioners. They work fine until you start opening windows.
-
- 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: Cannot get touch screen display to initialize
Hi Acestu,
You may have read this:
http://www.matrixmultimedia.com/mmforum ... 47&t=12223
Its is a false positive detection, its not the file that was posted, but the Flowcode executable file when you compiled flowchart.
What I did was open Avast user interface, Select Antivirus, then File System Shield, Settings.
Select Exclusions then browse to your Flowcode directory/s path.
You can find path when selecting Build then compiler options.
I also selected all the Flowcode directories for exempt from scanning. Not sure if both steps are required, but did so just to make sure.
Martin
You may have read this:
http://www.matrixmultimedia.com/mmforum ... 47&t=12223
Its is a false positive detection, its not the file that was posted, but the Flowcode executable file when you compiled flowchart.
What I did was open Avast user interface, Select Antivirus, then File System Shield, Settings.
Select Exclusions then browse to your Flowcode directory/s path.
You can find path when selecting Build then compiler options.
I also selected all the Flowcode directories for exempt from scanning. Not sure if both steps are required, but did so just to make sure.
Martin
Martin
-
- Flowcode v5 User
- Posts: 199
- Joined: Thu Sep 10, 2009 10:57 pm
- Location: New Zealand
- Has thanked: 93 times
- Been thanked: 76 times
- Contact:
Re: Cannot get touch screen display to initialize
In relationship to the issues I have had getting this newer type display to work I have placed a few notes below to help anyone else who is planning on doing the same to hopefully make life a bit easier.
Before you begin you will need a 4D programming cable and also have the driver installed. You can get that from here
http://www.4dsystems.com.au/product/17/ ... -Cable/The drivers are at the bottom of the page.
Then you need to download the 4D software from here http://www.4dsystems.com.au/group/10/Development/
Once you have done this you will need to download the old firmware version from here. Brandonb has already kindly listed this above on another post.
http://old.4dsystems.com.au/prod.php?id=209 ..... this is the file you need uLCD-32PTSGC-R22.PmmC (HX8347A Driver IC) For other sized displays you will need to go here and find the display type you are after. You need to SGC version not GFX.
Once you have done this you need to open the 4D software (you may need to run this as an administrator for it to work correctly) and create a new project, it is all fairly simple. Once this is done go to the tools menu and select the PMMC loader and load the software.
From now on you should be able using Flowcode and a development board to interface with your display.
Please note that I have only done this using the 3.2" resistive touch screen.
To display images, you can use the drawing instructions to the display via Flowcode or what I have just started doing is using "Microsoft word" to build my displays, using graphics composer to place the files onto the SD card for the display and use flow code to load the files of those images.
To do this I create an image in "Microsoft word" and cut and paste it into "Microsoft paint" and set the page the size in "paint" to the same as the display 240x320 pixels. Once I have pasted the image into "paint" I can get an idea of the size of the image I have created in relationship to the display and alter it accordingly. As for text you can once again use the print command from Flowcode or as I have done is using "word" to create my text strings and saving each one as an individual file to load. That way you can display different type fonts easily.
To load the images you need to get a copy of the graphics composer software. That is located here http://www.matrixmultimedia.com/product ... PHPSESSID=
There is some good info about how to use this on the Matrix website under the display here.
http://www.matrixmultimedia.com/resourc ... blocks.pdf.
I have attached a couple a couple of screens I am building up for a project I am working on that is in the very early stages using the above technique. The Flowcode example files for the EB076 also give you a great insight on how to interface with the display.
Cheers
Zane
Before you begin you will need a 4D programming cable and also have the driver installed. You can get that from here
http://www.4dsystems.com.au/product/17/ ... -Cable/The drivers are at the bottom of the page.
Then you need to download the 4D software from here http://www.4dsystems.com.au/group/10/Development/
Once you have done this you will need to download the old firmware version from here. Brandonb has already kindly listed this above on another post.
http://old.4dsystems.com.au/prod.php?id=209 ..... this is the file you need uLCD-32PTSGC-R22.PmmC (HX8347A Driver IC) For other sized displays you will need to go here and find the display type you are after. You need to SGC version not GFX.
Once you have done this you need to open the 4D software (you may need to run this as an administrator for it to work correctly) and create a new project, it is all fairly simple. Once this is done go to the tools menu and select the PMMC loader and load the software.
From now on you should be able using Flowcode and a development board to interface with your display.
Please note that I have only done this using the 3.2" resistive touch screen.
To display images, you can use the drawing instructions to the display via Flowcode or what I have just started doing is using "Microsoft word" to build my displays, using graphics composer to place the files onto the SD card for the display and use flow code to load the files of those images.
To do this I create an image in "Microsoft word" and cut and paste it into "Microsoft paint" and set the page the size in "paint" to the same as the display 240x320 pixels. Once I have pasted the image into "paint" I can get an idea of the size of the image I have created in relationship to the display and alter it accordingly. As for text you can once again use the print command from Flowcode or as I have done is using "word" to create my text strings and saving each one as an individual file to load. That way you can display different type fonts easily.
To load the images you need to get a copy of the graphics composer software. That is located here http://www.matrixmultimedia.com/product ... PHPSESSID=
There is some good info about how to use this on the Matrix website under the display here.
http://www.matrixmultimedia.com/resourc ... blocks.pdf.
I have attached a couple a couple of screens I am building up for a project I am working on that is in the very early stages using the above technique. The Flowcode example files for the EB076 also give you a great insight on how to interface with the display.
Cheers
Zane
- Attachments
-
- Systems menu
- 2.jpg (31.65 KiB) Viewed 9726 times
-
- Data input via kepad
- 1.jpg (26.55 KiB) Viewed 9726 times
Last edited by Zane on Wed Aug 14, 2013 11:05 pm, edited 4 times in total.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Cannot get touch screen display to initialize
Thanks for the info Zane, I have one of these displays on its way from Australia, not sure how long it takes but your info is appreciated, can't wait to have a mess with it LOL
Thanks
Thanks
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.
Computers are like air conditioners. They work fine until you start opening windows.
- acestu
- Posts: 1720
- Joined: Thu Dec 01, 2011 9:36 pm
- Location: Macclesfield UK
- Has thanked: 783 times
- Been thanked: 223 times
- Contact:
Re: Cannot get touch screen display to initialize
Hi Zane,
I received my display today but I think it may be a newer version than yours as it comes with a usb to serial converter so you don't need the 4d systems usb to ttl programming lead, it is the 24PTU which is smaller than yours, I am going to load the raspberry pi library for it tomorrow and see how that goes, it would be nice to have Flowcode support though....
cheers
Acestu
I received my display today but I think it may be a newer version than yours as it comes with a usb to serial converter so you don't need the 4d systems usb to ttl programming lead, it is the 24PTU which is smaller than yours, I am going to load the raspberry pi library for it tomorrow and see how that goes, it would be nice to have Flowcode support though....
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.
Computers are like air conditioners. They work fine until you start opening windows.