Line 1: Line 1:
 
[[category:Atmega32 Breakout]]
 
[[category:Atmega32 Breakout]]
 
Now we will control the LED depending on external input. In this tutorial we will interface a switch to one of the port pin and display its status on LED connected to other port.
 
Now we will control the LED depending on external input. In this tutorial we will interface a switch to one of the port pin and display its status on LED connected to other port.
 +
=Basics=
 +
For this tutorial we will a connect a switch to PORT A0  and LED to PORT C0 of Atmega32. W will configure PORT A0 as input to read the switch status and PORT C0 as outputto display the switch status on LED.
 +
<br/>
 +
Refer the [[AVR I/O Register Configuration]] tutorial for basics of GPIO register configuration.

Revision as of 15:31, 4 April 2016

Now we will control the LED depending on external input. In this tutorial we will interface a switch to one of the port pin and display its status on LED connected to other port.

Basics

For this tutorial we will a connect a switch to PORT A0 and LED to PORT C0 of Atmega32. W will configure PORT A0 as input to read the switch status and PORT C0 as outputto display the switch status on LED.
Refer the AVR I/O Register Configuration tutorial for basics of GPIO register configuration.