Skip to content

Commit ed53fde

Browse files
authored
User Manual update (#1929)
1 parent 672047a commit ed53fde

File tree

3 files changed

+67
-61
lines changed

3 files changed

+67
-61
lines changed
Loading
Loading

content/hardware/03.nano/boards/nano-matter/tutorials/user-manual/content.md

+67-61
Original file line numberDiff line numberDiff line change
@@ -1272,30 +1272,30 @@ void loop() {
12721272

12731273
The Nano Matter has **22 digital pins**, mapped as follows:
12741274

1275-
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Pin Functionality** |
1276-
|:-----------------------:|:-----------------------:|:---------------------:|
1277-
| PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1278-
| PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1279-
| PB05 | A2 | GPIO / ADC |
1280-
| PC00 | A3 | GPIO / ADC |
1281-
| PA06 | A4 / SDA | I2C / GPIO / ADC |
1282-
| PA07 | A5 / SCL | I2C / GPIO / ADC |
1283-
| PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1284-
| PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1285-
| PB04 | D13 / SCK | SPI / GPIO / ADC |
1286-
| PA08 | D12 / MISO | SPI / GPIO / ADC |
1287-
| PA09 | D11 / MOSI | SPI / GPIO / ADC |
1288-
| PD05 | D10 / SS | SPI / GPIO |
1289-
| PD04 | D9 | GPIO |
1290-
| PD03 | D8 | GPIO / ADC |
1291-
| PD02 | D7 | GPIO / ADC |
1292-
| PC09 | D6 | GPIO / ADC |
1293-
| PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1294-
| PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1295-
| PC06 | D3 | GPIO / ADC |
1296-
| PA03 | D2 / SCK1 | SPI / GPIO |
1297-
| PA05 | D1 / PIN_SERIAL_RX / MISO1 | UART / SPI / GPIO / ADC |
1298-
| PA04 | D0 / PIN_SERIAL_TX / MOSI1 | UART / SPI / GPIO / ADC |
1275+
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Pin Functionality** |
1276+
|:-----------------------:|:---------------------------:|:-----------------------:|
1277+
| PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1278+
| PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1279+
| PB05 | A2 | GPIO / ADC |
1280+
| PC00 | A3 | GPIO / ADC |
1281+
| PA06 | A4 / SDA | I2C / GPIO / ADC |
1282+
| PA07 | A5 / SCL | I2C / GPIO / ADC |
1283+
| PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1284+
| PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1285+
| PB04 | D13 / SCK | SPI / GPIO / ADC |
1286+
| PA08 | D12 / MISO | SPI / GPIO / ADC |
1287+
| PA09 | D11 / MOSI | SPI / GPIO / ADC |
1288+
| PD05 | D10 / SS | SPI / GPIO |
1289+
| PD04 | D9 | GPIO |
1290+
| PD03 | D8 | GPIO / ADC |
1291+
| PD02 | D7 | GPIO / ADC |
1292+
| PC09 | D6 | GPIO / ADC |
1293+
| PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1294+
| PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1295+
| PC06 | D3 / SS1 | GPIO / SPI / ADC |
1296+
| PA03 | D2 / SCK1 | SPI / GPIO |
1297+
| PA05 | D1 / PIN_SERIAL_RX1 / MISO1 | UART / SPI / GPIO / ADC |
1298+
| PA04 | D0 / PIN_SERIAL_TX1 / MOSI1 | UART / SPI / GPIO / ADC |
12991299

13001300
The digital pins of the Nano Matter can be used as inputs or outputs through the built-in functions of the Arduino programming language.
13011301

@@ -1329,14 +1329,14 @@ digitalWrite(pin, HIGH);
13291329
digitalWrite(pin, LOW);
13301330
```
13311331

1332-
The example code shown below uses digital pin `5` to control an LED and reads the state of a button connected to digital pin `4`:
1332+
The example code shown below uses digital pin `D5` to control an LED and reads the state of a button connected to digital pin `D4`:
13331333

13341334
![Digital I/O example wiring](assets/gpio-wiring.png)
13351335

13361336
```arduino
13371337
// Define button and LED pin
1338-
int buttonPin = 4;
1339-
int ledPin = 5;
1338+
int buttonPin = D4;
1339+
int ledPin = D5;
13401340
13411341
// Variable to store the button state
13421342
int buttonState = 0;
@@ -1373,7 +1373,7 @@ void loop() {
13731373

13741374
All the digital and analog pins of the Nano Matter can be used as PWM (Pulse Width Modulation) pins.
13751375

1376-
***You can only use 5 PWMs outputs simultaneously.***
1376+
***You can only use 5 PWM outputs simultaneously.***
13771377

13781378
This functionality can be used with the built-in function `analogWrite()` as shown below:
13791379

@@ -1392,7 +1392,7 @@ Here is an example of how to create a **1 kHz** variable duty-cycle PWM signal:
13921392

13931393
```arduino
13941394
const int analogInPin = A0; // Analog input pin that the potentiometer is attached to
1395-
const int pwmOutPin = 13; // PWM output pin
1395+
const int pwmOutPin = D13; // PWM output pin
13961396
13971397
int sensorValue = 0; // value read from the pot
13981398
int outputValue = 0; // value output to the PWM (analog out)
@@ -1433,7 +1433,7 @@ PWM.frequency_mode(output_pin, frequency);
14331433
Here is an example of how to create a **10 kHz** fixed duty-cycle PWM signal:
14341434

14351435
```arduino
1436-
const int analogOutPin = 13; // PWM output pin to use
1436+
const int analogOutPin = D13; // PWM output pin to use
14371437
14381438
void setup() {
14391439
analogWriteResolution(12);
@@ -1448,35 +1448,36 @@ void loop() {
14481448

14491449
### Analog Input Pins (ADC)
14501450

1451-
The Nano Matter has **19 analog input pins**, mapped as follows:
1452-
1453-
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Pin Functionality** |
1454-
|:-----------------------:|:-----------------------:|:---------------------:|
1455-
| PB00 | A0 | GPIO / ADC / DAC |
1456-
| PB02 | A1 | GPIO / ADC |
1457-
| PB05 | A2 | GPIO / ADC |
1458-
| PC00 | A3 | GPIO / ADC |
1459-
| PA06 | A4 / SDA | I2C / GPIO / ADC |
1460-
| PA07 | A5 / SCL | I2C / GPIO / ADC |
1461-
| PB01 | A6 | GPIO / ADC / DAC |
1462-
| PB03 | A7 | GPIO / ADC |
1463-
| PB04 | D13 / SCK | SPI / GPIO / ADC |
1464-
| PA08 | D12 / MISO | SPI / GPIO / ADC |
1465-
| PA09 | D11 / MOSI | SPI / GPIO / ADC |
1466-
| PD03 | D8 | GPIO / ADC |
1467-
| PD02 | D7 | GPIO / ADC |
1468-
| PC09 | D6 | GPIO / ADC |
1469-
| PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1470-
| PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1471-
| PC06 | D3 | GPIO / ADC |
1472-
| PA05 | D1 / PIN_SERIAL_RX / MISO1 | UART / GPIO / ADC / SPI |
1473-
| PA04 | D0 / PIN_SERIAL_TX / MOSI1 | UART / GPIO / ADC / SPI |
1474-
1475-
***Digital I/O's can also be used as analog inputs except for `D10`,`D9` and `D2`.***
1451+
The Nano Matter has **20 analog input pins**, mapped as follows:
1452+
1453+
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Pin Functionality** |
1454+
|:-----------------------:|:---------------------------:|:-----------------------:|
1455+
| PB00 | A0 / DAC0 | GPIO / ADC / DAC |
1456+
| PB02 | A1 / DAC2 | GPIO / ADC / DAC |
1457+
| PB05 | A2 | GPIO / ADC |
1458+
| PC00 | A3 | GPIO / ADC |
1459+
| PA06 | A4 / SDA | I2C / GPIO / ADC |
1460+
| PA07 | A5 / SCL | I2C / GPIO / ADC |
1461+
| PB01 | A6 / DAC1 | GPIO / ADC / DAC |
1462+
| PB03 | A7 / DAC3 | GPIO / ADC / DAC |
1463+
| PB04 | D13 / SCK | SPI / GPIO / ADC |
1464+
| PA08 | D12 / MISO | SPI / GPIO / ADC |
1465+
| PA09 | D11 / MOSI | SPI / GPIO / ADC |
1466+
| PD03 | D8 | GPIO / ADC |
1467+
| PD02 | D7 | GPIO / ADC |
1468+
| PC09 | D6 | GPIO / ADC |
1469+
| PC08 | D5 / SCL1 | I2C / GPIO / ADC |
1470+
| PC07 | D4 / SDA1 | I2C / GPIO / ADC |
1471+
| PC06 | D3 / SS1 | GPIO / SPI / ADC |
1472+
| PA03 | D2 / SCK1 | SPI / GPIO |
1473+
| PA05 | D1 / PIN_SERIAL_RX1 / MISO1 | UART / SPI / GPIO / ADC |
1474+
| PA04 | D0 / PIN_SERIAL_TX1 / MOSI1 | UART / SPI / GPIO / ADC |
1475+
1476+
***Digital I/O's can also be used as analog inputs except for `D9` and `D10`.***
14761477

14771478
Analog input pins can be used through the built-in functions of the Arduino programming language.
14781479

1479-
Nano Matter ADC resolution is fixed to 12 bits and cannot be changed by the user.
1480+
Nano Matter ADC resolution is fixed to **12 bits** and cannot be changed by the user.
14801481

14811482
The Nano Matter ADC reference voltage is 3.3 V by default, it can be configured using the function `analogReference()` with the following arguments:
14821483

@@ -1519,7 +1520,7 @@ void loop() {
15191520

15201521
### Analog Output Pins (DAC)
15211522

1522-
The Nano Matter has **one DAC** with two channels, mapped as follows:
1523+
The Nano Matter has **two DACs** with two channels each, mapped as follows:
15231524

15241525
| **Microcontroller Pin** | **Arduino Name** | **Board Pin Output** | **Peripheral** |
15251526
|:-----------------------:|:----------------:|:--------------------:|:--------------:|
@@ -1530,7 +1531,7 @@ The Nano Matter has **one DAC** with two channels, mapped as follows:
15301531

15311532
The digital-to-analog converters of the Nano Matter can be used as outputs through the built-in functions of the Arduino programming language.
15321533

1533-
The DAC output resolution can be configured using the `analogWriteResolution()` function as follows:
1534+
The DAC output resolution can be configured from 8 to 12 bits using the `analogWriteResolution()` function as follows:
15341535

15351536
```arduino
15361537
analogWriteResolution(12); // enter the desired resolution in bits (8,10,12)
@@ -1631,6 +1632,7 @@ The Nano Matter supports SPI communication, which enables data transmission betw
16311632
| PA04 | MOSI1 or D0 |
16321633
| PA05 | MISO1 or D1 |
16331634
| PA03 | SCK1 or D2 |
1635+
| PC06 | SS1 or D3 |
16341636

16351637
Please, refer to the [board pinout section](#pinout) of the user manual to localize them on the board.
16361638

@@ -1764,17 +1766,21 @@ while (Wire.available()) {
17641766

17651767
### UART
17661768

1767-
The pins used in the Nano Matter for the UART communication protocol are the following:
1769+
The Nano Matter features two UARTs. The pins used in the Nano Matter for the UART communication protocol are the following:
17681770

17691771
| **Microcontroller Pin** | **Arduino Pin Mapping** |
17701772
|:-----------------------:|:-----------------------:|
1771-
| PA05 | PIN_SERIAL_RX or D1 |
1772-
| PA04 | PIN_SERIAL_TX or D0 |
1773+
| PA05 | PIN_SERIAL_RX1 or D1 |
1774+
| PA04 | PIN_SERIAL_TX1 or D0 |
1775+
| PC05 | PIN_SERIAL_RX (internal) |
1776+
| PC04 | PIN_SERIAL_TX (internal) |
17731777

17741778
Please, refer to the [board pinout section](#pinout) of the user manual to localize them on the board.
17751779

17761780
***You can not use __UART__ and __SPI1__ interfaces at the same time because they share pins.***
17771781

1782+
***Use Serial.begin() for UART0 (internal) and Serial1.begin() for UART1 (exposed).***
1783+
17781784
To begin with UART communication, you will need to configure it first. In the `setup()` function, set the baud rate (bits per second) for UART communication:
17791785

17801786
```arduino

0 commit comments

Comments
 (0)