Silicon Laboratories Stepper Machine User Manual Page 29

  • Download
  • Add to my manuals
  • Print
  • Page
    / 40
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 28
AN428
Rev. 0.6 29
TF2H = 0;
TF2L = 0;
ET2 = 1; // Timer2 interrupt enable
TR2 = 1; // Start Timer2
}
//-----------------------------------------------------------------------------
// Port_Init
//-----------------------------------------------------------------------------
//
// Return Value : None
// Parameters : None
//
// Configure the Crossbar and GPIO ports.
//
// P0.0 digital open-drain SMBus SDA
// P0.1 digital open-drain SMBus SCL
//
// all other port pins unused
//
// Note: If the SMBus is moved, the SCL and SDA sbit declarations must also
// be adjusted.
//
void Port_Init (void)
{
P0MDOUT = 0x00; // All P0 pins open-drain output
XBR1 = 0x04; // Enable SMBus
XBR2 = 0x40; // Enable crossbar and weak pull-ups
P0 = 0xFF; // set all the outputs to logic 1 explicitly
}
//-----------------------------------------------------------------------------
// SMBus Interrupt Service Routine (ISR)
Page view 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 39 40

Comments to this Manuals

No comments