Shop OBEX P1 Docs P2 Docs Learn Events
24+ Outputs from a BS2 - 8255 PPI based circuit — Parallax Forums

24+ Outputs from a BS2 - 8255 PPI based circuit

T&E EngineerT&E Engineer Posts: 1,396
edited 2006-10-16 15:09 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-12-10 06:44
    Tim,

    · 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
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-10 21:10
    Well something I forgot about with the 8255 is that it is actually the 82C55-A where the C is CMOS which can be destroyed very easy with the slightest of static. I took it out of my breadboard last night and put it back in this morning and it is dead. At $9 it is a bit expensive to loose to only develop within 1 day usage. Anyway, I am going back to 74HC595's but the memories were there.

    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
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-10-15 13:14
    I decided to open up the case again on the 8255 issue of this not working in my circuit. I have tried 5 more 8255's and none of them work. Is it possible that all of them are bad?

    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.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-10-15 22:40
    They are working!!!

    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.
  • Bill ChennaultBill Chennault Posts: 1,198
    edited 2006-10-16 12:40
    T&E Engineer--

    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.
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2006-10-16 12:43
    Thanks Bill.

    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-16 15:09
    ·· I was actually going to dig out my Z80 source code for one of my old controllers last night, but I read the thread too late and T&E got his answer already.· The 8255 was my PIA of choice even for the Z80.· Although I will admit for things like a keyboard interface I preferred simpler solutions, such as a 74LS374/74LS244 combo.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.