ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Среда
3 июля
87909 Топик полностью
Aleksey75 (29.04.2007 21:32, просмотров: 1) ответил ig999 на Прерывания INT2 в ATMega8535
Может это внесёт ясность + • Bit 6 – ISC2: Interrupt Sense Control 2 The asynchronous External Interrupt 2 is activated by the external pin INT2 if the SREG I-bit and the corresponding interrupt mask in GICR are set. If ISC2 is written to zero, a falling edge on INT2 activates the interrupt. If ISC2 is written to one, a rising edge on INT2 activates the interrupt. Edges on INT2 are registered asynchronously. Pulses on INT2 wider than the minimum pulse width given in Table 37 will generate an interrupt. Shorter pulses are not guaranteed to generate an interrupt. When changing the ISC2 bit, an interrupt can occur. Therefore, it is recommended to first disable INT2 by clearing its Interrupt Enable bit in the GICR Register. Then, the ISC2 bit can be changed. Finally, the INT2 Interrupt Flag should be cleared by writing a logical one to its Interrupt Flag bit (INTF2) in the GIFR Register before the interrupt is re-enabled. DS ATmega8535 стр69 Все условия соблюдаете???