Amstrad CPC PIO
Amstrad CPC PIO what?
Well, as posted previously:
https://tonyisageek.blogspot.com/2023/04/amstrad-cpc-resurrections.html
https://tonyisageek.blogspot.com/2023/04/cross-compiled-c-code-for-amstrad-cpc.html
https://tonyisageek.blogspot.com/2023/05/amstrad-cpc-464-tape-deck-enhancement.html
I have rekindled the old Amstrad CPC 464 (and 6128) memories from when I was a lot younger - and the CPC 464 was "the machine" that got me "into computers" way back in 1984/1985-ish.
Having recently acquired a few and fixed up a few, I met a great electronics genius who helped to diagnose and fix one of the original CPC 464 mother boards, so it could live on again. I learnt a lot and it rekindled my previous interest in the electronics side of things.
Long story short, Rob, was also making standalone Z80 computer motherboards and basically making his own computers - which inspired me to obtain and put on the shelf ready for a rainy day or two to solder and make: https://tonyisageek.blogspot.com/2023/06/z80-retro-computer-size-of-your-wallet.html
After meeting up with Rob, he showed me that he'd had a few PCBWay (Seed Studio?) PCBs made up for some custom hardware that he was learning about, mainly the 8255 chips.
I was intrigued. Basically he had built the boards to plug into an Amstrad CPC that you could then control the pins/actions from basic or assembler code from the Amstrad itself. Basically think of it as a 1980s Raspberry Pi, or actually more akin to an Arduino.
From the Amstrad you can now turn things on and off. IoT without the I :-)
Rob made a github available: https://github.com/rabs664/Amstrad-CPC-8255-PIO
Where he kindly listed the bill of materials, which I went to Digi-key and ordered all the parts, a few were out of stock, so good old eBay was my friend there, eventually when all the parts arrived I put all of the items on a shelf....and left them there.
Then I got an email from Rob asking how it was going, as I was typing that I'd been "really busy" (which I had), I then thought, what the hell, I best get soldering.....
Not bad, if I say so myself!With the chip legs pinched in a little bit and squeezed into the sockets.
Then it was time to test - I thought I would use the CPC 464 just incase it blew the machine up - surprisingly it seems to have all worked first time - I guess my soldering is not as bad as I thought. yay.
I used the github repo code as a baseline to then extract out "bits" as shown below:
The output from that code is the following:Woo!hoo! it "seems" like it everything is working as it should.
Then, it was time to plug into the Amstrad CPC 6128:It also turns out that I didn't need to write all that code! I could just write the out commands in basic.
I then tested the 5v on the A0 pin and I could see it registering with +5v and then 0v - it works.
Then I thought I'd stick a few BIG LEDs and test turning them on and off as a quickie:
So what?
well, if I can turn things on and off from the Amstrad CPC machine, then I can trigger a relay, if I can trigger a relay, I can turn a light on and off....
As I say, this is now in Arduino territory - BUT I can use the PIO board to not only READ but also WRITE to the pins - that matches the Arduino - however it also means that we can "trigger" an ipnut via the PIO, get the Amstrad to react to it and then potentially output to a pin to control something externally. Well, that all sounded very cryptic, but I have an idea where I can use the "game" type coding to then control things that is outside of the machine, but also have an input device to control something within the screen of the Amstrad.
Now, to wait for another rainy day to continue this a bit further......
Comments
Post a Comment