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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/18/01 12:55
Read: times


 
#15818 - RE: which interrupt controller ???
what about the 8259 Programmable Interrupt Controller (PIC)?

It seems to be a very handy way to handle multiple interrupt sources. It maps 8 interrupt sources onto one micro-processor/controller interrupt pin. It might be best for 8051 type devices. In fact it is as common a peripheral as the
8255.

Basically what it does is it multiplexes many interrupts onto 1 pin using a sort of 'selector' bus to resolve which source is calling for attention

So if say interrupt #5 occurs, it is 1st picked up by the 8259. The 8259 then enables the 8051 interrupt pin. In the 8051 interrupt handler, you have written a subroutine which then polls the 8259 data bus to check what sort of an interrupt it is. The 8259 outputs the code for "#5" on its data bus, which ur subroutine then resolves internally to vector to the required subroutine-

org 01bh ;interrupt handler vector
mov a,p1 ;8259 data bus on p1

cjne a,#01,chk_int2
sjmp int01 ;if int type 1 goto int01

chk_int2:
cjne a,#02,chk_int3
sjmp int02 ;if int type 1 goto int02

chk_int3:

...and so on

It is YOUR responsibility to program both the 8051 and the 8259 to respond the way u want them to

Alternatively u could implement the whole thing using a basic 8:1 selector/ multiplexer IC (like the 714151), but the 8259 offers many programmatic advantages such as internal priority selection and stuff

kundi


List of 20 messages in thread
TopicAuthorDate
which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ??? Kunal            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
RE: which interrupt controller - 8259            01/01/70 00:00      
RE: which interrupt controller - 8259            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      
i2c interrupt controller            01/01/70 00:00      
RE: i2c interrupt controller, duh            01/01/70 00:00      
RE: i2c interrupt controller, duh            01/01/70 00:00      
RE: i2c interrupt controller, duh            01/01/70 00:00      
RE: i2c interrupt controller, duh            01/01/70 00:00      
RE: which interrupt controller ???            01/01/70 00:00      

Back to Subject List