Arduino · A000066
Arduino UNO R3
Arduino UNO R3: an ATmega328P (8-bit AVR, 16 MHz) at 5 V, with an ATmega16U2 as its USB serial.
En bref
The classic hobby board: an ATmega328P at 16 MHz, 32 KB flash, 2 KB SRAM, 5 V pins. 14 digital pins (6 PWM) and 6 analog inputs on the Arduino header. No CAN: add an MCP2515 on SPI.
Caractéristiques
Lues dans le modèle de la carte, dans le store.
- Processeur
- ATmega328P · 1× AVR · chip "atmega328p"
- Horloge
- 16 MHz
- Flash
- 32 KB
- RAM
- 2 KB
- Broches GPIO
- 18
- CAN (ADC)
- ADC 6 ch 10-bit
- Niveau logique
- 5 V
- Alimentation
- 5 V USB, or 7 V to 12 V on the barrel jack (in); 3.3V pin: 3.3 V (≤ 50 mA); 5V pin (from USB: its 500 mA fuse): 5 V (≤ 500 mA)
- Courant par broche
- 20 mA
- Bus
- UART ×1, I²C ×1, SPI ×1
- Tourne
- sans OS (bare metal)
Brochage
Chaque broche selon ce qu’elle fait. Survolez ou touchez une broche pour voir ce qu’elle peut être d’autre.
- Alimentation 3
- Masse 1
- Numérique 8
- Analogique 4
- Bus 6
- Contrôle 2
- PD0D0 (RX)
- PD1D1 (TX)
- PD2D2 (INT0)
- PD3D3 (PWM, INT1)
- PD4D4
- PD5D5 (PWM)
- PD6D6 (PWM)
- PD7D7
- PB0D8
- PB1D9 (PWM)
- PB2D10 (PWM, SS)
- PB3D11 (PWM, MOSI)
- PB4D12 (MISO)
- PB5D13 (SCK, LED L)
- PC0A0
- PC1A1
- PC2A2
- PC3A3
- PC4A4 (SDA)
- PC5A5 (SCL)
- pwr5 V USB, or 7 V to 12 V on the barrel jack
- v3v33.3V pin
- v55V pin (from USB: its 500 mA fuse)
- gndGND
Attention
Ce qu’archec vérifie pour cette carte, d’après ses données. Chaque point nomme la vérification qui l’attrape.
Ses broches donnent 5 V. Une pièce 3,3 V sur l’une d’elles demande un adaptateur de niveau entre les deux.
vérification
pin-levelUne broche donne au plus 20 mA. Une LED demande une résistance ; un moteur ou un relais, un driver.
vérification
pin-currentDeux connecteurs de la carte partagent ces broches : PB5 (LED L (D13) / SPI (D13, D11, D12, D10) / D13 (SCK, LED L)), PD1 (USART0 (D1, D0: the USB serial too) / D1 (TX)), PD0 (USART0 (D1, D0: the USB serial too) / D0 (RX)), PC4 (TWI, the I²C (A4, A5) / A4 (SDA)), PC5 (TWI, the I²C (A4, A5) / A5 (SCL)), PB3 (SPI (D13, D11, D12, D10) / D11 (PWM, MOSI)), PB4 (SPI (D13, D11, D12, D10) / D12 (MISO)), PB2 (SPI (D13, D11, D12, D10) / D10 (PWM, SS)). Utilisez l’un ou l’autre.
vérification
pin-conflictLa carte utilise déjà PB5 (LED L (D13)), PD0 (D0 (RX)), PD1 (D1 (TX)), PD2 (D2 (INT0)), PD3 (D3 (PWM, INT1)), PD4 (D4), PD5 (D5 (PWM)), PD6 (D6 (PWM)), PD7 (D7), PB0 (D8), PB1 (D9 (PWM)), PB2 (D10 (PWM, SS)), PB3 (D11 (PWM, MOSI)), PB4 (D12 (MISO)), PB5 (D13 (SCK, LED L)), PC0 (A0), PC1 (A1), PC2 (A2), PC3 (A3), PC4 (A4 (SDA)), PC5 (A5 (SCL)). Autre chose branché là entre en conflit.
vérification
pin-conflictLa sortie 3.3V pin donne au plus 50 mA en 3.3 V. Additionnez ce que vous alimentez avec.
vérification
board-currentLa sortie 5V pin (from USB: its 500 mA fuse) donne au plus 500 mA en 5 V. Additionnez ce que vous alimentez avec.
vérification
board-currentElle donne 3.3 V (3.3V pin), 5 V (5V pin (from USB: its 500 mA fuse)). Alimentez chaque pièce depuis une sortie à sa propre tension.
vérification
board-supplyElle a 1 UART, 1 I²C, 1 SPI. Un bus de plus d’un même type est une erreur.
vérification
board-peripheralChaque bus va sur les broches qui peuvent le porter (voir le brochage). Une autre broche est une erreur.
vérification
pin-function
Premier modèle
Un clignotement pour cette carte : la carte, une LED et une partie qui l’inverse toutes les 500 ms. archec le vérifie, puis écrit le code à droite.
project Blink "Blink" {
version "0.1.0"
edition "1.0"
uses arche-hw-store "^0.1"
}
include "arche-hw-store/boards/arduino-uno-r3/arduino-uno-r3.arche"
include "arche-hw-store/devices/led/led.arche"
/// Turns the LED over at each step.
component Blinker "Blinker" {
out led: requires Led
fn blink "Blink" {
```arche
led.toggle()
```
wcet 50us
}
}
/// The board, an LED on the board's LED L (D13) (PB5), and the blinker.
system Hw "Blink" {
part board: ArduinoUnoR3
part led: GpioLed { in pin { pins { pin PB5 } } }
part blinker: Blinker
blinker.led -> led.led
}
/// The firmware: the blinker every 500 ms.
deployment OnBoard "On the board" {
system Hw
platform Hw
binary blink on board {
thread main "Blink" { runs blinker; period 500ms; step blink }
}
}
/* Generated by archec: component Blinker. Do not edit outside the USER CODE regions: run `archec gen --target c` again, it keeps them. */
#include "blinker.h"
#include "arche_rt.h"
#include <math.h>
/* USER CODE BEGIN Blinker.includes */
/* USER CODE END Blinker.includes */
/* @arche Blinker.init main.arche:11 init */
void blinker_init(blinker_t *self)
{
(void)self;
/* USER CODE BEGIN Blinker.init */
/* USER CODE END Blinker.init */
}
/* @arche Blinker.blink main.arche:13 fn */
void blinker_blink(blinker_t *self)
{
blinker_call_led_toggle(self);
}blinker.c, l’un des 18 fichiers qu’archec écrit.
Les pièces de la carte
Ce qu’est chaque pièce numérotée. Cliquez sur un numéro pour la trouver sur la carte.
Trouvez la pièce
Le quiz nomme une pièce : cliquez dessus sur la carte. Un premier essai réussi marque un point.