Digilent MX4cK Manuel d'utilisateur Page 19

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 35
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 18
Cerebot MX4cK Reference Manual
www.digilentinc.com page 19 of 35
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
A12 – JB-07, digital pin 12, RB15
A13 – JB-10, digital pin 15, RB14
A/D Converter Reference
The PIC32 microcontroller provides two
reference inputs to the analog to digital
converter. Vref- is used set the lower reference
level and Vref+ is used to set the upper
reference level. These references can be
connected to internal references or external
references using two of the analog input pins.
When the internal references are being used,
Vref- is connected to VSS and Vref+ is
connected to VDD. This means that the
voltage input range at the analog input pins is
0V–3.3V. In this case, an input voltage of 0V
will convert to ~0, an input voltage of 1.65V will
convert to ~511, and an input voltage of 3.3V
will convert to ~1023.
Either one, or both, of the references can be
connected to external reference pins. When
this is done, the references can be set to
voltages other than 0V and 3.3V.
If, for example, both references were selected
to use external references, with 1V applied to
Vref- and 2V applied to Vref+, the input voltage
range at the analog input pins would be from
1V to 2V. An applied voltage of 1V would have
a converted value of ~0, 1.5V would have a
converted value of ~511, and 2V would have a
converted value of ~1023.
When both external references are being used,
Vref+ must have a higher voltage applied to in
than Vref-.
The analog reference input pins appear on
Pmod connector JK, pins 7 & 8. Vref- is on pin
JK-07, and Vref+ is on pin JK-08. These pins
are not available to be used for digital I/O when
being used as an external reference.
When using the chipKIT MPIDE software, the
use of external analog references is selected
using the analogReference() function. The
following values can be used with
analogReference():
DEFAULT – Vref- = 0V, Vref+ = 3.3V
INTERNAL – same as default
EXTERNAL – Vref- = 0V, Vref+ = voltage
at A2
EXTMINUS – Vref- = voltage at A3, Vref+ =
3.3V
EXTPLUSMINUS – Vref- = voltage at A3,
Vref+ = voltage at A2
Timers
The PIC32 microcontroller provides five timers
that can be used for various timing functions.
These timers are each 16 bits wide, although
two pairs, TIMER2/TIMER3 and
TIMER4/TIMER5 can be combined to produce
32 bit wide timers.
A timer consists of a control register, a counter
register, and a period register. The control
register is used to configure the timer for
various modes of operation. The count register
counts cycles of the clock source selected via
the control register. This clock source can be
the peripheral bus clock or a division of the
peripheral bus clock via a pre-scaler divider.
The period register can be used to generate an
interrupt and/or reset the count register when a
pre-determined value is reached.
Each timer has an associated input pin. In
some operating modes, this pin can be used
as an external clock input to the timer, or as a
gate input to turn on/off incrementing of the
counter register under control of an external
signal.
The following gives the Pmod connector
position, chipKIT pin number, and
microcontroller I/O port and bit number for the
timer input pins.
TCK1 – not available
TCK2 – JD-04, digital pin 27, RC01
Vue de la page 18
1 2 ... 14 15 16 17 18 19 20 21 22 23 24 ... 34 35

Commentaires sur ces manuels

Pas de commentaire