I did hear mention somewhere recently that someone is considering resurrecting the Spectrum
I did hear mention somewhere recently that someone is considering resurrecting the Spectrum
LOL
Are they resurrecting the 2k of RAM as well?
I'm sure there are emulators if anyone is that desperate!
Not really. This is a PHP program;
The pedestrian push button both momentarily powers on the FET which does the power supply switching, and generates an input to the microcontroller which generates an interrupt in the program to detect the button press. The first thing the microcontroller program does at powerup is latch on the output to the power supply FET, so the power stays on when the push button is released.
After 2 minutes (IIRC) in the green state for traffic, the program drops the power supply latch to the FET, and the circuit powers off. I had to do a bit of trial and error in the hardware here. Initially, the decay of the supply voltage to the microcontroller caused it to reassert the output to the power supply FET, and restart. Removing the supply decoupling capacitor solved that, but it is an interesting reverse bootstrap problem how a microprogam cleanly powers itself off without having some more external hardware to assist, when the microcontroller itself may do undefined things as the voltage drops below spec. There are supervisory chips to hold microcontrollers in reset state when supply voltage is too low, but I was trying to keep component count to a minimum, and more importantly, to use only what I already had in stock.
So you've said before. But it works for me.
AAMOI what do you dislike so much?
Good little hack..
Ideas from another thread here a week or so back ... You could now re-work it to use a piezeo disc thingy as the beeper, then set the pin to input to generate a wake-up interrupt then put the whole lot to deep sleep - no FET needed then - just tap it to wake it up... I've done something similar with piezeo buttons into microcontrollers in the past.
Gordon
That's fine if you're writing code. It's not good if you're trying to learn by reading somebody else's code, and that code doesn't do it like that.
Theo
If he wants his code to make the computer do things in hardware then fix the lad up with a raspberry pi. Cheap, cheerful and the cost includes all the free programming languages he could wish for (probably!). Runs linux, of course.
If he wants to program stuff on the PC (or linux) then I'd suggest the XBASIC compiler (free) which includes a full IDE as part of the package. You can also compile from the same source to make programs for both windows and linux.
Python (free) is another useful language for him to play with, especially with the pygames library, which handles a lot of clever stuff for writing fairly simple games. Available for both PC and linux again. It's rather strict syntax, but IMHO teaches good programming practices.
Theo
My initial dislike was because it mixes code with presentation - HTML with code mixed in - gag, spit.
And then I read this;
ooh, I just discovered this;
where do we start?
:-)
And I'm looking at the last frame's hover message...
The IAU ban came after the 'redefinition of 'planet' to include the IAU president's mom' incident.
...and wondering whether there was a technical problem with including single and double quotes. Because I see a clear syntax error. A few (visible) backslashes would have fixed that (and made it funnier :-)).
If he already has a PC then buying a Pi isn't necessary. You can get windows and/or linux versions of most things for free. It may be better to buy a usb robot arm or similar.
I wrote a hell of a lot in BCPL. And made some nice spare time money doing it. It financed some very expensive PCs and apparently helped ICL get a very lucrative contract with BT!
HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.