Modifications

Sauter à la navigation Sauter à la recherche
3 766 octets ajoutés ,  26 février 2022 à 01:25
Ligne 1 : Ligne 1 :  
{{ENG-CANSAT-PICO-NAV}}
 
{{ENG-CANSAT-PICO-NAV}}
  −
{{traduction}}
      
== Raspberry-Pi PICO ==
 
== Raspberry-Pi PICO ==
Ligne 52 : Ligne 50 :  
This Pico and the RP2040 have built-in USB 1.1 PHY (host and device support) which offers USB-to-Serial and debug feature (so no need for FTDI-like chip). The Pico also feature and 3 pins SWD debug port (mostly used for C development debugging with OpenOCD).
 
This Pico and the RP2040 have built-in USB 1.1 PHY (host and device support) which offers USB-to-Serial and debug feature (so no need for FTDI-like chip). The Pico also feature and 3 pins SWD debug port (mostly used for C development debugging with OpenOCD).
   −
The Picro has the following specs:
+
The Pico has the following specs:
 
* Size: 51mm x 23mm x 3.8mm
 
* Size: 51mm x 23mm x 3.8mm
 
* Weight: 3 grams
 
* Weight: 3 grams
Ligne 88 : Ligne 86 :  
The Raspberry-Pi Pico is pre-loaded with an UF2 bootloader in the RP2040 microcontroler ROM. U2F mode makes the board looking like a USB Flash Drive when attached to a computer. It allows to upload a new firmware into the Flash.
 
The Raspberry-Pi Pico is pre-loaded with an UF2 bootloader in the RP2040 microcontroler ROM. U2F mode makes the board looking like a USB Flash Drive when attached to a computer. It allows to upload a new firmware into the Flash.
   −
The MicroPython firmware is already uploaded while manufacturing the Pico board. So, ''in fine'', there is no need to activates UF2 mode anymore. MicroPython does allows to store python scripts into the board via operation over the serial port (no need for UF2 mode in this case).
+
{{ambox|text=The MicroPython firmware is already uploaded while manufacturing the Pico board. So, ''in fine'', there is no need to activates UF2 mode anymore. MicroPython does allows to store python scripts into the board via operation over the serial port (no need for UF2 mode in this case).}}
    
Pressing the "boot" button while powering up the Pico will activates the UF2 mode. Simply drag an UF2 firmware on the USB Flash drive to completely reprogram the firmware running on the board (No special tools, No special drivers needed)! The UF2 bootloader can be used to load up a newer version of MicroPython, Arduino IDE compiled firmware, C++ firmware, CircuitPython (derivative version of MicroPython made from Adafruit Industries), etc.
 
Pressing the "boot" button while powering up the Pico will activates the UF2 mode. Simply drag an UF2 firmware on the USB Flash drive to completely reprogram the firmware running on the board (No special tools, No special drivers needed)! The UF2 bootloader can be used to load up a newer version of MicroPython, Arduino IDE compiled firmware, C++ firmware, CircuitPython (derivative version of MicroPython made from Adafruit Industries), etc.
Ligne 110 : Ligne 108 :     
=== Power Pins ===
 
=== Power Pins ===
xxx
+
[[fichier:ENG-CANSAT-PICO-PINOUT-30.png]]
 +
 
 +
* '''VBUS''' - Does have 5V when the Pico micro USB is plugged onto a computer (or PSU). Python code also detect VBUS by querying the GP24 pin (goes HIGH when 5V is present).
 +
* '''VSYS''' - allows to power-up the Pico from an external power source from 1.8 to 5.5V (lipo battery). The voltage on this pin can be monitored with analog pin GP26 (=VSYS/3). It is quite useful to warn the user when the battery must be refill. GP26 is not exposed on the GPIO connector.
 +
* '''3V3''' - Output of the 3.3V onboard regulator. That pin can deliver up to 300mA to your project. This step-up/step-down 3.3V regulator is powered from VSYS.
 +
* '''3V3_EN''' - Tied this pin to the ground to disable the 3.3V regulator and shutdown the Pico.
 +
* '''GND''' - common ground.
 +
 
 +
=== Digital Pins ===
 +
[[fichier:ENG-CANSAT-PICO-PINOUT-31.png]]
 +
 
 +
{{ambox-stop|text=Never exceed 3.3V, neither apply negative voltage, to any of the Pins}}
 +
Digital Pins can be used as:
 +
* '''Input''' - allowing the python script to read the state of the Pin. The pin '''is driven by external component''' or sensor setting.
 +
** the read state returns HIGH when the pin is set to 3.3V.
 +
** the read state returns LOW when the pin is tied to the GND (0 Volt).
 +
* '''Output''' - allowing the python script to write the state of the Pin. The pin can produce (or absorb) some current '''to drive an external component''' or sensor.
 +
** WHEN set to HIGH by Python code THEN the microcontroler drives the pin to 3.3V.
 +
** WHEN set to LOW by Python code THEN the microcontroler drives the pin to GND (0 Volt).
   −
* '''VBUS''' - (GP24 is HIGH)
+
{{underline|Please note:}}
* '''VSYS''' - (GP26 = VSYS/3)
+
* The analog input pins can also be used as digital input/output pins.
* '''3V3''' -
+
* The onboard LED is controlled by the pin GP25. The GP25 is not wired to a board pin.
* '''3V3_EN''' -
  −
* '''GND''' -
      
=== Analog Pins ===
 
=== Analog Pins ===
xxx
+
[[fichier:ENG-CANSAT-PICO-PINOUT-32.png]]
 +
 
 +
The Pico does expose 3 analog inputs pins. Each pin can read a voltage between 0 and 3.3V.
 +
* '''GP28''' - also known as ADC2 (analog input 2).
 +
* '''GP27''' - also known as ADC1 (analog input 1).
 +
* '''GP26''' - also known as ADC0 (analog input 0).
 +
* '''GP26''' - not exposed on the board pin, the voltage applied to GP26 equal VSYS/3. It can be used to monitor the external power source/battery voltage.
 +
* '''AGND''' - Reference ground for analog reading.
 +
* '''ADC_VREF''' - Analog input voltage reference. It is the 3.3V with additional filtering. Do not applies any voltage to this pin, do not use it to supply power to the project.
 +
 
 +
The ADC (''Analog To Digital'' converter) does offers 12 bits resolution. So the ADC returns a numeric value from 0 to 4095 for an applied voltage going from 0 to 3.3V .
 +
 
 +
This means that ADC resolution is 3.3V / 4095 = 0.0008058607 (so 0.8 mV).
   −
* '''GP28''' - ADC2
+
=== UARTs ===
* '''GP27''' - ADC1
+
The Pico have many buses but one must be highlighted, it is '''UART(0)'''. UART is often referred as serial port.
* '''GP26''' - ADC0
+
 
* '''GP26''' - VSYS/3
+
'''UART(0)''' is the prefered position to replicates the MicroPython REPL (MicroPython interactive command line interpreter) but is free to use for scripts.
 +
 
 +
REPL stand for ''Read, Evaluate, Print Loop''.
 +
 
 +
REPL is available over:
 +
* USB connector
 +
* can be made available over UART(0) then just plug a [https://shop.mchobby.be/product.php?id_product=144 console cable] on RX & TX to get access to the REPL via the UART(0) .
 +
 
 +
[[fichier:ENG-CANSAT-PICO-PINOUT-33.png]]
 +
 
 +
=== Special Pins ===
 +
[[fichier:ENG-CANSAT-PICO-PINOUT-34.png]]
 +
 
 +
 
 +
* '''RUN''' - This pin acts like '''Reset''' pin. Tie it to the ground and the the Pico immediately stops.
 +
* '''3V3_EN''' - Deactivate the 3.3V power regulator when tied to the ground. This will completely switch off the Pico power
 +
* '''GP23''' - PowerSave internal board pin. Depending on the conditions, this pin can reduce the power consumption of the board.
 +
* '''GP24''' - This internal board pin is pulled HIGH when the board is connected to a computer or wall adapter (when VBus = 5V).
 +
* '''GP25''' - Controls the onboard LED. The GP25 is not wired to a board pin.
    
=== Debug Pins ===
 
=== Debug Pins ===
 +
The debugging port is an advanced feature used with OpenOCD. It allows software debugging on the MicroControler.
   −
for advanced user:
+
[[fichier:ENG-CANSAT-PICO-PINOUT-35.png]]
 
  −
[[fichier:ENG-CANSAT-PICO-PINOUT-50.png]]
     −
* '''SWCLK et SWDIO''' - those contact points, visible under the board, are used to program the microcontroler. You can also use thoses contact to connect the SWD debugger.
+
* '''SWCLK et SWDIO''' - Software Clock and Software IO. Used to connect the SWD debugger.
    
== Pico Ressource ==
 
== Pico Ressource ==
   −
The [https://github.com/mchobby/pyboard-driver/tree/master/Pico Github of MCHobby contains useful PICO ressources] for designing schematic and board with the Pico.
+
The [https://github.com/mchobby/pyboard-driver/tree/master/Pico Github of MCHobby contains useful PICO ressources] for designing schematic and connexion between boards with the Pico.
    
The [https://github.com/mchobby/pyboard-driver/tree/master/Pico#pico-overlay Pico overlay] help to identifies Pins on the Pico.
 
The [https://github.com/mchobby/pyboard-driver/tree/master/Pico#pico-overlay Pico overlay] help to identifies Pins on the Pico.
29 917

modifications

Menu de navigation