Mikrokontroller-Praktikum_s4

/*****************************************************
This program was produced by the
CodeWizardAVR V2.04.7a Evaluation
Automatic Program Generator
© Copyright 1998-2010 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com

Project :
Version :
Date : 31/05/2011
Author : Freeware, for evaluation and non-commercial use only
Company :
Comments:

Chip type : ATmega8535
Program type : Application
AVR Core Clock frequency: 10,000000 MHz
Memory model : Small
External RAM size : 0
Data Stack size : 128
*****************************************************/








#include
#include
void main(void)
{
PORTA=0x00;
DDRA=0xFF;
PORTB=0xFF;
DDRB=0x00;
PORTC=0x00;
DDRC=0x00;
PORTD=0x00;
DDRD=0x00;
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;

TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
ICR1H=0x00;
ICR1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;

ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
MCUCR=0x00;
MCUCSR=0x00;
TIMSK=0x00;
ACSR=0x80;
SFIOR=0x00;

while (1)
{
// Place your code here
if (PINB.0==0)
{PORTA=0xF0; delay_ms(500);}
else if (PINB.1==0)
{PORTA=0b11001100; delay_ms(500);}
else if (PINB.2==0)
{PORTA=255;delay_ms(500);}
else
{PORTA=0x00;}
}
}
Category: 1 komentar

1 komentar:

quashiegahm mengatakan...

List of casino games that you can play with friends - Casino Sites
Looking 카지노사이트 for all the best games on the Internet? ➤ Enjoy exclusive 카지노사이트 slots games and casino games on your cell phone or tablet.

Posting Komentar

Blog List