Silicon Laboratories Stepper Machine User Manual Page 31

  • Download
  • Add to my manuals
  • Print
  • Page
    / 40
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 30
AN428
Rev. 0.6 31
STA = 1;
SEND_START = 0;
break;
}
if(SMB_SENDWORDADDR) // Are we sending the word address?
{
SMB_SENDWORDADDR = 0; // Clear flag
SMB0DAT = WORD_ADDR; // Send word address
if (SMB_RANDOMREAD)
{
SEND_START = 1; // Send a START after the next ACK cycle
SMB_RW = READ;
}
break;
}
if (SMB_RW==WRITE) // Is this transfer a WRITE?
{
if (i < SMB_DATA_LEN) // Is there data to send?
{
// send data byte
SMB0DAT = *pSMB_DATA_OUT;
// increment data out pointer
pSMB_DATA_OUT++;
// increment number of bytes sent
i++;
}
else
{
STO = 1; // Set STO to terminte transfer
SMB_BUSY = 0; // Clear software busy flag
Page view 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 39 40

Comments to this Manuals

No comments