1 Intro
2
Electrocardiogram (
Ecg
) Signals
The Electrocardiogram (
Ecg
)
•
Ecg
: electrical manifestation of heart activity recorded
from the body surface
•
monitoring of heart rate
The
Ecg
signal can be recorded fairly easily with surface
electrodes placed on the limbs and/or the chest, see pages
below.
Josef Goette
2
2009
4 Peripherals
4.5 General Purpose Input/Output (GPIO)
GPIOs are used for reading an input or setting an output. The GPIOs of the STM32F103RB can all
be used as digital or analog inputs.
b
gpio1
F
Shows a counter on GPIOB.
b
gpio2
F
Reads the inputs of GPIOA and puts them on GPIOB.
b
gpio3
F
Pressing buttons S1, S2 move the lit LED. S1 moves the lit LED to the right, S2 to the left.
4.5.1 Configuration
The configuration is done with the
Settings Wizard
(see Chapter
for more information), shown
in Figure
GPIOA to GPIOD can be set to different modes:
•
Input
–
Analog: Used to route the signal to an AD converter (see Chapter
–
Floating: Used as a ”normal” input
–
Input with pull-up / pull-down resister
•
Output
–
Push-pull (max speed 2MHz, 10MHz or 50MHz): Used as a ”normal” output
–
Open-drain (max speed 2MHz, 10MHz or 50MHz): Used in a system with different
nodes having access to the same wire.
•
Alternate Function (AF): Used for Oscillator, CAN, JTAG, ADC, Timer, USART, I
2
C and SPI
–
Alternate Function push-pull (max speed 2MHz, 10MHz or 50MHz)
–
Alternate Function open-drain (max speed 2MHz, 10MHz or 50MHz)
Figure 4.1:
GPIO Configuration Wizard
26
STM32 Cortex-M3 Tutorial