24+ Outputs from a BS2 - 8255 PPI based circuit
T&E Engineer
Posts: 1,396
Good evening,
(CODE AND DRAWING HAS BEEN UPDATED: ORIGINAL POST BELOW)
I realize that outputs on a BS2 can be expanded over and over again in sets of 8 using a 74HC595 IC using its 3 connections for serial input (Data, Clock and Latch).
However, I want to take you back about 20 years before the modern technology of today. I remember using the 8255 PPI (Programmable Peripheral Interface) IC from Intel in college in some of my microprocessor classes. Back in the days of the 8086 and 8088 using UARTS and 32K RAM devices was·my first·design working with the 8255 PPI IC.
I recently saw an 8255 in a local electronics store and bought it·as I remember also using it in a similar method controlling 24 outputs with a ZX81 computer sometime back.
As many of you may know, outputs can be connected to electromechanical relays or solid state relays to connect 12v to 120vac devices with plenty of info on that available.
I have attached my schematic showing how to connect a BS2 to an 8255 to control 24 outputs with 4 additional lines of I/O·available from the BS2. I also provided BS2 test code to turn on LEDs or outputs (remove the current limiting resistors and LEDs and connect to solid state relays).
I have also attached an 8255 datasheet for you to follow to modify the circuit and code for inputs as the 8255 can provide 24 outputs or inputs or combinations of both.
Let me know what you think. I had a great time·developing with·it today. If there is an interest I will convert it into SX28 code.
There is also a counter test program (attached) that cycles through all of the 24 LEDs seamlessly.
Thanks,
Timothy Gilmore
Post Edited (T&E Engineer) : 10/15/2006 10:42:32 PM GMT
(CODE AND DRAWING HAS BEEN UPDATED: ORIGINAL POST BELOW)
I realize that outputs on a BS2 can be expanded over and over again in sets of 8 using a 74HC595 IC using its 3 connections for serial input (Data, Clock and Latch).
However, I want to take you back about 20 years before the modern technology of today. I remember using the 8255 PPI (Programmable Peripheral Interface) IC from Intel in college in some of my microprocessor classes. Back in the days of the 8086 and 8088 using UARTS and 32K RAM devices was·my first·design working with the 8255 PPI IC.
I recently saw an 8255 in a local electronics store and bought it·as I remember also using it in a similar method controlling 24 outputs with a ZX81 computer sometime back.
As many of you may know, outputs can be connected to electromechanical relays or solid state relays to connect 12v to 120vac devices with plenty of info on that available.
I have attached my schematic showing how to connect a BS2 to an 8255 to control 24 outputs with 4 additional lines of I/O·available from the BS2. I also provided BS2 test code to turn on LEDs or outputs (remove the current limiting resistors and LEDs and connect to solid state relays).
I have also attached an 8255 datasheet for you to follow to modify the circuit and code for inputs as the 8255 can provide 24 outputs or inputs or combinations of both.
Let me know what you think. I had a great time·developing with·it today. If there is an interest I will convert it into SX28 code.
There is also a counter test program (attached) that cycles through all of the 24 LEDs seamlessly.
Thanks,
Timothy Gilmore
Post Edited (T&E Engineer) : 10/15/2006 10:42:32 PM GMT
Comments
· I used an 8255 in every Z80 system I built, and when I moved from Z80 to the BASIC Stamp the reason I didn't consider using the 8255 because of the number of I/O lines required to do so.··I admire your determination though.· Just pains me to see all those I/O lines in use.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I did try to develop today with a couple of 74154 (4-16 line decoder) and a 74LS193 (up-down 4 bit binary counter) to find a way to use this combination with my LED moving display sign project (because it can change directions). I still can't find a way to cascade 2 74154 IC's unless I use an extra address line (5 not 4) but we'll see. I don't believe these are as static sensitive as CMOS chips like the 82C55-A and are going strong so far.
The parallel 82C55-A has been put to rest and I'm moving forward with serial chips like the 74HC595s.
Timothy Gilmore
It's driving me a bit crazy that when I take one right out of the packaging and plug it into my Professional Development Board (all wired to the schematic previously attached - also used a BS2 and BS2px and neither provided a working 8255).
Can anyone verify or at least look over my code and let me know if I am doing anything wrong. This was working a year ago that is why it is so crazy.
I just ordered 9 more 8255A's on Ebay (using a different source than Jameco) and also a 1979 book on Ebay entitled "Microcomputer Interfacing with the 8255 PPI chip" so I'm hoping this will help.
Comments?
Thanks.
A friend of mine in the ZX81 community helped me with the initialization routines and timing. I was close but in some ways - off the mark. I have updated all of the programs and drawings and they are significantly different.
I plan on implementing this into a ZX81 design.
The programs now allow for up to 4 8255's with 1 BS2 or BS2px. This means you can have up to 96 I/O lines with·simple code changing. The additional lines P12-P15 are for Chip Selects for 4·8255's.
I still am not sure why it originally worked but it works CORRECTLY now with no guess work and plenty of commenting.
Thanks.
You may have thought you were talking to yourself on this thread, but I guarantee I read every word of it! I like the old stuff. It reminds me of . . . me.
--Bill
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You are what you write.
I really like working with the "old stuff". I just can't believe how hard it was to find info on how to use it other than the datasheet. We'll at least my work did not go in vain.
Thanks.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support