[Coco] Detecting when CoCo is turned OFF

Joel Rees joel.rees at gmail.com
Wed May 12 11:48:58 EDT 2021


Well, with the warning that you're coming dangerously close to the famous
halting problem of computer science,

if (and only if) this is just a one-off, it's safe to have the Arduino
gadget responding after the CoCo has lost power, monitoring the serial
lines and waiting a second after all serial lines no longer show power
would work.

You'd probably want to have the Arduino record the states of the serial
lines from just before power-on to a full second after, and a second before
and after power-off, to get an idea of what voltage levels to check for.

And you'd also want to do the power on/off trace with several game carts,
if you want the Arduino to deal with those, as well.

I don't think you'll be able to handle anything close to every case, but
you may be able to handle enough  for what you want.


2021年5月12日(水) 4:24 Salvador Garcia via Coco <coco at maltedmedia.com>:

>  Hi Joel, sorry for the late response, other activities pulled me away. To
> answer your questions:
> I am trying to sense change of state. I want the Arduino gadget to perform
> shutdown processes when the user powers down the CoCo.
> I want the Arduino to do something without the CoCo explicitly sending it
> specific data or commands. rather, The Arduino should sense (detect) when
> the CoCo powers down.
> Take for instance modern OSes that require that the user run a Shutdown
> process so that the OS closes correctly. The user needs to remember to run
> the shut down process. This is something I would like to avoid with the
> CoCo for this project.
> In my case, I want the Arduino to sense when the CoCo is powered down to
> perform such closing processes. I don't want to depend on the user to run a
> "shutdown" program on the CoCo.
> I am further checking on detecting the lack of -12v, as others have
> suggested, but welcome all ideas. Checking -12v isn't as straight forward
> because the Arduino will fry if I feed it more than 5v and worse if the
> voltage is negative.
> Thanks for the follow up and for your input. Salvador
>
>     On Saturday, May 8, 2021, 10:31:02 PM CDT, Joel Rees <joel.rees at
> gmail.com> wrote:
>   I can't tell if you are clear as to whether you're trying to sense state
> or
> change of state, or both.
>
> Also can't tell if you want the CoCo doing something to tell the Arduino
> it's up (active) or want the Arduino to be able to read the CoCo without
> the CoCo sending it any data.
>
> In particular, if you want the CoCo running some sort of watchdog timer,
> you're going to either have to accept that the CoCo won't do this unless
> you've loaded the watchdog code. Or you might need to modify your ROM.
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list