|
Forum Index : Microcontroller and PC projects : CALIBRATE or not CALIBRATE
| Author | Message | ||||
| frederic Newbie Joined: 30/03/2018 Location: FrancePosts: 15 |
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 ZealandPosts: 9754 |
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: AustraliaPosts: 3308 |
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 ZealandPosts: 2464 |
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: FrancePosts: 15 |
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: FrancePosts: 15 |
i try :(in my code) PRINT PEEK(WORD PEEK(WORD &H9D000090)+28) i got : Error Address !!!!! |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
It worked for me: ![]() Geoff Graham - http://geoffg.net |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |