| 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 File Attachment : 8255A.pdf 234KB (application/pdf) This file has been downloaded 112 time(s). File Attachment : 8255_Test.bs2 3KB (application/octet-stream) This file has been downloaded 219 time(s). File Attachment : 8255_TestCounter.bs2 5KB (application/octet-stream) This file has been downloaded 244 time(s). |