Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:25 12 Nov 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 : CALIBRATE or not CALIBRATE

Author Message
frederic
Newbie

Joined: 30/03/2018
Location: France
Posts: 15
Posted: 03:28pm 20 Jan 2019
Copy link to clipboard 
Print this post

Hi All,
CALIBRATE or not CALIBRATE, that is the question :
i need in my soft to know if my board is calibrated, is there a variable (read only) for that flag ?
the idea is to propose to user to calibrate (if not calibrated) by pressing a button.
Another question, where is the way (if there is one !!) to get out after GUI CALIBRATE, at this time, i do a hardreset!!

thanks
fred
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9754
Posted: 08:37pm 20 Jan 2019
Copy link to clipboard 
Print this post

If you need to do a GUI CALIBRATE, you generally just do it. There is little need to have an internal flag for it, as if you suspect it is not quite right, you just run the command again.

You cannot call GUI CALIBRATE from within your code, as far as I know - Geoff or Peter will correct me if I am wrong here. As I understand things, this command is for immediate-mode only, and not designed to insert into a running code, you run it directly from the command line while setting up your LCD.

If CTRL-C does not get you out of GUI CALIBRATE early, then I think you do just have to cycle the power. I seem to recall having to do this myself on one or two LCD's I had tried, forgetting that they did not have the touch chip on-board, so would not respond to the GUI CALIBRATE command.
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 12:21pm 21 Jan 2019
Copy link to clipboard 
Print this post

You could use the following to test if the touch calibrated Zero means no, non zero yes.
peek(word peek(word &H9D000090) + 28)

However, as Grogster said, you must run GUI CALIBRATE from the command prompt.



Geoff Graham - http://geoffg.net
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2464
Posted: 03:18pm 21 Jan 2019
Copy link to clipboard 
Print this post

  Geoffg said  However, as Grogster said, you must run GUI CALIBRATE from the command prompt


just curious: is there a reason for this?

i'm thinking a few years down the track, when the touch panel in one's bespoke micromite-based car computer creeps out of calibration. the only solution is to rip said car computer out of the dashboard, haul it inside the house, hook up a USB to serial adapter, type in the incantation "GIU CALIBRATE", etc...

-or-

have an arduino onboard who's sole purpose is, upon someone pressing a physical 'setup' button, to squirt down the console RxD line a control-C, followed by WATCHDOG 0, then GIU CALIBRATE


cheers,
rob :-)
 
frederic
Newbie

Joined: 30/03/2018
Location: France
Posts: 15
Posted: 04:17pm 21 Jan 2019
Copy link to clipboard 
Print this post

Hi,
i call GUI CALIBRATE from my code and it is working....
of course hard reset to exit after....
thanks

 
frederic
Newbie

Joined: 30/03/2018
Location: France
Posts: 15
Posted: 07:01am 24 Jan 2019
Copy link to clipboard 
Print this post

i try :(in my code)
PRINT PEEK(WORD PEEK(WORD &H9D000090)+28)
i got : Error Address
!!!!!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 09:45am 24 Jan 2019
Copy link to clipboard 
Print this post

It worked for me:



Geoff Graham - http://geoffg.net
 
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