![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
www.tiertex.com revision 1.0 1 TDS1I2C1 features ? mini i2c board ? microchip mcp79410 real time clock with additional 64 bytes of sram and 1kbit eeprom. ? battery backup of mcp79410 rtcc and sram with included cr12 20 lithium cell. ? 24aa512 eeprom memory with 64kbytes of non - volatile storage. ? tcn75 temperature sensor. ? wide operating voltage 2.7v - 5.5v. temperature sensor optimised for 3.3v. ? small 24 pin ic compatible package 0.1"x0.9" pitch. ? selectable on - board i2c 2 k2 pull - ups. ? rtcc and temperature sensor interrupt outputs with resistor pull - ups. ? overall size 28mm(w) x 3 4 mm(l). ? mpasm and mc18 usb cdc serial demo code provided showing full use of the i2c peripherals. ? pin compatible with tdsdb146j50. description the tiertex i2c add - on board is a combination of 3 useful i2c devices in a compact package. the board incorporates battery backed real time clock, large eeprom non - volatile memory and temperature sensor. free datasheet http://
TDS1I2C1 www.tiertex.com 2 | p a g e v e r s i o n 1 . 0 1 contents 1.0 pin diagram ................................ ................................ ................................ ................................ . 3 1.1 electrical characteristics ................................ ................................ ................................ .............. 3 1.2 i2c address table ................................ ................................ ................................ ......................... 3 2.0 on - board features ................................ ................................ ................................ ....................... 4 2.1 mcp79410 real time clock ................................ ................................ ................................ ...... 4 2.2 tcn75 moa temperature sensor ................................ ................................ ............................ 5 2.3 24aa512 512 k bit eeprom ................................ ................................ ................................ ....... 5 2.4 i 2 c pull - up resistors ................................ ................................ ................................ .................. 5 3.0 data s heet references ................................ ................................ ................................ ................. 6 4.0 schematic ................................ ................................ ................................ ................................ .... 7 5.0 example pic18f c software ................................ ................................ ................................ .......... 7 free datasheet http:// TDS1I2C1 www.tiertex.com 3 | p a g e v e r s i o n 1 . 0 1 1.0 pin diagram figure 1 dimensions 28mm (w) x 34mm (h). 1. 1 electrical characteristics operating conditions at 25c parameter min typ . max units supply v oltage 2.7 3.3 5.5 v current requirement 6.0 ma figure 2 electrical characteristics 1.2 i2c address table device description read address write address mcp79410 rtcc real time clock 0xdf 0xde tcn75 temperature sensor 0x91 0x90 24aa512 512 k bit eeprom 0xa1 0xa0 figure 3 additional tcn75s and 24aa512s can be added to the i 2 c bus as long as their chip address a0 - a2 are not set to 0. free datasheet http:// TDS1I2C1 www.tiertex.com 4 | p a g e v e r s i o n 1 . 0 1 2.0 on - board features 2.1 mcp79410 real time clock microchip?s mcp79410 rtcc implementation includes the following features ? full on chip rtcc with on board battery backup. ? dual alarm with interrupt out. ? shut down and start up time stamps. ? 64 bytes of battery backed sram ? 1024 kbits of non - volatile eeprom ? programmable square wave output free datasheet http:// TDS1I2C1 www.tiertex.com 5 | p a g e v e r s i o n 1 . 0 1 ? digital calibration adjustment the battery backup utilises a cr1220 lithium coin cell (included). pin 8, cint is connected to the mcp79410 multifunction output pin and has a 2k2 ? pull - up resistor. 2.2 tcn75 moa temperature sensor microchip?s tcn75 temperature sensor has the following features ? - 55 c to 125 c range to 0.5 c resolution. ? maximum 8 addressable devices on same bus. ? programmable output pin, temperature alarm interrupt, comparator/thermostat output. ? programmable trip points with hysteresis. ? low power. 250 a typical. pin 9, tint is connected to the tcn75 multifunction output pin and has a 2k2 ? pull - up resistor. 2.3 24aa512 512 k bit eeprom ? the on - board 24aa512 512 k bit eeprom has 64kbytes of non - volatile memory. ? low power, 400 a typical. ? 128 byte write buffer. ? fully automatic erase and write cycle. ? maximum 8 addressable devices on same bus. ? 1 million write/erase cycles, >200 year data retention life. 2.4 i 2 c pull - up resistors free datasheet http:// TDS1I2C1 www.tiertex.com 6 | p a g e v e r s i o n 1 . 0 1 the board has 2k2 ? pull - up resistors on both the scl and sda open collector i 2 2 lines, these values are required for 400 khz i 2 c communication at 3.3v. if you do not require pull - up resistors then there are some de - solderable links on the board to disconnect this feature. 3.0 data sheet references full data sheet s at www.microchip.com mc p79410 real time clock http://ww1.microchip.com/downloads/en/devicedoc/22266a.pdf tcn75 moa temperature sensor http://ww1.microchip.com/downloads/en/devicedoc/21935d.pdf 24aa512 512 k bit eeprom http://ww1.microchip.com/downloads/en/devicedoc/21754m.pdf free datasheet http:// TDS1I2C1 www.tiertex.com 7 | p a g e v e r s i o n 1 . 0 1 4 .0 schematic figure 4 5.0 example pic18f c software // example code for a i2c implementation on microchip pic18f46j50 // you are free to use as you wish, but it is supplied 'as is' // tiertex design studios shall not be liable in any circumstance s for any damges arising // when using this code. // the code below uses simple software polling techniques for i2c communication. for more efficient // c ode use interrupt polling instea d. // this code is not intended to compile as is but is a collection of routines taken from the usb // cdcserial demo for the i2c add - card based on the tiertex pic18f46j50 demo board . // the full project can be d ownloaded from wwww.tiertex.com #define sclk1 portbb its.scl1 #define sdat1 portbbits.sda1 char rtccdata[32]; // 32 byte copy of the rtcc registers char rtccsram[64]; // 64 byte copy of rtcc sram char t7; // set up pic's i2c module // void initi2c() { sclk1 = 0; sdat1 = 0; free datasheet http:// TDS1I2C1 www.tiertex.com 8 | p a g e v e r s i o n 1 . 0 1 sspstat = 0; // disable smbus sspstatbits.smp = 1; // disable slew rate sspadd = 0x18*4; // 100kz i2c comms. sspcon1bits.sspm3 = 1; // i2c master mode in hardware sspcon1bits.sspen = 1; // enable ssp module sspcon2 = 0; // clrear mssp pir1bits.sspif = 0; // clear ss p interrupt flag pir2bits.bclif = 0; // clear bit collision flag } // send a start command // void start() { pir1bits.sspif = 0; // clear ssp interrupt flag sspcon2bits.sen = 1; // generate start condition while ( pir1bits.sspif == 0 ) {} } // a restart for multiple i2c commands // void restart() { pir1bits.sspif = 0 ; // clear ssp interrupt flag sspcon2bits.rsen = 1; // generate restart condition while ( pir1bits.sspif == 0 ) {} } // stop i2c command // void stop() { pir1bits.sspif = 0 ; // clear ssp interrupt flag sspcon2bits.pen = 1 ; // generate stop condition while ( pir1bits.sspif == 0 ) {} } // send a byte on the i2c bus // void txbyte(byte a) { pir1bits.sspif = 0 ; // clear ssp interrupt flag sspbuf = a; // write byte out to device while ( pir1bits.sspif == 0 ) {} } // read byte from the i2c bus // byte rxbyte() { sspcon2bits.ackdt = 0; // no ack as this is one of many reads pir1bits.sspif = 0; // clear ssp interrupt flag sspcon2bits.rcen = 1; // initiate reception of byte while ( pir1bits.sspif == 0 ) {} // wait till reception pir1bits.sspif = 0; / / clear ssp interrupt flag sspcon2bits.acken = 1; // generate ack/no ack bit while ( pir1bits.sspif == 0 ) {} // wait till complete return sspbuf; } // read the last byte of a read sequence from the i2c bus, the ack lets the i2c slave that this is t he last requested byte // byte rxbyteack() { sspcon2bits.ackdt = 1; // ack as this is the last read pir1bits.sspif = 0; // clear ssp interrupt flag sspcon2bits.rcen = 1; // initiate reception of byte free datasheet http:// TDS1I2C1 www.tiertex.com 9 | p a g e v e r s i o n 1 . 0 1 while ( pir1bits.sspif == 0 ) {} // wait till reception pir1bits.sspif = 0; // clear ssp interrupt flag ss pcon2bits.acken = 1; // generate ack/no ack bit while ( pir1bits.sspif == 0 ) {} // wait till complete return sspbuf; } void readi2crtcc() { start(); // start i2c exchange txbyte(0xde); // send write address to rtcc txbyte(0x00); // set ptr to 0 restart(); txbyte(0xdf); // send read address to rtcc // i'm reading only 9 bytes (upto and including trim, there is 31 register in total if required) for ( t7=0;t7<8;t7++) rtccdata[t7] = rxbyte(); rtccdata[8] = rxbyteack(); // last byte, no 9 use ack restart(); txbyte(0xde); // send write address to rtcc txbyte(0x20); // set ptr to 20, start of sram restart(); txbyte(0xdf); // send read address to rtcc // i'm reading all 64 bytes of sram for ( t7=0;t7<63; t7++) rtccsram[t7] = rxbyte(); rtccsram[63] = rxbyteack(); stop(); // generate stop bit } void writei2crtcc() { start(); // start i2c exchange txbyte(0xde); // send write address to rtcc txbyte(0x00); // set ptr to 0 for ( t7 =0;t7<9;t7++) txbyte(rtccdata[t7]); // write out registers 0 - 8 stop(); // generate stop bit } // a wake up routine for the rtcc to ensure all the correct register are on . // // void rtccswitchon() { start(); // setup oscilator on txbyte(0xde); // send write address to rtcc txbyte(0x00); // set ptr to register 0 restart(); txbyte(0xdf); // send read address to rtcc rtccdata[0] = rxbyteack(); // read seconds + oscillator flag restart(); txbyte(0xde); // send write address to rtcc txbyte(0x00); // set ptr to register 0 txbyte(rtccdata[0]|0x80); // send back seconds with osc flag set restart(); // now ensure the battery backup is enabled txbyte(0xde); // send write address to rtcc txbyte(0x03 ); // set ptr to register 3 restart(); txbyte(0xdf); // send read address to rtcc rtccdata[3] = rxbyteack(); // read seconds + oscillator flag restart(); txbyte(0xde); // send write address to rtcc txbyte(0x03); // set ptr to regi ster 3 txbyte(rtccdata[3]|0x08); // send back seconds with osc flag set restart(); free datasheet http:// TDS1I2C1 www.tiertex.com 10 | p a g e v e r s i o n 1 . 0 1 // now setup general flags txbyte(0xde); / / send write address to rtcc txbyte(0x07); // set ptr to 7, flags register txbyte(0x40); // sqw output at 1hz. stop(); // generate stop bit } // read the tn c 75 temperature sensor // void readtemperature() { start(); // assert start condition txbyte(0x90); // send 0x90 write address txbyte(0x00); // set read ptr to 0 restart (); // generate another start bit txbyte(0x91); // 0x91 read address temperature=0; temperature = (word)rxbyte()<<8; // read high byte temperature |= (word)rxbyteack(); // read low byte stop(); // generat e stop bit temperature >>= 7; // shift down 7 bits for temp is now 6:1 } // eeprom read. the eeprom write is more complicated as you will need to let the // device finish its erase/write cycle. this is done by checking for an acknowledge // from the eeprom, see section 7.0 from the microchip data sheet. // byte readi2ceebyte(word a) { start(); txbyte(0xa0); // 24lc512 write address txbyte((byte)(w1>>8)); // set address high txbyte((byte)(w1&0xff)); // set address low restart(); txbyte(0xa1); // 24lc512 read address t1 = rxbyteack(); stop(); return t1; } free datasheet http:// |
Price & Availability of TDS1I2C1
![]() |
|
|
All Rights Reserved © IC-ON-LINE 2003 - 2022 |
[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy] |
Mirror Sites : [www.datasheet.hk]
[www.maxim4u.com] [www.ic-on-line.cn]
[www.ic-on-line.com] [www.ic-on-line.net]
[www.alldatasheet.com.cn]
[www.gdcy.com]
[www.gdcy.net] |