پاسخ : مشل با دیمر 220
منظورتون چیه؟؟
خب روشن کردن لامپ!
نوشته اصلی توسط arvinfx
خب روشن کردن لامپ!
#include <mega32.h> #include <delay.h> // External Interrupt 0 service routine interrupt [EXT_INT0] void ext_int0_isr(void) { // Place your code here } // External Interrupt 1 service routine interrupt [EXT_INT1] void ext_int1_isr(void) { PORTD.6=1; delay_ms(2); PORTD.6=0; } // Declare your global variables here void main(void) { PORTA=0x00; DDRA=0x00; PORTB=0x00; DDRB=0x00; PORTC=0x00; DDRC=0x00; PORTD=0x00; DDRD=0xF3; GICR|=0xC0; MCUCR=0x0A; MCUCSR=0x00; GIFR=0xC0; #asm("sei") while (1) { } }
دیدگاه