Modifications

Sauter à la navigation Sauter à la recherche
1 420 octets ajoutés ,  12 novembre 2014 à 07:30
Ligne 8 : Ligne 8 :  
Vous pouvez également obtenir [http://docs.spark.io/assets/images/spark-pinout.png ce diagramme directement depuis le site de Spark Core] (''png'').
 
Vous pouvez également obtenir [http://docs.spark.io/assets/images/spark-pinout.png ce diagramme directement depuis le site de Spark Core] (''png'').
 
   
 
   
== 3.3V ou 5V... Attention!!! ==
+
== Introduction ==
{{bloc-etroit|text=The Spark Core offers a total 18 I/O pins to the user: D0 to D7, A0 to A7 and two pins that are preset to serial - TX and RX. All of these I/O pins run at 3.3V and the user should keep this in mind before attaching any external peripherals to them. The only exception to this are the following pins that are tolerant to 5V inputs:
+
The Spark Core offers a total 18 I/O pins to the user: D0 to D7, A0 to A7 and two pins that are preset to serial - TX and RX.  
 +
 
 +
{{ambox-stop|text=All of these I/O pins run at 3.3V and the user should keep this in mind before attaching any external peripherals to them. The only exception to this are the following pins that are tolerant to 5V inputs: D0, D1, D3, D4, D5, D6 and D7 }}
 +
 
 +
== Broches digitals ==
 +
Each pin on the Core can either be configured as input (with or without pull-up or pull-down) or as output (push-pull or open-drain) using the '''pinMode()''' function.
 +
 
 +
After setting them up, the user can then write to or read from the pins using '''digitalWrite()''' and '''digitalRead()''' functions respectively.
 +
 
 +
Each of these pins can individually source/sink a maximum of 20mA. In the input mode, the user can activate internal pull-up or pull-down resistors (typically equal to 40K ohms). By default these are deactivated.
 +
 
 +
== Entrées analogiques ==
 +
Pins A0 to A7 can be set up as analog inputs and can measure voltages of upto 3.3V and are internally referenced to VDD. The user can read the pins using '''analogRead()''' function which returns a 12bit value.
 +
 
 +
== Sorties PWM ==
 +
Aussi appelées sorties analogiques.
 +
 
 +
This term is misleading and misused but is widely adopted in the Arduino community. The pins that are set to output an analog value don't actually output an analog voltage but rather produce a PWM signal whose duty cycle can be varied thus varying the total average power of the signal. On the Core, the PWM signals have a resolution of 8 bits and run at a frequency of 500Hz.
 +
 
 +
Having said that, the user can send analog values to the pins using the function '''analogWrite()'''.
 +
 
 +
This feature is only available on the following pins: '''A0, A1, A4, A5, A6, A7, D0''' et '''D1'''.
   −
D0, D1, D3, D4, D5, D6 and D7}}
      
{{Spark-Core-Materiel-TRAILER}}
 
{{Spark-Core-Materiel-TRAILER}}
29 917

modifications

Menu de navigation