Maxim-integrated MAX31782 Manual de usuario Pagina 94

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 223
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 93
Maxim Integrated 10-6
MAX31782 User’s Guide
Revision 0; 8/11
10.4 Tachometer Code Example
The following pseudocode shows how to set up tachometer 0. This example does not generate any interrupts, but
instead the captured tachometer value can be periodically polled by software.
Tachometer setup:
TACHCN0_bit.TPS=3; //tachometerclockissysclk/64or62.5kHz
TACHCN0_bit.TRPS=1; //setfor2pulsesperrevolution
TACHCN0_bit.TEXEN=1; //enableedgecaptureofTACH.0pin
TACHCN0_bit.TACHE=1; //startthetachometercount
Reading the tachometer:
tach_counts=TACHR0; //storethecapturedtachometercountsforthelast
revolutioninavariable
Vista de pagina 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 222 223

Comentarios a estos manuales

Sin comentarios