| Ligne 226 : |
Ligne 226 : |
| | | | |
| | {{asm-end}} | | {{asm-end}} |
| | + | === Digital connectors === |
| | + | The CANSAT-BASE is fitted with 2 Grove connector each exposing two digital line. Such line is either HIGH (3.3V) or LOW (0V). |
| | + | |
| | + | Each line can be configured as: |
| | + | * '''Input''' where an external device set the PIN voltage to 3.3V or 0V allowing the '''microcontroler to read''' the state HIGH or LOW. |
| | + | * '''Output''' allowing the '''microcontroler to write (set)''' the state of the Pin to control an external device (like a LED or a Motor). |
| | + | |
| | + | {{ambox | text = Each of the lines can also be driven with [https://en.wikipedia.org/wiki/Pulse-width_modulation Pulse-Width Modulation].}} |
| | + | |
| | + | {{asm-begin}} |
| | + | {{asm-row|img=ENG-CANSAT-V2-Digital1.jpg}} |
| | + | {{asm-text}} Two GPIOs are attached to the Digital 1 connector. |
| | + | |
| | + | Note the 'gp18' on the silkscreen next to the connector. The next GPIO is set to the following number. |
| | + | |
| | + | {| class="wikitable" border="1" |
| | + | |- |
| | + | | align="center" | '''GPIO''' |
| | + | | align="center" | '''Description''' |
| | + | |- style="font-size: 90%" |
| | + | | align="left" | gp18 |
| | + | | align="left" | Input/Output or PWM |
| | + | |- style="font-size: 90%" |
| | + | | align="left" | gp19 |
| | + | | align="left" | Input/Output or PWM |
| | + | |} |
| | + | |
| | + | {{asm-row|img=ENG-CANSAT-V2-Digital2.jpg}} |
| | + | {{asm-text}} Two other GPIOs are attached to the '''Digital 2''' connector. |
| | + | |
| | + | {| class="wikitable" border="1" |
| | + | |- |
| | + | | align="center" | '''GPIO''' |
| | + | | align="center" | '''Description''' |
| | + | |- style="font-size: 90%" |
| | + | | align="left" | gp20 |
| | + | | align="left" | Input/Output or PWM |
| | + | |- style="font-size: 90%" |
| | + | | align="left" | gp21 |
| | + | | align="left" | Input/Output or PWM |
| | + | |} |
| | + | |
| | + | {{asm-end}} |
| | + | |
| | + | |
| | === UART connector === | | === UART connector === |
| | The UART is often called serial line, it is a bidirectional communication bus used to communicate with an UART device. Most common device are GPS, Mobile Phone Chips, WiFi/Bluetooth chips. | | The UART is often called serial line, it is a bidirectional communication bus used to communicate with an UART device. Most common device are GPS, Mobile Phone Chips, WiFi/Bluetooth chips. |
| Ligne 240 : |
Ligne 285 : |
| | A common configuration is 9600 bauds, 8 bits Data, NO parity, 1 stop bit usually summarize as "9600 8N1". The next most common configuration is "115200 8N1". | | A common configuration is 9600 bauds, 8 bits Data, NO parity, 1 stop bit usually summarize as "9600 8N1". The next most common configuration is "115200 8N1". |
| | | | |
| − | When a device sends data, the uart will decompose the data into a sequence of bits (sequence of 1 and 0) THEN emit the bits one by one over the serial line. | + | When a device sends data, the sender UART will decompose the data into a sequence of bits (sequence of 1 and 0) THEN emit the bits one by one over the serial line. |
| | | | |
| − | As the both devices agreed on the communication parameter, the receiver can properly interpret the bits sequences TO recompose the original data. | + | As the both devices agreed on the communication parameter, the receiver UART can properly interpret the bits sequences TO recompose the original data. |
| | | | |
| | {{asm-begin}} | | {{asm-begin}} |