| Electronic Components Datasheet Search |
|
MPXM2102AS Datasheet(PDF) 479 Page - Motorola, Inc |
|
|
|||||||||||||||||||||||||||||
MPXM2102AS Datasheet(HTML) 479 Page - Motorola, Inc |
|
479 / 670 page ![]() AN1536 3–333 Motorola Sensor Device Data www.motorola.com/semiconductors { digit[i] = 0; /* put blanks in all digit positions */ } for ( i=0; i < 4; ++i ) { if ( arg >= dectable [i] ) { digit[i] = arg /dectable[i]; arg = arg–(digit[i] * dectable[i]); } } digit[i] = arg; } /* ################################################################### */ delay() { int i; for (i=0; i<1000; ++i); /* delay about 15 ms. @ 8 mhz xtal */ } /* ################################################################### */ /* set–up i/o for the single slope a/d, initialize the spi port, then initialize the MC145453 for output */ init_io(void) { char i; /* set–up i/o for the a/d */ PACTL |= 0X80; /* make pa7 an output */ PORTA |= 0X80; /* turn the fet on */ PORTB &= 0X7F; /* set–up the HC4053 in the Y0/Z0 connect mode */ TCTL2 = 0X2A; /* capture on falling edge for timer capture 0,1,2 */ TFLG1 = 0X07; /* clear any pending capture flags */ /* set–up the i/o for the spi subsystem */ PORTD=0x2f; /* set output low before setting the direction register */ DDRD=0x38; /* ss = 1, sck = 1, mosi = 1 */ SPCR=0x51; /* enable spi, make the cpu the master, E clock /4 */ /* initialize the lcd driver */ for (i=0; i<4; ++i) /* four bytes of zeros */ { write_spi(0); } write_spi (2); /* this creates a start bit and data bit 1 for the next write to the mc145453 */ } /* ################################################################### */ /* this is an attempt at the newton square root method */ sqrt(unsigned long b) { unsigned long x0,x1; if ( b < 4 ) { b=2; return (b); } else x0=4; x1=10; while (x0 != x1) { if( (x1–x0) ==1 ) break; x1=x0; x0=(( (b/x0) +x0 ) >> 1 ); } b=x0; return (b); } /* ################################################################### */ Freescale Semiconductor, Inc. For More Information On This Product, Go to: www.freescale.com |
|
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 |