GCC AVR Experiment 1: Flowing Light

Publisher:GoldenHarmonyLatest update time:2015-11-12 Source: eefocusKeywords:GCC Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
/**********************************************************************
* File name: main.c
* Program author: Kevin Chin
* Program version: V1.0
* Compilation date: 2010/06/28
* Function description: 8-bit LED is lit in a cycle
* Compiler: WinAVR-20090313
* Chip: ATmega16, external 11.0592MHZ crystal oscillator
* Technical support: http://www.cepark.com
***********************************************************************/
#include
#include

int main(void)
{
    PORTB = 0xFF;
    DDRB = 0xFF; //Port setting

    unsigned char i;    

    while(1)
    {
        for(i = 0; i < 8; i++ )
        {
            PORTB = ~(1<             _delay_ms(200);
        }
        

    }
}
Keywords:GCC Reference address:GCC AVR Experiment 1: Flowing Light

Previous article:A must-read for WinAVR beginners
Next article:AVR fuse configuration

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号