Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:48 02 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : On/Off from touchscreen

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 12:43am 11 Jan 2017
Copy link to clipboard 
Print this post

I am thinking of a project using MMBasic 5.2 ,MX470 chip and touchscreen where I would like to operate on dry battery. Would it be possible or satisfactory to turn on the unit by touching the touchscreen? Obviously I could have a drawbutton as the Off key and I was thinking of putting the MM to sleep say for 2 seconds and waking up for a couple of milliseconds to test for a touch to the screen.

Any thoughts would be appreciated.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 02:13am 11 Jan 2017
Copy link to clipboard 
Print this post

One issue is the power to the display. You can turn the backlight off to save power but you musn't turn off power to the display controller otherwise it will only be re-initialised when the processor is reset.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 11:26am 11 Jan 2017
Copy link to clipboard 
Print this post

Back in the Maximite days, I did something close to what you are after.
IF you can get to the 4 touch wires (the ones going from the display to the touch controller) you can use a touch to switch a transistor.
You will then have to switch the touch wires back to the touch controller so normal touch works once the device has powered up. I don't think the touch controller will like the extra circuitry and it probably wouldn't like having a voltage on one of the inputs when powered down.
Turning off is easy.

To use the touch matrix to switch on, you put a supply voltage on to the x (or Y) set and when there is a touch, the voltage appears on the other Y (or X) set.
This voltage is used to switch the ON transistor which latches the power supply ON.

It was easy to do when I was using VGA displays with the touch wires exposed and I went on to read these inputs in Basic on the Maximite.

Jim


VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 11:44am 11 Jan 2017
Copy link to clipboard 
Print this post

  matherp said   One issue is the power to the display. You can turn the backlight off to save power but you musn't turn off power to the display controller otherwise it will only be re-initialised when the processor is reset.


Peter are you suggesting that if I put the MM into sleep then it will loose sync with the display? If that is the case, in the project I am considering, when full power is re-applied the program will need to start from scratch.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 01:13pm 11 Jan 2017
Copy link to clipboard 
Print this post

  Quote  Peter are you suggesting that if I put the MM into sleep then it will loose sync with the display?

No that should be OK but the problem comes trying to reduce power use of the display itself. Backlight OK. Main power not OK. So there will be some power usage from keeping the display processor powered
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 09:28pm 11 Jan 2017
Copy link to clipboard 
Print this post

  matherp said  
  Quote  Peter are you suggesting that if I put the MM into sleep then it will loose sync with the display?

No that should be OK but the problem comes trying to reduce power use of the display itself. Backlight OK. Main power not OK. So there will be some power usage from keeping the display processor powered


Peter, if I allow the MM to run at around 20mHz without backlight for a couple of milliseconds every couple of minutes to allow enough time to see a touch, wouldn't that be a fair power save?
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:42pm 11 Jan 2017
Copy link to clipboard 
Print this post

The display controller will draw about 10mA no matter what the Micromite is doing.
You could try using the WAKEUP pin as the touch interrupt.
It should work as normal for touch during program running but when you put the CPU to SLEEP without a time, it will wakeup on the next touch.

I haven't tried this but it sounds like an interesting experiment.
There is little you can do about the 10mA the display controller uses without a full shutdown.
The backlight will draw between 30 and 100 mA depending on brightness settings and display size.

Jim

VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 10:41pm 11 Jan 2017
Copy link to clipboard 
Print this post

  Quote  The display controller will draw about 10mA no matter what the Micromite is doing.

Thanks Jim for pointing that out, I wasn't thinking enough. I like the thought of using the wakeup pin for touch. I will have a couple of free output pins available and could possibly use them to control backlight and LCD power but that still leaves the problem of configuring the LCD after the program has started.
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 07:51pm 12 Jan 2017
Copy link to clipboard 
Print this post

  Quote  IF you can get to the 4 touch wires (the ones going from the display to the touch controller) you can use a touch to switch a transistor.

These connections seem to be at the back of the display between the PCB and the display but they may be accessible at the vias to the left of the touch chip XPT2046 on pins 3,4 and 5.

 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 08:09pm 12 Jan 2017
Copy link to clipboard 
Print this post

The touch wires don't look easy to get at with the 2.4 panels.
BUT:
Geoff has given you a late Christmas present with the beta10 firmware.
  Quote  Implemented the GUI RESET LCDPANEL command. This will reinitialise the LCD panel
and is useful if the panel had been previously powered down to conserve power.


This 'should' mean that you can power the LCD controller chip down and recover OK when you wake up.
To use the touch to wake up, you will have to disconnect it's power pin from the LCD panel regulator and supply it separately.

The regulator is above the XPT2046 in your photo and (if I am correct), you need to cut the trace under the 'C1' text.

Either that or cut the trace where it goes to the main controller (after C1) and supply the controller with a new regulator.

I don't have a circuit diagram and haven't looked at the other side of the circuit board so there is some guesswork here.

Jim


VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10315
Posted: 10:00pm 12 Jan 2017
Copy link to clipboard 
Print this post

Prompted by this thread and others in the past Geoff has included GUI RESET LCDPANEL in the new 5.3 beta 10

This allows the LCD panel to be completely powered down and then after it is re-powered the new command will re-initialise it.

Of course you will have to re-draw whatever was on the screen but this should make low power applications with an LCD screen a real possibility
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 11:01pm 12 Jan 2017
Copy link to clipboard 
Print this post

Thankyou very much Peter and Geoff. I have been digesting the features of this version since the announcement. I am being distracted from this project by others that are more do-able with all the new features.

It just gets better and better
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 06:35pm 13 Jan 2017
Copy link to clipboard 
Print this post

I have been testing the ability of touch to wake-up the micromite.

First I tried setting the touch interrupt pin to pin 16 - the wake-up pin
This appeared to work until I put the CPU to sleep with CPU SLEEP
That gave an error "pin 16 reserved at startup"
This is understandable as I have reserved pin 16 for the touch.

I then put the touch interrupt back to pin 2 and jumpered pin 2 to pin 16.
This time, the micromite was happy. Touch works normally and when I touch the off button, the CPU goes to sleep.
The display stays on as I haven't got that far yet.
The next touch fires the micromite back up as it should.

The touch might be a bit temperamental and is is possible to end up with two rapid hits which turns the CPU back on immediately.

If I can successfully separate the touch controller supply from the LCD controller supply, I SHOULD be able to turn the display off and still use touch to wake up.

Jim
VK7JH
MMedit
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 986
Posted: 06:53pm 13 Jan 2017
Copy link to clipboard 
Print this post

Thanks Jim, you are way ahead of my experimentation, I have just been caught up in the backlight control giving me some headaches. I am eager to see how you go with separating the touch and LCD control power.

Regards
Graeme
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2944
Posted: 12:37am 14 Jan 2017
Copy link to clipboard 
Print this post

Nice work Jim. Am needing this feature in some ideas I have planned; just no time to play at the moment

Anyway, do keep us posted . . . .

WW
 
CYBERLAB
Newbie

Joined: 08/08/2017
Location: Mexico
Posts: 26
Posted: 06:26pm 25 Sep 2017
Copy link to clipboard 
Print this post


Hello everyone, First of all, sorry for my English but it is not my native language. I was reading the comments on this subject and reading the information on the XPT2046 and I agree that it should be fed directly from the batteries through the 3.3v regulator (U1 ) I think that cutting the track at the label SDO (MISO) we provide power to the screen through its original pin (VCC) using a transistor and one micromite output, can be turned on in wake up and off on sleep , and on the side of the touch controller soldering a pin on the pad J1 that is connected to pin 2 of U1 can be fed directly from the batteries, the controller when touching the screen activates its PENIRQ output which is the terminal T_IRQ and we can use it to wake up the micromite through a diode from T_IRQ to wake up pin of micromite (16), and still to save more battery the XPT2046 has an auto power down feature.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025