/**********************************************************************
* 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
* 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);
}
}
}
Previous article:A must-read for WinAVR beginners
Next article:AVR fuse configuration
- Popular Resources
- Popular amplifiers
Recommended Content
Latest Microcontroller Articles
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
He Limin Column
Microcontroller and Embedded Systems Bible
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
MoreSelected Circuit Diagrams
MorePopular Articles
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
MoreDaily News
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
Guess you like
- [SAMR21 new gameplay] 17. Download python firmware
- LLC circuit dead time
- Reconstructing the antenna design solution for mobile devices in the 5G era
- What exactly are those “special pads” on PCB boards used for?
- CC2640 power configuration modification
- Is there a conflict between CircuitPython and MicroPython?
- What is the relationship between embedded and microcontroller?
- Problems encountered in debugging Pingtouge's scenario-based Bluetooth Mesh
- Can S0 on the coil be understood as an ordinary auxiliary relay?
- Noise Suppression Basics Tutorial - Noise Suppression in Differential Transmission