Skip to content

Commit a8a49bd

Browse files
committed
pin macros updated
1 parent eb7cd0f commit a8a49bd

File tree

1 file changed

+33
-26
lines changed
  • content/hardware/06.nicla/boards/nicla-vision/tutorials/user-manual

1 file changed

+33
-26
lines changed

content/hardware/06.nicla/boards/nicla-vision/tutorials/user-manual/content.md

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,12 @@ The Nicla Vision has **ten digital pins**, mapped as follows:
314314
| PA_9 | D1 |
315315
| PA_10 | D2 |
316316
| PG_1 | D3 |
317-
| PE_12 | SCK |
318-
| PE_13 | MISO |
319-
| PE_14 | MOSI |
320-
| PE_11 | SS |
321-
| PB_8 | I2C_SCL |
322-
| PB_9 | I2C_SDA |
317+
| PE_12 | SCKL |
318+
| PE_13 | CIPO |
319+
| PE_14 | COPI |
320+
| PE_11 | CS |
321+
| PB_8 | SCL |
322+
| PB_9 | SDA |
323323

324324

325325
Notice that I2C and SPI pins can also be used as digital pins. Please, refer to the [board pinout section](#pinout) of the user manual to find them on the board.
@@ -457,16 +457,16 @@ First, we need to identify the `Timer` and `Channel` used by the `PWM` output to
457457

458458
Here is a table with the details of the exposed pins on the Nicla Vision:
459459

460-
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Timer** |**Channel** |
461-
|:-----------------------:|:------------------------:|:----------:|:----------:|
462-
| PA_9 | D1 | TIMER1 | CH2 |
463-
| PA_10 | D2 | TIMER1 | CH3 |
464-
| PB_8 | I2C_SCL | TIMER4 | CH3 |
465-
| PB_9 | I2C_SDA | TIMER4 | CH4 |
466-
| PE_11 | SS | TIMER1 | CH2 |
467-
| PE_12 | SCK | TIMER1 | CH3 |
468-
| PE_13 | MISO | TIMER1 | CH3 |
469-
| PE_14 | MOSI | TIMER1 | CH4 |
460+
| **Microcontroller Pin** | **Arduino Pin Mapping** | **Timer** | **Channel** |
461+
| :---------------------: | :---------------------: | :-------: | :---------: |
462+
| PA_9 | D1 | TIMER1 | CH2 |
463+
| PA_10 | D2 | TIMER1 | CH3 |
464+
| PB_8 | SCL | TIMER4 | CH3 |
465+
| PB_9 | SDA | TIMER4 | CH4 |
466+
| PE_11 | CS | TIMER1 | CH2 |
467+
| PE_12 | SCKL | TIMER1 | CH3 |
468+
| PE_13 | CIPO | TIMER1 | CH3 |
469+
| PE_14 | COPI | TIMER1 | CH4 |
470470

471471

472472
To use the PWM functions, you need to import the `time`, `Pin`, and `Timer` modules.
@@ -1229,11 +1229,11 @@ This section of the user manual covers the different communication protocols tha
12291229
The Nicla Vision supports SPI communication, which allows data transmission between the board and other SPI-compatible devices. The pins used in the Nicla Vision for the SPI communication protocol are the following:
12301230

12311231
| **Microcontroller Pin** | **Arduino Pin Mapping** |
1232-
|:-----------------------:|:-----------------------:|
1233-
| SCLK / PE_12 | SCK or 9 |
1234-
| CIPO / PE_13 | MISO or 10 |
1235-
| COPI / PE_14 | MOSI or 8 |
1236-
| CS / PE_11 | CS or 7 |
1232+
| :---------------------: | :---------------------: |
1233+
| SCLK / PE_12 | SCKL or PE12 |
1234+
| CIPO / PE_13 | CIPO or PE13 |
1235+
| COPI / PE_14 | COPI or PE14 |
1236+
| CS / PE_11 | CS or PE11 |
12371237

12381238

12391239
Please, refer to the [board pinout section](#pinout) of the user manual to localize them on the board.
@@ -1371,8 +1371,8 @@ The Nicla Vision supports I2C communication, which allows data transmission betw
13711371

13721372
| **Microcontroller Pin** | **Arduino Pin Mapping** |
13731373
| :---------------------: | :---------------------: |
1374-
| PB_8 / SCL | PB8 |
1375-
| PB_9 / SDA | PB9 |
1374+
| PB_8 / SCL | SCL / I2C1_SCL / PB8 |
1375+
| PB_9 / SDA | SDA / I2C1_SDA / PB9 |
13761376

13771377
Please, refer to the [board pinout section](#pinout) of the user manual to localize them on the board. The I2C pins are also available through the onboard ESLOV connector of the Nicla Vision.
13781378

@@ -1509,9 +1509,9 @@ while (Wire.available()) {
15091509
The pins used in the Nicla Vision for the UART (external) communication protocol are the following:
15101510

15111511
| **Microcontroller Pin** | **Arduino Pin Mapping** |
1512-
|:-----------------------:|:-----------------------:|
1513-
| PA_10 | SERIAL1_RX |
1514-
| PA_9 | SERIAL1_TX |
1512+
| :---------------------: | :---------------------: |
1513+
| PA_10 | UART_RX or PA10 |
1514+
| PA_9 | UART_TX or PA9 |
15151515

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

@@ -1528,6 +1528,13 @@ Then, initialize the UART object defining the __bus number__ and __baudrate__.
15281528
```python
15291529
uart = UART(9, 115200) # bus 9 uses PA9 and PA10 as (TX and RX) respectively
15301530
```
1531+
1532+
You can define UART settings with the following function:
1533+
1534+
```python
1535+
uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters
1536+
```
1537+
15311538
To read incoming data, you can use different functions as the following.
15321539

15331540
```python

0 commit comments

Comments
 (0)