![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, How can we convert the External Interrupt pin INTx of 8051 into multiple interrupts. Can anyone show me schemmatic for this. Thanks | |
| |
| | (permalink) |
| Hi, As you will want to know which is the interrupting source, you could use a HEF4532 8 input priority encoder. This will give a 3 bit address related to the calling source, these 3 lines would go to 3 input pins on the MCU, so that you can determine which intr source needs servicing. Also there is a common intr output pin, to drive the MCU's intr pin. EricG EDIT: hi again, The Group Select GS, is set High when any input is High, [interrupt line], check the Truth Table for the ic. Rem: set Ein high. Last edited by ericgibbs; 28th February 2007 at 12:24 PM. | |
| |
| | (permalink) | |
| Quote:
But where is common intr output pin in HEF 4532. | ||
| |
| | (permalink) |
| On the 4532 it is called EO and it is pin 15 You can also look for a 74xx148 or a 74xx748. These are also priority encoder circuits. They have an output whenever one of the inputs is active. I believe that it even has the same pinout as the 4532 Last edited by Papabravo; 28th February 2007 at 01:50 PM. | |
| |
| | (permalink) |
| hi papabravo, I use GS for the Interrupt to have the same sense as the external interrupting sense and the EO for the inverted ext sense. I think it should do what OP wants, he didn't say how many ext interrupts he had in mind. Regards Eric | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| The External interrupts which are coming simultaneously should process it. What does the 3 bit address related to the calling source do I am totally confused. | |
| |
| | (permalink) |
| hi, Say you have 8 possible sources of interrupt from external devices. You cannot service all 8 interrupting sources at the same time. So a decision has to made which ext source has intr priority. If you 'Or'd the 8 to generate the intr, how would you know which source was requesting the intr??? If 'one of the eight' ext sources, requesting an intr, generated a 3 bit code which is unique for that source, then the PIC prog would know which Interrupt subr in your prog to execute. A PIC prog reads these 3 input port bits, so it knows which ext intr to service. This is what the priority encoder does, it encodes a 3 bit pattern, which unique for each external source. Input source #0 has lowest priority and source#7 has the highest. Have you read the datasheets on priority encoder devices ? Eric Last edited by ericgibbs; 1st March 2007 at 11:59 AM. | |
| |
| | (permalink) |
| Hi Eric, I will answer your question: No And continue your, well explained, story... prevravanth, The first thing you have to do in your ISR is check the status of the three µC pins connected to the "priority encoder". Depending on the value on these three pins (0 to 7) you will know which interrupt line, on the "priority encoder circuit", you have to service. | |
| |