Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

led blinking using led using atmega8

Status
Not open for further replies.
Use timer to generate interrupt for some milli seconds and then use a counter to count no of interrupts. eg. set timer interrupt for 100 ms and increment counter on every interrupt. If counter is 10 then time is 1000 ms or 1 sec. When value of counter is 10 set a flag. use this flag in while(1) loop to blink led and clear the flag. The led toggles on every 10 interrupts.


Edit: Debasis. Thanks I didn't see the interrupt0

You have to use externel interrupt. When ever an interrupt is detected you have to blink led and then re-enable the interrupt which you have disabled in interrupt routine.
 
Last edited:

you have mentioned that led blink using interrupt0.so,remember that interrupt0 is a hardware interrput by which u can active the interruput by giving a zero pulse to the interrupt0 pin,then you can blink the led using 0 and 1 pulse by help of programe
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top