Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/17/06 21:33
Read: times


 
#126611 - I'll try it, too
Responding to: ???'s previous message
Now ... keep in mind that I have never been a great advocate for the 8255 or its corresponding equivalent in the Motorola camp, the MC6821. This was, however, because these devices had such weak output that one normally had to buffer them just to do anything at all. With today's CMOS technology, that's no longer the case and these devices' CMOS incarnations can do useful work without external buffering, though it may still be required in some applications.

About Jan's subject FAQ entries ...

let's look at the first part ... and pick it apart, bit by bit ...
Jan's FAQ said:

How do I interface an 8255 to an 8052?
Submitted By: Craig Steiner FAQ Last Modified: 12/Oct/06 9:58 am
The functionality of an 8255 port can be easily duplicated.

An input port can be provided by a standard 74HC244 type buffer chip. At output port can be easily implemented by using a 74HC374 type latch.

If you need a port that can be set back and forth between input and output then consider using a chip like the 74HC646. All of these solutions will be particularly suitable if you are using the 8052 with an expanded external bus mode (just as you would have connected an 8255 chip) and the chips connect to the data bus AD0 to AD7 lines. The control lines for the chips are wired to a decoding circuit that combines an appropriate combination of the address lines, the RD/ and the WR/ control signals.


This begins with a statement that is only partially true. The port function itself is readily reproducible, with either a tristate register such as the '374/574 type or with a totem-pole output registers such as the '273. A tristate buffer such as a 74HC244, or 'HC541, can serve very well as an input port, though one might want a tristate latch, e.g. HC573 in order to allow a remote source to write to the latch without requiring immediate service by the MCU. Each type has some benefits over the others. The inherent problem is that, once in the circuit, any of these types can operate in only one mode.

While a board designer who's been given specific requirements can design a port with the specified port type, e.g. totem-pole output, tristate output, bidirectional, or input. Once the port is built, that's all it can do. The designer of a board for undefined application, e.g. a commercial controller board, in this case, using an 805x MCU, might want the additional flexibility that a versatile I/O chip provides. It's possible, certainly, to create the facilities provided in the 8255 in a number of ways, they're definitely not simple and straightforward. There's room for debate about whether they're attainable at lower cost, though.

One aspect that hasn't been discussed much is the handshaking and interrupt generation capability of the 8255. The 8255 provides three ports, of which one, "Port C" can be split into two halves, and those used as handshake and interrupt signals associated with ports A and B. The Motorola parts don't have a "C" port, and just provide dedicated handshake and interrupt signals. In both cases, these signals are observable externally or through an internal register.

The use of discrete registers, latches, an/or buffers for these functions forces the designer to choose in advance of deployment, how the end-user will be able to utilize the ports. This has, in some cases, been done quite effectively by means of jumpers, but some people, and I may not be among their number, prefer to configure the port with firmware.

I seldom have an uninterrupted hour in which to do this sort of thing, but I'll soon post an SCH3 and SCH4 jpeg file to represent a single I/O port, i.e. one with an 8-bit data channel, configurable as input, output, with handshaking and interrupt control as they'd be implemented in discrete HC-logic components, to do probably not all of what an 8255 or 6821 will do.

This type of parallel port interface addresses a class of problem that is always a bit complex, in that one frequently needs to "talk" to an I/O device that once talked to another computer that had the facility to interface with it, but that computer is no longer available, yet the data stored in it or on its media is still of interest. These typically had an 8- or 9-bit bidirectional data channel, as well as command/status signals and handshakes in both directions, and often had quite stringent data transfer timing requirements. Features such as automatic handshaking, interrupt generation and latched inputs made this interface type work smoothly despite any asynchronism between the computer and the peripheral.

Since the 805x has no "wait" line to facilitate synchronization between source and destination in such transfers, auto-handshaking and interrupt generation can "save the bacon" in cases where time is critically limited.

I see problems of this sort quite often, as people come to me with devices that contain data that they want, but can't retrieve because their PC can't communicate with that kind of hardware. Perhaps that's why I'm so insistent on keeping the possibility of parallel interfacing by means such as the 8255 in mind, rather than discarding it out of hand. If you use a board with 8255's on it, you can do this stuff with a minimum of wiring and circuit design. You're then free to focus on the remainder of the task.

RE




List of 174 messages in thread
TopicAuthorDate
How to extend the ports of 8051?            01/01/70 00:00      
   I2C, SPI, 1-Wire, CPLD            01/01/70 00:00      
      Why "avoid 8259"?            01/01/70 00:00      
         Why "avoid 8259"?            01/01/70 00:00      
            Hi            01/01/70 00:00      
         Hi            01/01/70 00:00      
      Examples            01/01/70 00:00      
   Choose an 8051 w. sufficient IO in the 1st place!            01/01/70 00:00      
      all 8051\'s have the same amount of I/O            01/01/70 00:00      
         list please            01/01/70 00:00      
            typo ... sorry ...            01/01/70 00:00      
         OK then, "derivative"            01/01/70 00:00      
         huh?            01/01/70 00:00      
            I think he means...            01/01/70 00:00      
               you're right, and that's the point, actually            01/01/70 00:00      
                  cause and effect            01/01/70 00:00      
   Clarification please            01/01/70 00:00      
      Clarification            01/01/70 00:00      
         Hi            01/01/70 00:00      
            Specifics ?            01/01/70 00:00      
      Hi            01/01/70 00:00      
   8255            01/01/70 00:00      
      Avoid 8255!            01/01/70 00:00      
         8255 Is Available in India            01/01/70 00:00      
            I learned the 8085 and 8255 in college            01/01/70 00:00      
               more number blindness?            01/01/70 00:00      
                  Yes            01/01/70 00:00      
                     Actually, it IS possible ... but you\'re right            01/01/70 00:00      
                        why?            01/01/70 00:00      
                        who said useless?            01/01/70 00:00      
            so the blind should lead the deaf?            01/01/70 00:00      
               somebody's got to do it!            01/01/70 00:00      
         What do you mean by "cumbersome?"            01/01/70 00:00      
      which antique store do you shop at?            01/01/70 00:00      
   FAQ            01/01/70 00:00      
      now THAT would be helpful to many!            01/01/70 00:00      
         nobody said so            01/01/70 00:00      
            too slow?            01/01/70 00:00      
               if you want a FAQ ...            01/01/70 00:00      
                  Input or Output            01/01/70 00:00      
                     Well ... the Motorola parts did that ... bitwise            01/01/70 00:00      
                        Port C            01/01/70 00:00      
   Hi Everyboody!            01/01/70 00:00      
   Port I/O of 8051            01/01/70 00:00      
      Serial and parallel I/O            01/01/70 00:00      
         As many as two?!            01/01/70 00:00      
            port expansion            01/01/70 00:00      
               Oops - you've been in that museum again!            01/01/70 00:00      
                  that I know but            01/01/70 00:00      
                     sure            01/01/70 00:00      
                        i have not and I can't            01/01/70 00:00      
                           sorry...            01/01/70 00:00      
                     WSI; Waferscale; ST; PSM; PSD            01/01/70 00:00      
               wotizit?            01/01/70 00:00      
                  wired or line            01/01/70 00:00      
                     I'd not call it a "pin extension"...            01/01/70 00:00      
                        I would            01/01/70 00:00      
      Requirements            01/01/70 00:00      
      FAQ            01/01/70 00:00      
         a good start, but woefully incomplete            01/01/70 00:00      
            Triscend - now Zylogic            01/01/70 00:00      
            "woefully incomplete", eh?            01/01/70 00:00      
               response            01/01/70 00:00      
                  there are some \"gotchas\"            01/01/70 00:00      
                     I used them before they became flash parts            01/01/70 00:00      
                        So, where's the link to the ST software?            01/01/70 00:00      
                           let a WSI user find that out            01/01/70 00:00      
                              There are no more WSI users ... there's no WSI            01/01/70 00:00      
                                 WSI usres-PSD usres OK            01/01/70 00:00      
                           Richard... What P/N you looking at?            01/01/70 00:00      
                              I just skimmed over the four most prominent ones            01/01/70 00:00      
                           Is this it?            01/01/70 00:00      
                     PSD/uPSD            01/01/70 00:00      
   A couple of Articles on embedded I/O            01/01/70 00:00      
      broken libks            01/01/70 00:00      
         fixed            01/01/70 00:00      
      informative article(s) but ...            01/01/70 00:00      
         CPLDs and FPGAs            01/01/70 00:00      
            differences            01/01/70 00:00      
               that's not really the issue...            01/01/70 00:00      
            They\'re available at no cost            01/01/70 00:00      
               the invasion of ther windows "programmers"            01/01/70 00:00      
            re: CPLDs and FPGAs            01/01/70 00:00      
               Andy PLEASE            01/01/70 00:00      
            I only promote stuff            01/01/70 00:00      
         FPGA/CPLD drawbacks            01/01/70 00:00      
            please make complete statements            01/01/70 00:00      
               @Erik: please read complete:            01/01/70 00:00      
                  giving examples does not exclude            01/01/70 00:00      
            well, that's a big maybe ...            01/01/70 00:00      
               an example            01/01/70 00:00      
                  voltage is not my choice            01/01/70 00:00      
                     where is the beef?            01/01/70 00:00      
                        it depends            01/01/70 00:00      
                           costs less, too.            01/01/70 00:00      
   consider this ...            01/01/70 00:00      
      but why skin a cat that is rotted? the fur will no            01/01/70 00:00      
         You keep saying that, but WHY?            01/01/70 00:00      
            NO WAY            01/01/70 00:00      
               I'm not from Missouri, but "SHOW ME"            01/01/70 00:00      
                  you have now visited Missouri            01/01/70 00:00      
                     waitaminute Erik...            01/01/70 00:00      
                        and my argument is            01/01/70 00:00      
                           your argument is fallacious            01/01/70 00:00      
                              once more mixing I/O mapped and MMIO            01/01/70 00:00      
                              OFF TOPIC but...            01/01/70 00:00      
                                 it\'s the disparity between rural and urban areas            01/01/70 00:00      
                                    I do not, BUT            01/01/70 00:00      
                           pins, lost&found            01/01/70 00:00      
                              a rephrase, a question and a subject issue            01/01/70 00:00      
                                 technically            01/01/70 00:00      
                                    mixing once more            01/01/70 00:00      
                                 You're being either crazy or stupid, Erik            01/01/70 00:00      
                                    I think the crazy one is you, Richard            01/01/70 00:00      
                                       I'm a seasoned man ...            01/01/70 00:00      
                                          Same back at ya            01/01/70 00:00      
                                             Now we're into semantics            01/01/70 00:00      
                                                Now you are completely off the rocker. Who, more            01/01/70 00:00      
                                                   Wake up!            01/01/70 00:00      
                                                      that is a BLATANT LIE            01/01/70 00:00      
                                                         Good grief, Erik! It's not personal ...            01/01/70 00:00      
                                                            YES, YES and YES. I even had to code it in assemb            01/01/70 00:00      
                                                         you could state that explicitly....            01/01/70 00:00      
                                             I've tried to be diplomatic            01/01/70 00:00      
                                                I'll try it, too            01/01/70 00:00      
                                                   the IIC as an alternative            01/01/70 00:00      
                                                      As an alternative, but only sometimes            01/01/70 00:00      
                                                         two viewpoints            01/01/70 00:00      
                                                         SATA            01/01/70 00:00      
                                                            I\'d like to meet...            01/01/70 00:00      
                                                               My point            01/01/70 00:00      
                                                               Parallel works off-board as well            01/01/70 00:00      
                                                            very true, but it doesn\'t apply            01/01/70 00:00      
                                                         try THAT with the 8255            01/01/70 00:00      
                                                            Erik, it might surprise you to learn ...            01/01/70 00:00      
                                                               WHAT            01/01/70 00:00      
                                                                  Erik, in response to WHAT            01/01/70 00:00      
                                                               that implies serial, in which case the 8255            01/01/70 00:00      
                                                                  I said is was parallel-interfaced ...            01/01/70 00:00      
                                                                     Please find the word 'parallel', I may be going bl            01/01/70 00:00      
                                                                        You're right, I left it out ...            01/01/70 00:00      
                                                                           The title of nthe thread is "How to extend the por            01/01/70 00:00      
                                                                              Yes, it's HOW TO and not HOW NOT TO ...            01/01/70 00:00      
                                                                                 attaching an old ratteling caboose to a high speed            01/01/70 00:00      
                                                         not that slow - especially compared to the 8255            01/01/70 00:00      
                                                            Erik, look at the datasheet ...            01/01/70 00:00      
                                                               how do you propose to \"get it in\" at that speed            01/01/70 00:00      
                                                                  Yes, this needs clarification            01/01/70 00:00      
                                                                     no, you don't            01/01/70 00:00      
                                                                        Erik, Once again, you've brought too much to            01/01/70 00:00      
                                                                           nope, there are plenty of boards with (sorry, I kn            01/01/70 00:00      
                                                                              Well, show me ... it\'s proven untrue so far.            01/01/70 00:00      
                                                                                 I am really curious what you are making where a            01/01/70 00:00      
                                                                                    Been there, done that ...            01/01/70 00:00      
                                                                                       now you lose me            01/01/70 00:00      
                                                                                          I don\'t like \'em.            01/01/70 00:00      
                        Jan ... DIGIKEY's not always the cheapest            01/01/70 00:00      
                           of course, if you can sell the sh eh stuff            01/01/70 00:00      
                     the datasheet says ...            01/01/70 00:00      
                        are you mixing cement in a futile attempt to cast            01/01/70 00:00      
                           go back to school, Erik!            01/01/70 00:00      
                           go back to school, Erik!            01/01/70 00:00      
                              I say, you say            01/01/70 00:00      
                                 Erik, go back and read the whole thing            01/01/70 00:00      
                                    had Peter IlyitchTscaikowsky lived ...            01/01/70 00:00      
                                       one more... :-)            01/01/70 00:00      
                                          hve you see any post stating that?            01/01/70 00:00      
                                             yes. Richard's... :-)            01/01/70 00:00      
                                                and that was because ...            01/01/70 00:00      
   Why is this so endlessly fascinating?            01/01/70 00:00      
      to Jez            01/01/70 00:00      
         i dunno            01/01/70 00:00      
   "Extending Input/output"            01/01/70 00:00      
      "Extending Input/output"            01/01/70 00:00      

Back to Subject List