Professional Documents
Culture Documents
I/O Ports
AVR Microcontroller
PORT A
PORT B
PORT C
PORT D 2
Arrangement of elements in STK500
3
Synchronization when reading an externally applied pin value
6
Port Implementation
Input Output
7
Description of general purpose LEDs
8 yellow LEDs
Logical “1” – switch on
Logical “0” – switch off
8
Implementation of Switches and Switch
Headers
9
Example 1. Switch on the light
10
Example 2. Handle the pressed button
11
Lab 3. The task
Purpose of work: studying the operations of working with I / O ports, the use of subroutines.
Develop a program in which to implement button click handling. Program processing for each
individual button for action in accordance with the task variant. The result of the program
execution should be displayed on the LEDs.
12
Lab 3. The forms
Forms BUTTON 1 BUTTON 2 BUTTON 3 BUTTON 4 bit string
14