- This topic has 1 reply, 2 voices, and was last updated 13 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › AVR ATMEGA8
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.
As simple program Atmega8 using led coding
/* LED BLINKING ON AND OFF */
#include<avr/io.h>
#include<utily/delay.h>
int main( )
{
DDRB = 0XFF;
while (1)
{
PORTB = 0XFF; //portb all pins is high
_delay_ms(5);
PORTB = 0X00; //portb all pins is off
_delay_ms(5);
}
}
/* switch status which is connected to PB0 .If PB0 is high glow led else switch off led