| ??? 10/26/03 02:39 Read: times |
#57257 - RE: 8255 configuration Responding to: ???'s previous message |
I have a 8051 board with a 8255 installed. My question is if I configure port C as C0-3 =output and C4-7 = input what value will the lower nibble have when I read the port? Can I look at this configuration as 2 seperate ports one read, one write, sharing a single address, with no interaction between them?
Hallo Brian, when you have a look at the following datasheet: http://www.measurementcomputing.com/PDFmanual...82C55A.pdf you will find this figure: ![]() When you write via micro an 8bit word to Port C, it will be latched internally and will be present at 'Internal Data Out (Latched)' lines. If Port C line is configured as input, this will not have any effect to 'External Port C Pin', because according output inverter (at the bottom) is disabled. Output of this inverter looks like a disabled three-state output, providing very high impedance. So, only those Port C lines, which are configured as outputs can output at 'External Port C Pin' what's internally latched. What happens, when reading Port C via micro? Port C lines configured as inputs have according output inverter disabled. So, micro will read, what's actually applied to according 'External Port C Pin'. Port C lines configured as outputs will output, what was internally latched. And when reading these Port C lines, you will get a copy of this data. You will read back, what formerly was written to Port C via micro, and what was internally latched. Because this is the signal being present at 'External Port C Pin', when reading Port C via micro. So, only because you write and read always 8bit words, this does not mean, that you can input and output 8bit words. Only 4bits of these 8bit words are relevant: C0-3 as outputs and C4-7 as inputs. That's like I understood datasheet. Kai |
| Topic | Author | Date |
| 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
| RE: 8255 configuration | 01/01/70 00:00 | |
RE: 8255 configuration | 01/01/70 00:00 |




