0

I was wondering how a port for a given device controller is chosen and how it knows the values on address/data/control bus are for him.

Let's take the 8259A PIC for example, which is connected that way to the address/data/control bus: 8259A Interface to Standard System Bus

8952A Programmable Interrupt Controller

I can see the active low CS (Chip Select) pin that is used to enable the PIC and be able to read/write on it, is connected to the address bus... But to what line? (That is the part I don't get). How does the address bus know when to activate the CS pin?

I believe that CS pin must be activated when the address bus is 0x20 or 0x21 (ports used by master PIC) and the CPU did not assert the M/#IO control line to read/write from/into I/O space (with the IN and OUT x86 instructions). But I don't get why the CS pin is connected to whatever address bus line since other ports are used by other devices controller.

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
Dewo
  • 23
  • 4
  • 1
    There is a decoder not shown in your picture that asserts CS when the address is 20 or 21. – prl Mar 17 '22 at 17:19
  • Only serial peripheral interface have CS pin – OSdev Mar 18 '22 at 10:06
  • On ancient computers, chosen by the designer, decoded the same way as memory. On new computers, they are still chosen by the designers of ancient computers 40 years ago, everybody hates them, and they are decoded in whatever way is convenient. – user253751 Mar 21 '22 at 17:47

0 Answers0