20 of 323
ZBasic System Library 10 ZX Microcontroller Family System Library Routines that Disable Interrupts CountTransitions I2CputByte RCTime DACPin PlaySound Reset1Wire FreqOut PulseIn ShiftIn Get1Wire PulseOut ShiftInEx Get1WireByte Put1Wire ShiftOut Get1WireData Put1WireByte ShiftOutEx I2CCmd Put1WireData I2CgetByte PutDAC The I2C routines do not disable interrupts when the hardware I2C controller is used (e.g. channel 0). Interrupt Service Routines For the native code devices (e.g. ZX-24n), a few interrupt service routines (ISRs) are always included in your program (e.g. for Com1 and the RTC) while others are included only if certain System Library routines are used in your program. In some cases, the additional ISRs that are included when a specific System Library routine is used depends on how the routine is invoked and what the compiler can deduce regarding which ISRs might be needed. For example, if OpenCom() is invoked one or more times but the compiler can determine that the Com1 is always the channel being used, no additional ISRs are included since the Com1 ISRs are always included. On the other hand, if the compiler cannot determine which channel is being opened in one or more cases, it includes the ISRs for all Com channels, both hardware- based and software-based channels. In the description of each System Library routine, information is given about the set of ISRs might be included in your program if you use that routine. This information is only important, of course, if you are also providing one or more ISRs in your code because conflicts may arise. (See the section entitled “Defining Interrupt Service Routines” in the ZBasic Language Reference Manual for more information on how this is done.) The table below gives an overview of which System Library routines may cause ISRs to be included atomatically in your program. The shaded entries represent ISRs that are always included. System Library Routines that May Load ISRs Routine mega644P mega328P mega128 ADCtoCom1() Timer1_CompA Timer1_CompA Timer1_CompA Com1toDAC() Timer1_CompA Timer1_CompA Timer1_CompA InputCapture() Timer1_Capt Timer1_Ovf Timer1_Capt Timer1_Ovf Timer1_Capt Timer1_Ovf Timer3_Capt Timer3_Ovf OpenCom() USART0_RX USART0_TX USART0_UDRE USART1_RX USART1_TX USART1_UDRE Timer2_CompA Timer2_CompA Timer2_CompA USART0_RX USART0_TX USART0_UDRE USART0_RX USART0_TX USART0_UDRE USART1_RX USART1_TX USART1_UDRE OpenX10() INT0 Timer0_CompB Timer0_CompB INT0 n/a OutputCapture() Timer1_CompB Timer1_CompB Timer1_CompB Timer1_CompC Timer3_CompB