Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Flash Led

Flash Led

2004-01-17 by ws34pk

Hi Every body!
              I have recently started programming the Atmel 
microcontrollers.Can some body help me write a simple program to 
flash an LED.I am using ATmega8.
regards
waseem

Re: [AVR-Chat] Flash Led

2004-01-17 by Wagner Lipnharski

ws34pk wrote:
> Hi Every body!
>               I have recently started programming the Atmel
> microcontrollers.Can some body help me write a simple program to
> flash an LED.I am using ATmega8.
> regards
> waseem


Waseem, read the instruction set, mostly about I/O port instructions, how to
set them for input, output and how to set or reset output level at the port
pins.  Other than that, you will need to have some timming function, to wait
some time between changing the port pin levels.

There is a I/O register that defines which bits in the I/O port will be
Input or Output. Of course you need the one with the LED to be defined as
Output.

Then just connect the LED via a resistor (300 to 500 ohms) to VCC.  The Led
Catode should be connected to the AVR I/O pin. In this way, the LED will
light when the AVR I/O pin is zero (low level).

Are you using the AVRStudio4?

RE: [AVR-Chat] Flash Led

2004-01-17 by Randy & Zonya Ledyard

Waseem

Check these out:

For ASM try these
www.avrfreaks.net (click on the academy tab)
www.avrbeginners.net
www.avr-asm-tutorial.net


For C try this
http://www.blitzlogic.com/proj_avr.htm

There's also this one http://www.learn-c.com/ that's geared more towards
using the PC, but some of the concepts and circuits could be adopted to a
microcontroller.
Show quoted textHide quoted text
-----Original Message-----
From: ws34pk [mailto:ws34pk@yahoo.com]
Sent: Saturday, January 17, 2004 2:10 AM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Flash Led


Hi Every body!
              I have recently started programming the Atmel
microcontrollers.Can some body help me write a simple program to
flash an LED.I am using ATmega8.
regards
waseem





Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/AVR-Chat/

To unsubscribe from this group, send an email to:
 AVR-Chat-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to:
 http://docs.yahoo.com/info/terms/

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.