Silicon Laboratories Stepper Machine User Manual Page 20

  • Download
  • Add to my manuals
  • Print
  • Page
    / 40
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 19
AN428
20 Rev. 0.6
// - Added test for when the mask = 0x00 to skip that register access
// - Updated Si5338 register mask list in register_map.h
//
// Release 1.3 (September 2010)
// - Updated the register_map.h and main() to reflect the Si5338
// datasheet updates
//
//-----------------------------------------------------------------------------
// Includes
//-----------------------------------------------------------------------------
#include <compiler_defs.h>
#include <c8051F300_defs.h> // SFR declarations
#include <register_map.h>
//-----------------------------------------------------------------------------
// Global CONSTANTS
//-----------------------------------------------------------------------------
// Device address (7 bits) for slave target
// 0x70 is default for the Si5338
#define SLAVE_ADDR 0x70
#define SYSCLK 24500000 // System clock frequency in Hz
#define SMB_FREQUENCY 400000 // Target SCL clock rate
// Can be 100kHz or 400kHz
#define WRITE 0x00 // SMBus WRITE command
#define READ 0x01 // SMBus READ command
// Status vector - top 4 bits only
#define SMB_MTSTA 0xE0 // (MT) start transmitted
#define SMB_MTDB 0xC0 // (MT) data byte transmitted
#define SMB_MRDB 0x80 // (MR) data byte received
Page view 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 39 40

Comments to this Manuals

No comments