Maxim-integrated MAX31782 Uživatelský manuál Strana 94

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 223
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 222 223

Komentáře k této Příručce

Žádné komentáře