Ligne 37 : |
Ligne 37 : |
| {{SPARKImage|Spark.IO-Brochage-UART.jpg|480px}} | | {{SPARKImage|Spark.IO-Brochage-UART.jpg|480px}} |
| | | |
− | The first one is a CDC (Communications Device Class) available over the USB port. When configured, it will show up as a virtual COM port on the computer. (usage: Serial.begin(9600);) | + | The first one is a CDC (Communications Device Class) available over the USB port. When configured, it will show up as a virtual COM port on the computer. (usage: <code>Serial.begin(9600);</code>) |
| | | |
− | The second one is a hardware USART available via the TX and RX pins on the Core. (usage: Serial1.begin(9600);) | + | The second one is a hardware USART available via the TX and RX pins on the Core. (usage: <code>Serial1.begin(9600);</code>) |
| | | |
| The third one is a hardware USART available via the D1(Tx) and D0(Rx) pins on the Core. (usage: <code>Serial2.begin(9600);</code>) | | The third one is a hardware USART available via the D1(Tx) and D0(Rx) pins on the Core. (usage: <code>Serial2.begin(9600);</code>) |
Ligne 45 : |
Ligne 45 : |
| Configuration and use of all of these serial ports is described in the [http://docs.spark.io/firmware/#communication-serial serial functions] (''Spark, anglais''). | | Configuration and use of all of these serial ports is described in the [http://docs.spark.io/firmware/#communication-serial serial functions] (''Spark, anglais''). |
| | | |
− | NOTE: Please take into account that the voltage levels on these pins runs at 0V to 3.3V and should not be connected directly to a computer's RS232 serial port which operates at +/- 12V and can damage the Core.
| + | {{ambox-stop|text=Please take into account that the voltage levels on these pins runs at 0V to 3.3V and should not be connected directly to a computer's RS232 serial port which operates at +/- 12V and can damage the Core.}} |
| + | |
| + | == Bus SPI == |
| + | The Serial Peripheral Interface is available on pins: |
| + | |
| + | * A2: SS (Slave Select) |
| + | * A3: SCK (Serial Clock) |
| + | * A4: MISO (Master In Slave Out) |
| + | * A5: MOSI (Master Out Slave In) |
| + | |
| + | {{SPARKImage|Spark.IO-Brochage-SPI.jpg|480px}} |
| + | |
| + | NOTE: All of these pins run at 3.3V logic levels. |
| + | |
| + | == Bus I2C == |
| + | I2C communication pins are multiplexed with the standard GPIO pins D0 and D1. |
| + | |
| + | * D0: SDA (Serial Data Line) |
| + | * D1: SCL (Serial Clock) |
| + | |
| + | {{SPARKImage|Spark.IO-Brochage-I2C.jpg|480px}} |
| + | |
| + | Both of these pins run at 3.3V logic level but are tolerant to 5V inputs. |
| + | |
| + | |
| | | |
| {{Spark-Core-Materiel-TRAILER}} | | {{Spark-Core-Materiel-TRAILER}} |