PhilTilson Newbie
 Joined: 15/11/2015 Location: United KingdomPosts: 35 |
| Posted: 03:21pm 09 Oct 2022 |
|
|
|
I am stuck with a problem which is defying all my attempts at solution. It's a little complicated, so really aimed at people who like to get inside a problem creatively!
I have a heating control system that comprises a MicroMite Plus as the main processor and an ESP8266 as a link to the internet. The main processor does all the clever stuff, monitoring temperatures, determining when various valves and pumps should operate etc and the ESP keeps the RTC accurate by using internet time and sends log entries to a MySQL database on my ISP's server. It also acts as a web server, enabling control of the system from anywhere over the internet. This is summarised in the diagram.
 Both parts of the system are working perfectly! So, what's the problem?
The system is based in Spain where the mains supply can be a little erratic at times. Although there is a backup battery, once in a blue moon, the main processor 'hangs'. I can tell when this occurs as the time on the web page freezes (the ESP keeps working fine).
So I wanted to devise a means of resetting the MicroMite remotely. I added a button to the web page to allow for a System Reset and when this is 'received' by the ESP, it pulls an IO pin to ground for 500mS. Then I had to work out how to get that signal to the MicroMite over the ribbon cable. I decided to use pin 70 on the Micromite as this is brought out on the 40-pin connector and wasn't being used for anything else. This pin I linked directly to the 'hot' side of the reset button, so that when the ESP pulls its pin low, the MicroMite resets.
And this works perfectly! BUT...
When the connection is in place, if I cut the power to the system, then re-establish it, the MicroMite does not run. I investigated this and found that it throws a "Display not configured" error at the first line in the code which attempts to talk to the display (SSD1963 5" touchscreen). If I disconnect the pin70 line, it boots normally. But I have monitored the pin70 line and it stays high throughout. I even implemented a 1000mS delay between resetting and accessing the screen, but it makes no difference.
So to summarise: Switch on system with pin70 line disconnected, boots as normal. Switch on system with pin70 line connected, throws "Display not configured". Switch on system, system boots as normal, then connect pin70 line system and it can be reset by remote command whenever required.
I have appended the relevant start-up code from the MicroMite. All I have left out is a long string of declarations, none of which relates to pin 70 or anything likely to interfere.
CONST dgy=RGB(127,127,127) 'dark grey CONST lye=RGB(255,255,192) 'light yellow CONST lgn=RGB(192,255,192) 'light green
Pause(1000) RTC GETTIME open "COM1:115200" as #1 'Open COM1 to send diagnostgic data to attached port open "COM3:19200, 256, GetStatus, 24" as #2 'Open COM3 to send and receive data to WiFi if debug then print #1,"Calling Syslog at startup" syslog "500" + mid$(ver$,3) '[045][057] curDat$ = mid$(date$,9,2) + mid$(date$,4,2) + left$(date$,2)
'Clear the screen to light yellow cls lye <<<<< This is the line at which the error occurs ------------- backlight 100
If anyone can offer any helpful suggestions as to why this strange situation is occurring, I would be very grateful! More information available if required - but I thought this initial post was quite long enough already!
Phil |