Electronic Components Datasheet Search
  English  ▼

X  

SAFC161PI Datasheet(PDF) 309 Page - Infineon Technologies AG

Part # SAFC161PI
Description  16-Bit Single-Chip Microcontroller
PDF  400 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  INFINEON [Infineon Technologies AG]
Direct Link  http://www.infineon.com
Logo INFINEON - Infineon Technologies AG

SAFC161PI Datasheet(HTML) 309 Page - Infineon Technologies AG

Back Button SAFC161PI Datasheet HTML 305Page - Infineon Technologies AG SAFC161PI Datasheet HTML 306Page - Infineon Technologies AG SAFC161PI Datasheet HTML 307Page - Infineon Technologies AG SAFC161PI Datasheet HTML 308Page - Infineon Technologies AG SAFC161PI Datasheet HTML 309Page - Infineon Technologies AG SAFC161PI Datasheet HTML 310Page - Infineon Technologies AG SAFC161PI Datasheet HTML 311Page - Infineon Technologies AG SAFC161PI Datasheet HTML 312Page - Infineon Technologies AG SAFC161PI Datasheet HTML 313Page - Infineon Technologies AG Next Button
Zoom Inzoom in Zoom Outzoom out
 309 / 400 page
background image
&3,
7KH ,& %XV 0RGXOH
User’s Manual
17-15
1999-08
/*---------------------------------------------------------------*\
| Programming example to read 2 bytes from an NVRAM
|
| via the I2C bus.
|
\*---------------------------------------------------------------*/
void main() {
// X-peripheral enable:
SYSCON |= 0x0004;
// set XPEN, before EINIT-instr.!!!
// I2C control register configuration:
ICCON = 0x0008;
// master mode
ICST
= 0x0000;
// reset status register
ICCFG = 0x2711;
// 100kHz @ 16MHz, SDA0, SCL0
XP0IC = 0x0000;
// disable interrupt IRQD, use polling
XP1IC = 0x0000;
// disable interrupt IRQP, use polling
// Port configuration (provide external pullups on I2C-lines!):
// (The actual physical port depends on the respective device!
//
The I2C interface e.g. uses P3 on the C161RI, P9 on the C161SI/CI)
_bfld_ ( P*, 0x0003, 0x0003);
// enable alternate function on P*.0-1
_bfld_ (DP*, 0x0003, 0x0003);
// switch i2c pins to output
// slave address
ICRTB = 0x0000 | 0xA0;
// write transmit buffer
ICCON |= BUM;
// BUM=1: start cond. + send slave addr.
while((ICST & IRQD) == 0x0000);
// waiting for end of transmission
if (ICST & LRB)
// ACK?
{
ICST &= ~AL;
// Clear bit AL
ICST &= ~IRQP;
// Clear bit IRQP
}
// sub address
ICRTB = 0x0000|0x0000;
// send sub-address
while((ICST & IRQD)== 0x0000);
// waiting for end of transmission
if (ICST & LRB)
// ACK?
{
ICST &= ~AL;
// Clear bit AL
ICST &= ~IRQP;
// Clear bit IRQP
}



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100  ...More


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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