OK, I'm a novice with the 8051. How do you map a port pin to an external interrupt (or visa versa, say External interrupt 2)? I'm assuming that there are no dedicated pins for each of the seven Ex. interrupts on my chip and they have to be assigned somehow to a pin/bit on a specific port. Is this assumption correct? -Michael
In standard 8051 types, these assignements are fixed in hardware. Some variants may be assignable, but I havent seen any yet. The best place to start is with the data sheet from the specific chip manufacturer, since there are so many variants, you really need the data sheet. Normally you would just put the vector to you interrupt code at a predefined address, and just enable the specific interrupt to get a response.
7 external interrupts on an 8051? Wow, which part (Vendor and ID) are you using. The most I've seen is three. Anyhow, they are hardwired on the standard 8051's. If you want your A/D to signal end-of-convert on /int0 then connect it to /int0 and install your LJMP + A/D ISR address (little endian of course) at the /int0 interrupt vector location. From Intel's MCS-51 User's Manual:
Vector Vector Address RESET 0000H IEO OO03H <-- External Intr 0 TFO OOOBH IE1 O013H TF1 OOIBH RI & TI O023H TF2 & EXF2 O02BH
Hi Mark, Thanks for the info. The 8051 I'm using is actually embedded in a Cypress USB chip (CY7C646xx, aka EZ-USB FX). It has 7 external interrupts (one dedicated to USB another dedicated to I2C) and three timers. The part is cheap in quantities, I don't know about singles. The info I was looking for WAS hidden in the tech reference but I had to bounce all over the book to find it.
Hi, There are no way you can assigen all 7 pin to 7 interrupt The ISP generator will generator based on the condition. You must find out is there any single pin which can use as the interrupt, If yes then you ask your hardware engineer to integrated all the 7 pin to that ISP pin reagrsd terrance
"The ISP generator will generator based on the condition" Eh?????????????
"7 external interrupts on an 8051? Wow, which part (Vendor and ID) are you using." You could do it with a Triscend E5. http://www.triscend.com/products/e5.htm
Hi Neil, most of the 8051 core ASIC, having 2 or 4 timer interrupt, it may have 1 serial interrupt,1 from Divider(use for RTC), 1 comparator, 1 watch dog timer. In addition to this application decide iSR such as CID(caller ID), There may be 2 or 4 External interrupt. There are some asic which called keyboard interrupt, which mostly 4 pin,