| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
Using MSSP Module Interface Microwire Serial EEPROMs PIC16 Devices
Top Searches for this datasheetAN975 Using MSSP Module Interface Microwire Serial EEPROMs PIC16 Devices Author: Martin Kvasnicka Microchip Technology Inc. This application note provides assistance source code ease design process interfacing Microchip mid-range PIC16F877A microcontroller Microchip Microwire serial EEPROM. Master Synchronous Serial Port (MSSP) provides simple three-wire connection EEPROM external "glue" logic required. Figure depicts hardware schematic interface between Microchip's Microwire devices Microchip PIC16F877A Microcontroller. schematic shows necessary connections interface microcontroller serial EEPROM (software written assuming these connections). There many different microcontrollers market today that being used embedded control applications. Many these embedded control systems need nonvolatile memory. Because their small footprint, byte level flexibility, requirement, power consumption cost, serial EEPROMs popular choice nonvolatile storage. Microchip Technology addressed these needs offering full line serial EEPROMs covering industry standard serial communication protocol two-wire (I2CTM), three-wire (Microwire), SPIcommunication. Serial EEPROM devices available variety densities, operational voltage ranges, packaging options. FIGURE CIRCUIT PIC16F877A SERIES (MICROWIRE) DEVICE MCLR/VPP RA0/AN0 RA1/AN1 RA2/AN2VREFRA3/AN3/VREF+ RA4/T0CKI/C1OUT RA5/AN4/SSC2OUT RE0/RD/AN5 RE1/WR/AN6 RE2/CS/AN7 OSC1/CLK1 OSC2/CLK0 RC0/T10S0T1CKI RC1/T10SI/CCP2 RC2/CCP1 RC3/SCK/SCL RD0/PSP0 RD1/PSP1 RB7/PGD RB6/PGC RB3/PGM RB0/INT RD7/PSP7 RD6/PSP6 RD5/PSP5 RD4/PSP4 RC7/RX/DT RC6TX/CK RC5/SDO RC4/SDI/SDA RD3/PSP3 RD2PSP2 PDIP (600 MIL) 93XXXXX PIC16F877A should always have pull-down resistor protect against data corruption during power-up power-down Microcontroller. available only 93XX76X 93XX86X devices. Pull-up resistor suggested ~10K ohm. 2005 Microchip Technology Inc. DS00975A-page AN975 THEORY OPERATION port communicate with Microchip's Microwire Serial EEPROMs, bytes output 93XXXX must aligned such that address (LSB) byte output. From there bits should fill byte from right left consecutively. more that bits required, then bytes will required output. This same method will work 93XXXX series device. Since more than bits necessary control 93LC66C, consecutive bytes required. High Byte (Start bit, opcode bits address MSb) FIRMWARE DESCRIPTION purpose program show individual features Microwire protocol give code samples Start bit, opcodes addressing schemes that basic building blocks program shown. waveforms provided will shown from active disable entire instruction seen. ease interpretation serial data, data sheet waveform will provided below oscilloscope screen shot. High Byte configured following format: Start bit. opcode opcode LSb. address that required address bytes. line before byte output, because leading output 93XXXX prevents Start from being recognized 93XXXX until first high sent. Byte Address bits) Byte contains A7-A0, which remaining address bits required access bytes. Data output from master MUST falling edge clock that read from 93XXXX next rising edge. Receiving data from 93XXXX MUST also happen falling edge clock because data output from 93XXXX rising edge clock. This requires clock phase (bit SSPCON register) MSSP port opposite receiving than transmitting. clock phase needs cleared transmitting receiving data. DS00975A-page 2005 Microchip Technology Inc. AN975 WRITE ENABLE Figure shows example Erase/Write Enable (EWEN) command. Chip Select brought high (active), Start opcode sent through MSSP port. EWEN command must given before write attempted. device will enabled writes until Erase/Write Disable command given device powered down. FIGURE ERASE/WRITE ENABLE (EWEN) TCSL 2005 Microchip Technology Inc. DS00975A-page AN975 WRITE COMMAND (START BIT, OPCODE, ADDRESS DATA) Figure shows example Write command. device selected high byte sent which contains Start bit, opcode address. second byte sent which contains rest address bits A7-A0. Finally, data clocked this case 0x5A. When Chip Select toggled, internal write cycle initiated. Once internal write cycle begun Ready/ Busy signal polled check when write finishes. delay needs added Ready/Busy status being polled. This code uses Ready/Busy polling. FIGURE WRITE COMMAND, ADDRESS DATA TCSL Ready High-Z Busy High-Z DS00975A-page 2005 Microchip Technology Inc. AN975 READY/BUSY POLLING After valid Write command given, line 93XXXX monitored check internal write cycle been initiated continuously monitored look write cycle. oscilloscope plot below shows that device selected line approximately before device brings line high, indicating that write cycle complete. FIGURE READY/BUSY POLLING 2005 Microchip Technology Inc. DS00975A-page AN975 READ COMMAND (START BIT, OPCODE, ADDRESS DATA) Figure shows example Read command. device selected high byte sent which contains Start bit, opcode address. second byte sent which contains rest address bits A7-A0 (0x10). this point device gets ready send data out. controller needs send dummy byte order clock signals sent data read device into microcontroller. this case, data being read 0x5A. FIGURE READ COMMAND High-Z DS00975A-page 2005 Microchip Technology Inc. AN975 ERASE/WRITE DISABLE COMMAND Once device write finished, Write Disable (EWDS) command should given (see Figure This command consists Start four-bit opcode (0000). Except first high order address bits A7), address bits (set zeros this example) "don't cares." Address bits used define third fourth opcode bits. EWDS command should always sent device after completing write prior powering down device/system. FIGURE ERASE/WRITE DISABLE COMMAND TCSL 2005 Microchip Technology Inc. DS00975A-page AN975 CONCLUSION These some basic features Microwire communications using MSSP module Microchip's mid-range devices. code highly portable used many devices that have MSSP module with very minor modifications. Using code provided, designers begin build their Microwire libraries simple complex needed. code tested Microchip's PICDEM2 Plus Demonstration Board with connections shown Figure DS00975A-page 2005 Microchip Technology Inc. Note following details code protection feature Microchip devices: Microchip products meet specification contained their particular Microchip Data Sheet. Microchip believes that family products most secure families kind market today, when used intended manner under normal conditions. There dishonest possibly illegal methods used breach code protection feature. these methods, knowledge, require using Microchip products manner outside operating specifications contained Microchip's Data Sheets. Most likely, person doing engaged theft intellectual property. Microchip willing work with customer concerned about integrity their code. Neither Microchip other semiconductor manufacturer guarantee security their code. Code protection does mean that guaranteeing product "unbreakable." Code protection constantly evolving. Microchip committed continuously improving code protection features products. Attempts break Microchip's code protection feature violation Digital Millennium Copyright Act. such acts allow unauthorized access your software other copyrighted work, have right relief under that Act. Information contained this publication regarding device applications like provided only your convenience superseded updates. your responsibility ensure that your application meets with your specifications. MICROCHIP MAKES REPRESENTATIONS WARRANTIES KIND WHETHER EXPRESS IMPLIED, WRITTEN ORAL, STATUTORY OTHERWISE, RELATED INFORMATION, INCLUDING LIMITED CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY FITNESS PURPOSE. Microchip disclaims liability arising from this information use. Microchip's products critical components life support systems authorized except with express written approval Microchip. licenses conveyed, implicitly otherwise, under Microchip intellectual property rights. Trademarks Microchip name logo, Microchip logo, Accuron, dsPIC, KEELOQ, microID, MPLAB, PIC, PICmicro, PICSTART, MATE, PowerSmart, rfPIC, SmartShunt registered trademarks Microchip Technology Incorporated U.S.A. other countries. AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB, PICMASTER, SEEVAL, SmartSensor Embedded Control Solutions Company registered trademarks Microchip Technology Incorporated U.S.A. Analog-for-the-Digital Age, Application Maestro, dsPICDEM, dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, MPASM, MPLIB, MPLINK, MPSIM, PICkit, PICDEM, PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo, PowerMate, PowerTool, rfLAB, rfPICDEM, Select Mode, Smart Serial, SmartTel, Total Endurance WiperLock trademarks Microchip Technology Incorporated U.S.A. other countries. SQTP service mark Microchip Technology Incorporated U.S.A. other trademarks mentioned herein property their respective companies. 2005, Microchip Technology Incorporated, Printed U.S.A., Rights Reserved. Printed recycled paper. Microchip received ISO/TS-16949:2002 quality system certification worldwide headquarters, design wafer fabrication facilities Chandler Tempe, Arizona Mountain View, California October 2003. Company's quality system processes procedures PICmicro® 8-bit MCUs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory analog products. addition, Microchip's quality system design manufacture development systems 9001:2000 certified. 2005 Microchip Technology Inc. DS00975A-page WORLDWIDE SALES SERVICE AMERICAS Corporate Office 2355 West Chandler Blvd. Chandler, 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: http://support.microchip.com Address: www.microchip.com Atlanta Alpharetta, Tel: 770-640-0034 Fax: 770-640-0307 Boston Westborough, Tel: 774-760-0087 Fax: 774-760-0088 Chicago Itasca, Tel: 630-285-0071 Fax: 630-285-0075 Dallas Addison, Tel: 972-818-7423 Fax: 972-818-2924 Detroit Farmington Hills, Tel: 248-538-2250 Fax: 248-538-2260 Kokomo Kokomo, Tel: 765-864-8360 Fax: 765-864-8387 Angeles Mission Viejo, Tel: 949-462-9523 Fax: 949-462-9608 Jose Mountain View, Tel: 650-215-1444 Fax: 650-961-0286 Toronto Mississauga, Ontario, Canada Tel: 905-673-0699 Fax: 905-673-6509 ASIA/PACIFIC Australia Sydney Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 China Beijing Tel: 86-10-8528-2100 Fax: 86-10-8528-2104 China Chengdu Tel: 86-28-8676-6200 Fax: 86-28-8676-6599 China Fuzhou Tel: 86-591-8750-3506 Fax: 86-591-8750-3521 China Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 China Shanghai Tel: 86-21-5407-5533 Fax: 86-21-5407-5066 China Shenyang Tel: 86-24-2334-2829 Fax: 86-24-2334-2393 China Shenzhen Tel: 86-755-8203-2660 Fax: 86-755-8203-1760 China Shunde Tel: 86-757-2839-5507 Fax: 86-757-2839-5571 China Qingdao Tel: 86-532-502-7355 Fax: 86-532-502-7205 ASIA/PACIFIC India Bangalore Tel: 91-80-2229-0061 Fax: 91-80-2229-0062 India Delhi Tel: 91-11-5160-8631 Fax: 91-11-5160-8632 Japan Kanagawa Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Korea Seoul Tel: 82-2-554-7200 Fax: 82-2-558-5932 82-2-558-5934 Singapore Tel: 65-6334-8870 Fax: 65-6334-8850 Taiwan Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Taiwan Hsinchu Tel: 886-3-572-9526 Fax: 886-3-572-6459 EUROPE Austria Weis Tel: 43-7242-2244-399 Fax: 43-7242-2244-393 Denmark Ballerup Tel: 45-4450-2828 Fax: 45-4485-2829 France Massy Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany Ismaning Tel: 49-89-627-144-0 Fax: 49-89-627-144-44 Italy Milan Tel: 39-0331-742611 Fax: 39-0331-466781 Netherlands Drunen Tel: 31-416-690399 Fax: 31-416-690340 England Berkshire Tel: 44-118-921-5869 Fax: 44-118-921-5820 03/01/05 DS00975A-page 2005 Microchip Technology Inc. Other recent searchesZX95-1300A+ - ZX95-1300A+ ZX95-1300A+ Datasheet UCC2808A - UCC2808A UCC2808A Datasheet UCC3808A - UCC3808A UCC3808A Datasheet IXTA182N055T - IXTA182N055T IXTA182N055T Datasheet IXTP182N055T - IXTP182N055T IXTP182N055T Datasheet IRHF7310SE - IRHF7310SE IRHF7310SE Datasheet ET-9001TX - ET-9001TX ET-9001TX Datasheet ET-9002ST - ET-9002ST ET-9002ST Datasheet 74VHCT574A - 74VHCT574A 74VHCT574A Datasheet
Privacy Policy | Disclaimer |