Modifications

Sauter à la navigation Sauter à la recherche
6 038 octets ajoutés ,  8 novembre 2014 à 20:27
Page créée avec « {{Trinket-Pro-NAV}} {{bloc-etroit|text= {{ambox-stop|text=There are two versions of the Pro Trinket: 3V and 5V. They are almost identical but there are slight differences in ... »
{{Trinket-Pro-NAV}}
{{bloc-etroit|text=
{{ambox-stop|text=There are two versions of the Pro Trinket: 3V and 5V. They are almost identical but there are slight differences in the pinouts: one has a 3V output pin in the top right, the other has a 5V output pin instead }}
}}

== Broches d'alimentation ==

{{ADFImage|Trinket-Pro-PinOut-00.jpg|640px}}

We'll start with the top pins BAT+, USB+, 3V/5V, and GND

* '''BAT+''' is the Battery + Input pin. If you want to power the Pro Trinket from a battery or power adapter or solar panel or any other kind of power source, connect the + (positive) pin here! You can connect up to 16V DC. If you have a 3V Pro Trinket, you'll want at least 3.5V input to get a good 3.3V output. If you have a 5V Pro Trinket, 5.5V or higher is suggested. This input is reverse-polarity protected.
* '''BUS''' is the USB Bus + Output pin. If you want to use the USB 5V power for something, like charging a battery, or if you need more than 150mA of current (this pin can supply 500mA+ from USB ports) or to detect when the Pro Trinket is plugged into USB, this pin will have 5V power on it if and only if its plugged into something via the mini B connector
* '''GND''' is the common ground pin, used for logic and power. It is connected to the USB ground and the power regulator, etc. This is the pin you'll want to use for any and all ground connections

== Broches GPIO ==
Next we will cover the 18 GPIO (General Purpose Input Ouput) pins! 18 GPIO is a big step up from the little Trinket with only 5 or so pins. This is almost as many as a 'full grown' Arduino. In fact, since the Pro Trinket uses the same core chip as an Arduino, nearly any existing project that uses special pins like hardware PWM or SPI will work 'out of the box'.

All the GPIO pins can be used as digital inputs, digital outputs, for LEDs, buttons and switches etc. They can provide up to 20mA of current. Don't connect a motor or other high-power component directly to the pins! [[Moteur_Hobbyiste|Instead, use a transistor to power the DC motor on/off]].

=== Niveau logique ===
On a 3V Pro Trinket, the GPIO are 3.3V output level, and should not be used with 5V inputs. On a 5V Pro Trinket, the GPIO are 5V output level, and can be used with 3V inputs but may damage electronic devices that are 3V input only!

=== Les broches GPIO digitales ===
{{ADFImage|Trinket-Pro-PinOut-01.jpg|640px}}

* '''RX''' - also known as Digital #0, this is the hardware serial input pin
* '''TX''' - also known as Digital #1, this is the hardware serial output pin
* '''Digital 3''' - this pin can also be used as a PWM output pin using '''analogWrite()'''
* '''Digital 4''' - Nothing particularly special about this GPIO pin
* '''Digital 5''' - this pin can also be used as a PWM output pin using '''analogWrite()'''
* '''Digital 6''' - this pin can also be used as a PWM output pin using '''analogWrite()'''
* '''Digital 8''' - Nothing particularly special about this GPIO pin
* '''Digital 9''' - this pin can also be used as a PWM output pin using '''analogWrite()''' It's also good for driving servos because its a high-speed PWM output
* '''Digital 10''' - this pin can also be used as a PWM output pin using '''analogWrite()''' It's also good for driving servos because its a high-speed PWM output
* '''Digital 11''' - Also known as the SPI '''MOSI''' pin. this pin can also be used as a PWM output pin using '''analogWrite()'''
* '''Digital 12''' - Also known as the SPI '''MISO''' pin
* '''Digital 13''' - Also known as the SPI '''CLOCK''' pin

=== Les broches GPIO analogiques/digitales ===
{{ADFImage|Trinket-Pro-PinOut-02.jpg|640px}}

* '''Analogique 0''' - also known as '''Digital 14''', this pin can be a digital I/O pin or an analog input pin
* '''Analogique 1''' - also known as '''Digital 15''', this pin can be a digital I/O pin or an analog input pin
* '''Analogique 2''' - also known as '''Digital 16''', this pin can be a digital I/O pin or an analog input pin
* '''Analogique 3''' - also known as '''Digital 17''', this pin can be a digital I/O pin or an analog input pin
* '''Analogique 4''' - also known as '''Digital 18''', this pin can be a digital I/O pin or an analog input pin. It's also the I2C '''SDA''' pin
* '''Analogique 5''' - also known as '''Digital 19''', this pin can be a digital I/O pin or an analog input pin. It's also the I2C '''SCL''' pin

=== Les broches analogiques uniquement ===
{{ADFImage|Trinket-Pro-PinOut-03.jpg|640px}}

The two pins that sit sort-of inside the body of the Pro Trinket, A6 and A7, are analog input only pins. They're kind of an 'extra' that you get with the Pro Trinket. These pins cannot be used for LEDs, buttons, servos, etc. They're only for analogRead() usage!

If you're used to using an Arduino Uno, you may notice that pins #2 and #7 are not available. That's because we use those two pins for the USB bootloader. They are not available for use and are not broken out.

== Les autres broches ==
{{ADFImage|Trinket-Pro-PinOut-04.jpg|640px}}

* Aref - this is the optional analog reference pin for the analog converter, to be used when you want the 'top' of the analog converter to be different than 3V or 5V. Connect this to your desired reference voltage (between 0 and the Pro Trinket voltage) and use analogReference(EXTERNAL)
* RST - This is the Reset pin for the Pro Trinket. Connecting this to ground momentarily resets the Trinket and also starts up the bootloader.

== Le connecteur FTDI ==
{{ADFImage|Trinket-Pro-PinOut-05.jpg|640px}}

At the bottom is 6 pins in a row that we call the FTDI header. You can use these pins to program the Pro Trinket with an FTDI cable or FTDI Friend. You can also use it for serial debugging.

* '''GND''' - same as the power ground pins
* '''5V''' - same as the VBUS pin
* '''RX''' - same as the RX pin
* '''TX''' - same as the TX pin
* '''RST''' - there's a 0.1uF capacitors in between this pin and the Reset pin, so that Arduino-compatible programmers will work correctly with the DTR/RTS-toggle technique

{{Trinket-Pro-TRAILER}}
29 918

modifications

Menu de navigation