OT - Programming Languages

I did hear mention somewhere recently that someone is considering resurrecting the Spectrum

Reply to
bert
Loading thread data ...

LOL

Reply to
bert

Are they resurrecting the 2k of RAM as well?

I'm sure there are emulators if anyone is that desperate!

Reply to
Fredxxx

Not really. This is a PHP program;

Reply to
Huge

Reply to
Mike Barnes

Reply to
Tim Streater

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.

Reply to
Andrew Gabriel

Reply to
Huge

So you've said before. But it works for me.

AAMOI what do you dislike so much?

Reply to
Mike Barnes

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

Reply to
Gordon Henderson

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

Reply to
Theo Markettos

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.

Reply to
mick

formatting link

Theo

Reply to
Theo Markettos

Reply to
Andrew Gabriel

My initial dislike was because it mixes code with presentation - HTML with code mixed in - gag, spit.

And then I read this;

formatting link

Reply to
Huge

ooh, I just discovered this;

formatting link

Reply to
Huge

formatting link

where do we start?

Reply to
Tim Watts

:-)

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 :-)).

Reply to
Mike Barnes

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.

Reply to
dennis

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!

Reply to
Bob Eager

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.