![]() |
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 StatesPosts: 1427 |
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 Micromites and Maximites! - Beginning Maximite |
||||
Zonker![]() Guru ![]() Joined: 18/08/2012 Location: United StatesPosts: 772 |
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 ZealandPosts: 9643 |
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 StatesPosts: 772 |
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... ![]() |
||||
CircuitGizmos![]() Guru ![]() Joined: 08/09/2011 Location: United StatesPosts: 1427 |
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 KingdomPosts: 671 |
This is quite the same as my question here You can see Geoff's answer to it as well. http://rittle.org -------------- |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |