Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > BASIC Stamp > 24+ Outputs from a BS2 - 8255 PPI based circuit  Forum Quick Jump
 
New Topic Post Reply Printable Version
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1377
 
   Posted 12/9/2005 6:47 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
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


Image Attachment :
Image Preview
8255_24OutputTest.bmp
  385KB (image/bmp)
This image has been viewed 1236 time(s).

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).
Back to Top
 

Chris Savage (Parallax)
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 10533
 
   Posted 12/9/2005 10:44 PM (GMT -8)    Quote This PostAlert An Admin About This Post.

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
 

Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1377
 
   Posted 12/10/2005 1:10 PM (GMT -8)    Quote This PostAlert An Admin About This Post.

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

Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1377
 
   Posted 10/15/2006 5:14 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

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.

Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1377
 
   Posted 10/15/2006 2:40 PM (GMT -8)    Quote This PostAlert An Admin About This Post.

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. 

Back to Top
 

Bill Chennault
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2006
Total Posts : 964
 
   Posted 10/16/2006 4:40 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
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.

Back to Top
 

T&E Engineer
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2005
Total Posts : 1377
 
   Posted 10/16/2006 4:43 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

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.

Back to Top
 

Chris Savage (Parallax)
Forum Moderator



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2004
Total Posts : 10533
 
   Posted 10/16/2006 7:09 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

   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
 

Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
 
Forum Information
Currently it is Monday, February 08, 2010 6:12 PM (GMT -8)
There are a total of 415,872 posts in 57,629 threads.
In the last 3 days there were 78 new threads and 858 reply posts. View Active Threads
Who's Online
This forum has 18513 registered members. Please welcome our newest member, SEL.
63 Guest(s), 11 Registered Member(s) are currently online.  Details
Peter Jakacki, W9GFO, Bob Lawrence (VE1RLL), Computer Geek 101, tonyp12, Harley, Jimm2, mpark, Peter KG6LSE, atlstang, nicolad76