| Electronic Components Datasheet Search |
|
33991 Datasheet(PDF) 33 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
33991 Datasheet(HTML) 33 Page - Freescale Semiconductor, Inc |
|
33 / 36 page ![]() Analog Integrated Circuit Device Data Freescale Semiconductor 33 33991 TIMING DESCRIPTIONS AND DIAGRAMS SAMPLE CODE /* Step 15 */ Command_Gauge(0x10,0x00); /* Null Read to get status */ /* Check SO bit ST4 to see if Gauge 0 has moved */ If((status & 0x10) != 0) /* If it has moved, then keep track of position */ /* Wait until 24 steps are finished then send a RTZ command (Step 17) */ /* Step 16 */ Command_Gauge(0x80,0x02); /* Send RTZ to Gauge 0 */ /* Step 17 */ Command_Gauge(0x10,0x00); /* Null Read to get status */ /* Read Status until RTZ is done */ While ((status & 0x04) != 0) {Command_Gauge(0x10,0x00);} /* Step 18 */ Command_Gauge(0x80,0x03); /* Send RTZ to Gauge 1 */ /* Step 19 */ Command_Gauge(0x10,0x00); /* Null Read to get status */ /* Read Status until RTZ is done */ While ((status & 0x08) != 0) {Command_Gauge(0x01,0x00);} /* Step 20 */ Command_Gauge(0x00,0x00); /* Disable Gauges and go into Standby */ /* Put device to sleep by setting RSTB to logic 0 */ }void Command_Gauge(char MSB, char LSB) /*This subroutine sends the GDIC commands on the SPI port */ { PORTS = 0x00; /* Chip select low (active) */ SP0DR = MSB; /* send first byte of gauge command */ While ((SP0SR & 0x80) == 0); /* wait for Rxflag (first byte) */ RTZdata = SP0DR; /* Read status MSB */ SP0DR = LSB; /* send second byte of command */ While ((SP0SR & 0x80) == 0); /* wait for Rxflag (second byte) */ status = SP0DR; /* read status LSB */ PORTS = 0x04; /* Chip select high (deactivated) */ } /* Motorola Semiconductor Products Sector */ /* October 4, 2002 */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |