-45-
v6.3
Hardware
3.5.4. UART
There are two UARTs in Waspmote: UART0 and UART1. Besides, there are several ports which might be connected to these
UARTs through two different multiplexers, one for each UART.
•
UART0
is shared by the USB port and the Socket0. This socket is used for XBee modules, LoRaWAN module, LoRa module,
Sigfox module, RFID/NFC module, Bluetooth modules, WiFi module, RS-485 module, etc. The multiplexer in this UART
controls the data signal which by default is always switched to Socket0. When the USB needs to send info through the
UART0, the multiplexer is momentarily switched to the USB port and set back again to Socket0 after printing.
•
UART1
is shared by four ports: Socket1, Auxiliar1 and Auxiliar2 sockets. It is possible to select in the same program which
of the four ports is connected to UART1 in the microcontroller. UART1 multiplexer configuration is carried out using the
following instructions:
{
Utils.setMuxAux1(); // set Auxiliar1 socket
Utils.setMuxAux2(); // set Auxiliar2 socket
Utils.setMuxGPS(); // set GPS socket
Utils.setMuxSocket1(); // set Socket1
}
3.5.5. I2C
The I2C communication bus is also used in Waspmote where two devices are connected in parallel: the accelerometer and the
RTC . In all cases, the microcontroller acts as master while the other devices connected to the bus are slaves.
3.5.6. SPI
The SPI port on the microcontroller is used for communication with the micro SD card. All operations using the bus are performed
clearly by the specific library. The SPI port is also available in the SPI/UART connector.
3.5.7. USB
USB is used in Waspmote for communication with a computer or compatible USB devices. This communication allows the
microcontroller’s program to be loaded.
For USB communication, microcontroller’s UART0 is used. The
FT232RL
chip carries out the conversion to USB standard.
3.6. Real Time Clock - RTC
Waspmote has a built in Real Time Clock – RTC, which keeps it informed of the time. This allows Waspmote to be programmed
to perform time-related actions such as:
“Sleep for 1h 20 min and 15sec, then wake up and perform the following action”
Or even programs to perform actions at absolute intervals, e.g.:
“Wake on the 5th of each month at 00:20 and perform the following action”
All RTC programming and control is done through the I2C bus.
Alarms:
Alarms can be programmed in the RTC specifying day/hour/minute/second. That allows total control about when the mote
wakes up to capture sensor values and perform actions programmed on it. This allows Waspmote to be in the saving energy
modes (
Deep Sleep
and
Hibernate
) and makes it wake up just at the required moment.
As well as relative alarms, periodic alarms can be programmed by giving a time measurement, so that Waspmote reprograms its
alarm automatically each time one is triggered.
Содержание Waspmote
Страница 1: ...Waspmote Technical Guide ...
Страница 11: ... 11 v6 3 Waspmote Kit Connect the battery in Waspmote Connect the sensor board Switch it on ...
Страница 59: ... 59 v6 3 Sensors Vibration Acceleration Free fall ...
Страница 79: ... 79 v6 3 LoRa Figure Channel frequencies in the 868MHz band Figure Channel frequencies in the 900MHz band ...
Страница 98: ... 98 v6 3 RFID NFC ...