Silicon Laboratories Stepper Machine Instrukcja Użytkownika Strona 26

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 40
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 25
AN428
26 Rev. 0.6
}
//copy FCAL values
I2C_ByteWrite(45, I2C_ByteRead(235));
I2C_ByteWrite(46, I2C_ByteRead(236));
// clear bits 0 and 1 from 47 and
// combine with bits 0 and 1 from 237
reg = (I2C_ByteRead(47) & 0xFC) | (I2C_ByteRead(237) & 3);
I2C_ByteWrite(47, reg);
I2C_ByteWrite(49, I2C_ByteRead(49) | 0x80); // FCAL_OVRD_EN = 1
I2C_ByteWrite(230, 0x00); // OEB_ALL = 0
//------------------------------------------------------------
// wait forever
while(1); //comment this out if the power-down option is used below
/*
// power down the MCU
while(SMB_BUSY); // wait until the I2C transactions are complete
EA = 0; // turn off interrupts
SMB0CF &= ~0x80; // turn off SMBus
RSTSRC = 0x00; // turn off the MCD reset source
PCON = 0x02; // stop the MCU - only a reset will wake it up
*/
}
//-----------------------------------------------------------------------------
// Initialization Routines
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// SMBus_Init
//-----------------------------------------------------------------------------
Przeglądanie stron 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 39 40

Komentarze do niniejszej Instrukcji

Brak uwag