для 90s8535 в code vision
(«Телесистемы»: «Конференция «Микроконтроллеры и их применение»»)

миниатюрный аудио-видеорекордер mAVR

Отправлено dip8 28 апреля 2003 г. 16:48
В ответ на: Народ кому не сложно кинте пожалуста пример проги на Си для ARM (AT91) работы с внешним прерыванием IRQ0. Буду очень Благодарен отправлено AlexTor 28 апреля 2003 г. 13:22

#include "90s8535.h"
interrupt [EXT_INT0] void ext_int0_isr(void)
{
PORTA=PORTA ^0x1; //toggle the LSB of port A
}

void main(void)
{
DDRA=0x01; //port A LSB set for output

GIMSK=0x40; //set the INT0 bit to enable external interrupt 0
MCUCR=0x02; //set the ISC01 to activate on a falling edge

#asm("sei") //enable the global interrupt enable bit

while(1)
; //do nothing - the interrupt does it all
}
/* This programm toggles the LED attached to Port A, bit 0, each
* time the pushbutton attached to the INT0 pin is pressed.
*/

Составить ответ ||| Конференция ||| Архив

Ответы



Перейти к списку ответов ||| Конференция ||| Архив ||| Главная страница ||| Содержание

E-mail: info@telesys.ru