??? 10/18/06 22:03 Read: times |
#126709 - Yes, it's HOW TO and not HOW NOT TO ... Responding to: ???'s previous message |
Erik Malund said:
Richard Erlacher said:
All this time, we've been discussing the 8255 which is called a Peripheral Interface Adapter The title of the thread is "How to extend the ports of 8051" which is what the rest of us have been discussing. YOU, however, have been discussing the antique slowpoke 8255. True enough, but that's because, as you always like to do, you jumped in with your "Oh, My God! Don't use the 8255!" without any justification. So far you've thrown down a number of "red herrings" but provided no persuasive argument that the 8255, limitations and all, is not suitable for expanding the I/O of an 805x. It might not be easy to use with YOUR 805x, though I would guess it can be done. Erik Malund said:
Richard Erlacher said:
The reason is the transport latency and skew introduced by a serial transport. Think back to the parallel interfaces you once used on mass storage devices. Those are generally serial devices at the bare-bones level, but most of them were used with parallel interfaced controller/formatters because computers of the day didn't want to dedicate the resources to operate them serially. I have de-skewed many parallel things (intefaces and 9-track tapes) I have never deskewed a serial inteface. I do not know what you mean by "serial skew" that is the skew between transmit and receive that's introduced by disassembling and reassembling the bytes/words before they can be interpreted. In a parallel situation, you might be required to acknowledge a byte within, say, 1 microsecond. A hardware handshake, as provided by an 8255, many other hardware arrangements, or which you can easily provide with a relatively fast MCU, could manage that. However, if you have to transfer a word containing the payload byte and the control byte, or bits, required to effect the handshake, there would be considerable delay as the data is serialized and deserialized before it could be interpreted and acted upon. Erik Malund said:
Richard Erlacher said:
Judging from some of your comments over the years, I'd say you've not had to communicate via parallel interfaces very often. Not true, however, when either works, for simple pincount reasons, I do prefer serial. It's clear that you like ready-made, purportedly "idiot-proof" interfaces, e.g. IIC, SPI, SCI, or whatever you want to call them.. 1) I have no preference for "idiot-proof" and e.g. the IIC by no means is that. Also "idiot-proof" is boring. 2) I have not "called them" anything, they are named by the "inventor" Sorry about that, I didn't mean you, personally, I meant the general "you" in the sense of "whatever it's called" since I'm not a big user, hence, tend to mix 'em up. Erik Malund said:
Richard Erlacher said:
Those do not work with every type of device in the world. Once you run into a requirement for something that taxes your MCU's data transfer rate capability, you'll see what the benefit of parallel communication is. Absolutely, that is when I use Internal memory (and sometimes 8 port) devices and thus do not need to use the antique slowpoke 8255 to get enough ports for parallel. Erik All you've done for the past 100 kBytes is argue that the 8255 is a poor choice for this purpose. You've not presented even ONE reasonable argument why that would be, for the typical case, though I can see why you'd not want to use one yourself. True, the 8255's slow, but its' not too slow to use with many of the currently marketed parts that fit the 805x model. It's old, but then, being quite old myself, I don't find that a problem, at least not for the 8255. The thing still works as it did nearly 30 years ago. Now ... why do we keep having this argument? ... Well, it's because you CATEGORICALLY state that it's wrong to use it. You tell people who have ready access to them that they're too hard to get. You tell people using 25-year old MCU's that they're too slow. Most of the time you don't even ask what sort of MCU they're using. You just tell them that they're stupid and they should do what you say. I don't like that. If you gave them an informed choice, after telling them what's involved and how to find out about that, I'd be fine with that. If a guy wants to expand the I/O on his 805x, you really can't answer without first finding out which MCU he's using, what kind of I/O he wants to expand, and other things like that. Have you ever asked such questions? Those ST parts to which you referred are not fast enough to keep up with every type of 805x, even the ones in standard package, without some tweaking. I'd have to slow down the bus to make 'em work with my Maxim parts. However, they would work with the bus timing extended. Unfortunately, you have to buy the internal FLASH and RAM in order to get the I/O. Since they cost twice what the 8255 costs, and availability is slow and in quantity only, the choice is easy if I'm building just one of something. There's nothing wrong with the IIC parts if they work for what's required, but they don't seem to have the instantaneous (well, not quite) auto-handshaking that might be needed. The package of the IIC part will probably present a problem, though. If I ever get to using a part like the ones you use, I'll certainly consider the option of using the 8255 as a port-mapped peripheral, but only as an option. I've never liked 'em. RE |