I have a large industrial PropBasic program running my Propeller Activity Board (PAB) that includes a COG running a very accurate Run-Time-Clock.
Issue 1. The PC program is downloaded to the PAB with the time-of-day. The program runs and halts at a Do-While-Loop for a push button depression to start the main program. This program runs until the PC goes to sleep and Windows messes with the USB port that stops the program and puts the Propeller into an initial state.
Issue 2. With the Industrial program running, the USB cable to the PAB can be disconnected and the program runs fine...indefinitely. However, when the USB cable is re-connected to the PC USB port the propeller program stops and goes to the initial state. The system is designed to run without the USB cable connected.
Issue 3. One-wire protocol code is added to the Industrial program to read the temperature of a DS18S20. The program runs and reads the temperature repeatedly in the main program Do-Loop. However, when the PC goes to sleep the PAB stops running but when the PC is restored to operation the PAB program restarts, halts at the Do-While-Loop, and runs when the push button is depressed but with the wrong time.
Issue 4. With the Industrial program running including the One-wire code the USB cable can be disconnected from the PC and the PAB program stops running but then restarts and halts at the Do-While-Loop automatically. This is not desired. Disconnecting the USB cable should not affect the program but it does.
Issue 5. All of the One-wire statements were no-oped and the Industrial program ran properly with the USB cable disconnected. There is something about the inclusion of One-wire code that causes this phenomenon.
My first Industrial control board was fabricated and used a Propeller Plug for USB communication. The program was written in "C" without One-wire code. The Propeller ran fine with the USB cable disconnected but when the cable was reconnected to the PC the Propeller stopped running. To fix the problem a member of the forum suggested building an interface between the Propeller Plug and the Propeller that included a slide switch on the RST line. The switch was closed for downloading the program then opened for operations. The USB cable could be disconnected without any difficulty. The slide switch solved the problem.
Do you think that the same slide switch solution will work in the case described above? The board artwork will be sent to a PCB fabrication house and I can include the slide switch if it will solve the phenomenon.