99 of 158
93 TIMER3_COMPA TIMER3_COMPA TIMER3_COMPA TIMER3_COMPB 7 TIMER3_COMPB 7 TIMER3_COMPB 7 TIMER3_COMPC TIMER3_COMPC TIMER3_COMPC TIMER3_OVF 5 TIMER3_OVF 5 TIMER3_OVF 5 TIMER4_CAPT 5 TIMER4_COMPA 6 TIMER4_COMPA 6 TIMER4_COMPB TIMER4_COMPB 7 TIMER4_COMPC TIMER4_COMPC TIMER4_OVF TIMER4_OVF 5 TIMER5_CAPT 5 TIMER5_COMPA TIMER5_COMPA TIMER5_COMPB TIMER5_COMPB 7 TIMER5_COMPC TIMER5_COMPC TIMER5_OVF TIMER5_OVF 5 TWI or I2C TWI or I2C TWI or I2C TWI or I2C USART0_RX 8 USART0_RX 8 USART0_RX 9, 10 USART0_RX 8 USART0_TX 8 USART0_TX 8 USART0_TX 9, 10 USART0_TX 8 USART0_UDRE 8 USART0_UDRE 8 USART0_UDRE 9, 10 USART0_UDRE 8 USART1_RX 9 USART1_RX 9 USART1_RX 8, 10 USART1_RX 9 USART1_TX 9 USART1_TX 9 USART1_TX 8, 10 USART1_TX 9 USART1_UDRE 9 USART1_UDRE 9 USART1_UDRE 8, 10 USART1_UDRE 9 USART2_RX 9 USART2_TX 9 USART2_UDRE 9 USART3_RX 9 USART3_TX 9 USART3_UDRE 9 WDT WDT WDT 1 Used by WaitForInterrupt(). 2 Used by the RTC, cannot be replaced. 3 Used by OpenCom() for channels 3-6 (software UART). 4 Used by OpenX10() along with INT0. 5 Used by InputCapture(). 6 Used by ComToDAC() and DACToCom1(). 7 Used by OutputCapture(). 8 Used by Com1, cannot be replaced. 9 Used by OpenCom() for channels 2 (and 7 or 8 where supported). 10 For the ZX-1281e and ZX-1281ne, the roles of USART0 and USART1 are reversed. For the form of ISR definition shown in the example above, the compiler takes care of saving the necessary registers upon entry, establishing the standard register state, restoring registers upon exit and executing a “return from interrupt” instruction. For special cases, you may define a “naked” ISR – one in which none of this is done. Using this special form is advised only for advanced programmers, particularly those that understand the nuances of the underlying code. An example of a naked ISR containing only a “return from interrupt” is shown below. This is commonly called a “stub” ISR. It is important to note that defining a naked ISR with no code statements in it at all results in undefined behavior. At a minimum, you should always include an assembly language “reti” as shown in the example below. ISR Timer1_CompB() Attribute(Naked) #asm reti #endasm End ISR