Lab 6 PDF
Lab 6 PDF
LAB 6:
ALUMNOS: Diego Ortega Sanz, Ángel Salas Navarro y Guillermo de la Obra Pérez
INTRODUCTION
In this practice we had the first contact with Arduino, using the Arduino 1.Arduino model is an
electronic board based on the ATmega328 microcontroller. It has 14 digital inputs and outputs,
of these 6 can be used as PWM outputs (Modulation by pulse width) and has 6 analog inputs,
grounding. In addition, it includes a 16 Mhz ceramic resonator, a USB connector, a power
supply, an ICSP header and a reset button. To make the board perform the work, it is
necessary to carry out the code, once it is finished it will be loaded and it will be uploaded to
the Arduino via a USB cable between the computer and the Arduino.
-Voltage: 5V
-Analog inputs: 6
- Flash Memory: 32 KB (ATmega328) of which 0.5 KB are used for the boot
- SRAM: 2 KB (ATmega328)
- EEPROM: 1 KB (ATmega328)
Starting clockwise:
-Dial Terminals 0-1 / Serial I / O - TX / RX (dark green) - These pins can not be used as digital I /
O (digitalRead () and digitalWrite ()) if you are using serial communication (eg Serial. begin).
- External power or USB selector (place a jumper on the two closest pins of the power you
want) - SV1 (purple). In the new versions of Arduino, the power selection is automatic, so you
may not have this selector.
-USB (used to upload programs to the board and for serial communications between the
board and computer, it can be used as board power) (yellow)
Exercises.
Exercise 1. Obtain and run a program in C++ that energize (ON) and turn off
(OFF) relay K3 of the DISEN-EXP board, using as a control input switch S1.
Arduino Digital 7 pin is to be used as output, which through the amplifier circuit
shown in Figure 1, controls relay operation.
Arduino Digital 8 pin is to be used as input, to which through the switch bounce
elimination circuit shown in Figure 2, is fed signal from switch S1
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA
Take into account that you are connecting two different boards. So there should be a
ground connection (or return path), in order signals can travel from one board to the
other.
Ground. Almost any connector has power connection (circle – 5V, triangle – ground).
Exercise 2. Obtain a program showing 8 different patterns on the LEDS of the DISEN-552
Exercise 3. Obtain a program to display the number "1234" in the circuit of Figure 3.
GRADO EN INGENIERÍA ELECTRÓNICA
INDUSTRIAL Y AUTOMÁTICA