Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:47 18 Sep 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 : Some things I’d like to be able to do...

Author Message
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 09:53am 29 Oct 2015
Copy link to clipboard 
Print this post

I'd like to be able to put the LCD/touch/sd options into code. If option had a pass/fail return value then something like this might work:



LCDresult = OPTION LCDPANEL ILI9341, L, 21, 22, 23

IF LCDresult = 1 THEN
' Option setting worked
CPU RESTART
ELSEIF LCDresult = 2 THEN
' Option already set exactly like you want
ELSEIF LCDresult = 3 THEN
' Option setting failed
ENDIF


TOUCHresult = OPTION LCDPANEL ILI9341, L, 21, 22, 23

IF TOUCHresult = 1 THEN
' Option setting worked
CPU RESTART
ELSEIF TOUCHresult= 2 THEN
' Option already set exactly like you want
ELSEIF TOUCHresult = 3 THEN
' Option setting failed
ENDIF


IF TOUCHresult = 3 OR LCDresult = 3 THEN
' Failure
' Run fail LED blink routine
ENDIF

CALresult = GUI ISCALIBRATED

IF CALresult = FALSE THEN
' Not calibrated
GUI CALIBRATE
GUI TEST TOUCH ' With a random off-centered EXIT square
CLS
GUI TEST LCDPANEL 5 ' Run for 5 seconds
ENDIF



Edited by CircuitGizmos 2015-10-30
Micromites and Maximites! - Beginning Maximite
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 772
Posted: 04:53pm 29 Oct 2015
Copy link to clipboard 
Print this post

Humm.. From what I gather here, are you trying to automate the LCD setup process..? Might save some time when producing new units to set on the shelf..!

But.. I wonder if somehow, you could write a tera-term macro file to send down the commands to the "freshly flashed" MM board and have the PCB execute them one line at a time... That way, no firmware changes are needed...

The TT script kings have already posted a macro to reset the comm port and reconnect the MM USB... I am sure you can command TT to send out strings of ASCII characters... One ting I'm not sure about.. Can you type in somthing at the command line that makes the MM do a system restart..?

I'm sure others will chime in on this one CG..!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 06:06pm 29 Oct 2015
Copy link to clipboard 
Print this post

Setup ONE chip with the settings you want for LCD and SD card etc - perhaps even a first running program, then read the entire chip into a HEX file with IPE.

This HEX file will now contain the MMBASIC firmware, all your set options for LCD, SD card etc, AND your program code if you have elected to have it there.

That is assuming that you want to program lots of MM's with the same settings, and don't want to have to do each and every one separately.

This might not be exactly what you are wanting to do.
Smoke makes things work. When the smoke gets out, it stops!
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 772
Posted: 07:12pm 29 Oct 2015
Copy link to clipboard 
Print this post

Humm... I though each LCD screen touch panel would be a little different than any other LCD display, so just replicating the flash image into a group of units might cause problems with touch cal being off... (maybe not)...
 
CircuitGizmos

Guru

Joined: 08/09/2011
Location: United States
Posts: 1427
Posted: 05:21am 30 Oct 2015
Copy link to clipboard 
Print this post

  Zonker said   Humm... I though each LCD screen touch panel would be a little different than any other LCD display, so just replicating the flash image into a group of units might cause problems with touch cal being off... (maybe not)...


Yes I already know the one-hex-file approach, but I don't know how the calibration settings would be affected.

I was also hoping to keep all of the "information" in the basic file, rather than having to manually connect, type something, reset (disconnect), reconnect, and repeat and only after that run the basic file.

Micromites and Maximites! - Beginning Maximite
 
kiiid

Guru

Joined: 11/05/2013
Location: United Kingdom
Posts: 671
Posted: 06:04am 30 Oct 2015
Copy link to clipboard 
Print this post

This is quite the same as my question here
You can see Geoff's answer to it as well.
Edited by kiiid 2015-10-31
http://rittle.org

--------------
 
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