93C46
93C46-93c06-93c56-93c66-93c86的驱动程序(C51)

93C46/93c06/93c56/93c66/93c86的驱动程序(C51)/*————————————————————〖说明〗SPI总线驱动程序包括的普通封装标准模式,特殊封装标准模式默认的晶振。
〖文件〗﹫2003/5/12—————————————————————*//*通用93c06-93c86系列使用说明93c06=93c4693c56=93c6693c76=93c86dipx 可以自行定义*/#include ““#include ““/*-----------------------------------------------------SPI 93cXX系列时序函数调用(普通封装)调用方式:自行定义﹫2001/05/12函数说明:私有函数,封装各接口定义-----------------------------------------------------*/#define di_93 dip3#define sk_93 dip2#define cs_93 dip1#define do_93 dip4#define gnd_93 dip5#define org_93 dip6sbit cs_93=P1 ;sbit sk_93=P1;sbit di_93=P1;sbit do_93=P1;sbit org_93=P0;/*-----------------------------------------------------SPI93cXX系列时序函数调用(普通封装)调用方式:void high46(void) ---高8位函数调用void low46(void) ---低8位函数调用﹫2001/05/12函数说明:私有函数,SPI专用93c46普通封装驱动程序-----------------------------------------------------*/void high46(void){di_93=1;sk_93=1; _nop_();sk_93=0;_nop_();}void low46(void){di_93=0;sk_93=1;_nop_();sk_93=0;_nop_();}void wd46(unsigned char dd) {unsigned char i;for (i=0;i=0x80) high46(); else low46();dd=dd=0x80) high46a(); else low46a();dd=dd>1;address=address|0x80; address=address|0x80;high46();wd46(address);dat1=rd46();dat0=rd46();cs_93=0;dat=dat1*256 dat0;return(dat);}bit write93c46_word(unsigned char address,unsigned int dat) {unsigned char e,temp=address;e=0;while (e>=1;//??address|=0x40;wd46(address);wd46(dat/256);wd46(dat%6);cs_93=0;_nop_();cs_93=1;time=0;do_93=1;while (1){if (do_93==1) break;if (time>20) break;}cs_93=0;if (read93c46_word(temp)==dat)return(0);}e ;}return(1);}/*-----------------------------------------------------SPI93c57系列函数调用(举例)调用方式:bit write93c57_word(unsigned int address,unsigned int dat) ﹫2001/05/12函数说明:私有函数,SPI专用-----------------------------------------------------*/void ewen57(void){_nop_();cs_93=1;dip7=0;high46();low46();wd46(0x60);cs_93=0;unsigned int read93c57_word(unsigned int address){unsigned int dat;unsigned char dat0,dat1;gnd_93=0;cs_93=sk_93=0;org_93=1;cs_93=1;address=address>>1;high46();high46();wd46(address);dat1=rd46();dat0=rd46();cs_93=0;dat=dat1*256 dat0;return(dat);}bit write93c57_word(unsigned int address,unsigned int dat) {unsigned char e;unsigned int temp=address;e=0;while (e>=1;address|=0x80;wd46(address);wd46(dat/256);wd46(dat%6);cs_93=0;_nop_();cs_93=1;time=0;do_93=1;while (1){if (do_93==1) break;if (time>20) break;}cs_93=0;if (read93c57_word(temp)==dat) {return(0);}e ;}return(1);}/*-----------------------------------------------------SPI93c56系列函数调用(举例)调用方式:bit write93c56_word(unsigned int address,unsigned int dat) ﹫2001/05/12函数说明:私有函数,SPI专用-----------------------------------------------------*/void ewen56(void){_nop_();cs_93=1;high46();low46();low46();wd46(0xc0);cs_93=0;}unsigned int read93c56_word(unsigned char address){unsigned int dat;unsigned char dat0,dat1;gnd_93=0;cs_93=sk_93=0;org_93=1;cs_93=1;address=address>>1;high46();high46();low46();wd46(address);dat1=rd46();dat0=rd46();cs_93=0;dat=dat1*256 dat0;return(dat);}bit write93c56_word(unsigned char address,unsigned int dat) {unsigned char e;unsigned int temp=address;e=0;while (e>=1;wd46(address);wd46(dat/256);wd46(dat%6);cs_93=0;_nop_();cs_93=1;TH0=0;time=0;do_93=1;while (1){if (do_93==1) break;if (time) break;}cs_93=0;if (read93c56_word(temp)==dat) {return(0);}e ;}return(1);}/*-----------------------------------------------------SPI93c76与SPI93c86系列函数调用(举例)调用方式:bit write93c76_word(unsigned int address,unsigned int dat) ﹫2001/05/12函数说明:私有函数,SPI专用-----------------------------------------------------*/void ewen76(void){_nop_();cs_93=1;dip7=1;high46();low46();low46();high46();high46();wd46(0xff);cs_93=0;}unsigned int read93c76_word(unsigned int address){unsigned char dat0,dat1;gnd_93=0;cs_93=sk_93=0;org_93=1;cs_93=1;address>>=1;high46();high46();low46();if((address&0x200)==0x200) high46();else low46();if ((address&0x100)==0x100) high46();else low46();wd46(address);dat1=rd46();dat0=rd46();cs_93=0;return(dat1*256|dat0);}bit write93c76_word(unsigned int address,unsigned int dat) {unsigned char e;unsigned int temp=address;e=0;address>>=1;while (e10) break;}cs_93=0;e ;}return(1);}/*----------------------------------------------------- 主函数调用(举例)调用方式:main() ﹫2001/05/12函数说明:私有函数,SPI专用-----------------------------------------------------*/ main(){ bit b;unsigned int i;unsigned int j[32],k;for(i=0;i<32;i )j[i]=read93c56_word(i);for(i=0;i<32;i )write93c56_word(i,0x0909);i=0;b=write93c56_word(i,0x0909); j[i]=read93c56_word(i);i=1;b=write93c56_word(i,0x1111); j[i]=read93c56_word(i);i=2;b=write93c56_word(i,0x2222); j[i]=read93c56_word(i);}。
IS93C46B-3GI中文资料

IS93C46BISSI®Copyright © 2003 Integrated Silicon Solution, Inc. All rights reserved. ISSI reserves the right to make changes to this specification and its products at any time without notice. ISSI assumes no liability arising out of the application or use of any information, products or services described herein. Customers are advised to obtain the latest version of this device specification before relying on any published information and before placing orders for products.1,024-BIT SERIAL ELECTRICALLY ERASABLE PROMJULY 2003FUNCTIONAL BLOCK DIAGRAMFEATURES•Industry-standard Microwire Interface —Non-volatile data storage —Low voltage operation: Vcc = 2.5V to 5.5V—Full TTL compatible inputs and outputs —Auto increment for efficient data dump •x16 bit organization•Hardware and software write protection—Defaults to write-disabled state at power-up —Software instructions for write-enable/disable •Enhanced low voltage CMOS E 2PROM technology•Versatile, easy-to-use Interface —Self-timed programming cycle —Automatic erase-before-write —Programming status indicator —Word and chip erasable—Chip select enables power savings •Durable and reliable—40-year data retention after 1M write cycles —1 million write cycles —Unlimited read cycles — Schmitt-trigger inputs•Industrial and Automotive Temperature GradeDESCRIPTIONThe IS93C46B is a low-cost 1kb non-volatile,ISSI ® serial EEPROM. It is fabricated using an enhanced CMOS design and process. The IS93C46B contains power-efficient read/write memory, and organization of 64 words of 16 bits.The IS93C46B is fully backward compatible with IS93C46.An instruction set defines the operation of the devices, including read, write, and mode-enable functions. To protect against inadvertent data modification, all erase and write instructions are accepted only while the device is write-enabled. A selected x16 word can be modified with a single WRITE or ERASE instruction. Additionally, the two instructions WRITE ALL or ERASE ALL can program the entire array. Once a device begins its self-timed program procedure, the data out pin (Dout) can indicate the READY/BUSY status by raising chip select (CS). The self-timed write cycle includes an automatic erase-before-writecapability. The device can output any number of consecutive words using a single READ instruction.2Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.A IS93C46BISSI®PIN CONFIGURATIONS8-Pin JEDEC SOIC “G”8-Pin JEDEC SOIC “GR”PIN DESCRIPTIONSCS Chip Select SK Serial Data Clock D IN Serial Data Input D OUT Serial Data Output NC Not Connected Vcc Power GNDGroundinstruction begins with a start bit of the logical “1” or HIGH. Following this are the opcode (2 bits),address field (6 bits), and data, if appropriate. The clock signal may be held stable at any moment to suspend the device at its last state, allowing clock-speed flexibility. Upon completion of buscommunication, CS would be pulled LOW. The device then would enter Standby mode if no internal programming is underway.Read (READ)The READ instruction is the only instruction that outputs serial data on the D OUT pin. After the read instruction and address have been decoded, data is transferred from the selected memory register into a serial shift register. (Please note that one logical “0” bit precedes the actual 16-bit output data string.) The output on D OUT changes during the low-to-high transitions of SK (see Figure 3).Low Voltage ReadThe IS93C46B has been designed to ensure that data read operations are reliable in low voltage environments.They provide accurate operation with Vcc as low as 2.5V.Auto Increment Read OperationsIn the interest of memory transfer operation applications,the IS93C46B has been designed to output a continuous stream of memory content in response to a single read operation instruction. To utilize this function, the system asserts a read instruction specifying a start location ad-dress. Once the 16 bits of the addressed register have been clocked out, the data in consecutively higher address locations is output. The address will wrap around continu-ously with CS HIGH until the chip select (CS) control pin is brought LOW . This allows for single instruction data dumps to be executed with a minimum of firmware overhead.ApplicationsThe IS93C46B is very popular in many high-volume applications which require low-power, low-density storage. Applications using this device include industrial controls, networking, and numerous other consumer electronics.Endurance and Data RetentionThe IS93C46B is designed for applications requiring up to 1M programming cycles (WRITE, WRALL, ERASE and ERAL). It provides 40 years of secure data retention without power after the execution of 1M programming cycles.Device OperationsThe IS93C46B is controlled by a set of instructions which are clocked-in serially on the Din pin. Before each low-to-high transition of the clock (SK), the CS pin must have already been raised to HIGH, and the Din value must be stable at either LOW or HIGH. Each12348765CS SK D IN D OUTVCC NC NC GND12348765NC VCC CS SKNC GND D OUT D IN12348765CS SK D IN D OUTVCC NC NC GND(Rotated)8-Pin DIP, 8-Pin TSSOPIS93C46BISSI®Write All (WRALL)The write all (WRALL) instruction programs all registers with the data pattern specified in the instruction. As with the WRITE instruction, the falling edge of CS must occur to initiate the self-timed programming cycle. If CS is then brought HIGH after a minimum wait of 250 ns (t CS ), the D OUT pin indicates the READY/BUSY status of the chip (see Figure 6).Write Disable (WDS)The write disable (WDS) instruction disables all programming capabilities. This protects the entire device against acci-dental modification of data until a WEN instruction is executed. (When Vcc is applied, this part powers up in the write disabled state.) To protect data, a WDS instruction should be executed upon completion of each programming operation.Erase Register (ERASE)After the erase instruction is entered, CS must be brought LOW. The falling edge of CS initiates the self-timed internal programming cycle. Bringing CS HIGH after a minimum of t CS , will cause D OUT to indicate the READ/BUSY status of the chip: a logical “0” indicates programming is still in progress;a logical “1” indicates the erase cycle is complete and the part is ready for another instruction (see Figure 8).Erase All (ERAL)Full chip erase is provided for ease of programming. Erasing the entire chip involves setting all bits in the entire memory array to a logical “1” (see Figure 9).Write Enable (WEN)The write enable (WEN) instruction must be executed before any device programming (WRITE, WRALL,ERASE, and ERAL) can be done. When Vcc is applied,this device powers up in the write disabled state. The device then remains in a write disabled state until a WEN instruction is executed. Thereafter, the device remains enabled until a WDS instruction is executed or until Vcc is removed. (See Figure 4.) (Note: Chip select must remain LOW until Vcc reaches its operational value.)Write (WRITE)The WRITE instruction includes 16 bits of data to be written into the specified register. After the last data bit has been applied to D IN , and before the next rising edge of SK, CS must be brought LOW. If the device is write-enabled, then the falling edge of CS initiates the self-timed programming cycle (see WEN).If CS is brought HIGH, after a minimum wait of 250 ns (5V operation) after the falling edge of CS (t CS ) D OUT will indicate the READY/BUSY status of the chip. Logical “0”means programming is still in progress; logical “1” means the selected register has been written, and the part is ready for another instruction (see Figure 5). The READY/BUSY status will not be available if: a) The CS input goes HIGH after the end of the self-timed programming cycle,t WP ; or b) Simultaneously CS is HIGH, Din is HIGH, and SK goes HIGH, which clears the status flag.INSTRUCTION SET - IS93C46B16-bit OrganizationInstruction Start BitOP Code Address (1)Input DataREAD110(A 5-A 0)—WEN (Write Enable)10011xxxx —WRITE101(A 5-A 0)(D 15-D 0) (2)WRALL (Write All Registers)10001xxxx (D 15-D 0) (2)WDS (Write Disable)10000xxxx —ERASE111(A 5-A 0)—ERAL (Erase All Registers)10010xxxx—Notes:1. x = Don't care bit.2.If input data is not 16 bits exactly, the last 16 bits will be taken as input data.IS93C46B ISSI®ABSOLUTE MAXIMUM RATINGS(1)Symbol Parameter Value UnitV GND Voltage with Respect to GND–0.3 to +6.5VT BIAS Temperature Under Bias (Industrial)–40 to +85°CT BIAS Temperature Under Bias (Automotive)–40 to +125°CT STG Storage Temperature–65 to +150°CNotes:1. Stress greater than those listed under ABSOLUTE MAXIMUM RATINGS may causepermanent damage to the device. This is a stress rating only and functional operation of thedevice at these or any other conditions above those indicated in the operational sections ofthis specification is not implied. Exposure to absolute maximum rating conditions forextended periods may affect reliability.OPERATING RANGERange Ambient Temperature V C CCommercial0°C to +70°C 2.5V to 5.5VIndustrial–40°C to +85°C 2.5V to 5.5VAutomotive–40°C to +125°C 2.7V to 5.5V or 4.5V to 5.5VCAPACITANCESymbol Parameter Conditions Max.UnitC IN Input Capacitance V IN = 0V5pFC OUT Output Capacitance V OUT = 0V5pF4Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.AIS93C46B ISSI®DC ELECTRICAL CHARACTERISTICST A = 0°C to +70°C for Commercial, –40°C to +85°C for Industrial, and –40°C to +125°C for Automotive.Symbol Parameter Test Conditions Vcc Min.Max.Unit V OL Output LOW Voltage I OL = 100 µA 2.5V to 5.5V—0.2V V OL1Output LOW Voltage I OL = 2.1 mA 4.5V to 5.5V—0.4V V OH Output HIGH Voltage I OH = –100 µA 2.5V to 5.5V V CC – 0.2—V V OH1Output HIGH Voltage I OH = –400 µA 4.5V to 5.5V 2.4—V V IH Input HIGH Voltage 2.5V to 5.5V0.7X V CC V CC+1V4.5V to5.5V0.7X V CC V CC+1V IL Input LOW Voltage 2.5V to 5.5V–0.30.2X V CC V4.5V to5.5V–0.30.8I LI Input Leakage V IN = 0V to V CC (CS, SK,D IN,ORG)0 2.5µA I LO Output Leakage V OUT = 0V to V CC, CS = 0V0 2.5µA N o t e s:Automotive grade devices in this table are tested with Vcc = 2.7V to 5.5V and 4.5V to 5.5V.IS93C46B ISSI®POWER SUPPLY CHARACTERISTICST A = 0°C to +70°C for CommercialSymbol Parameter Test Conditions Vcc Min.Max.UnitI CC1Vcc Read Supply Current CS = V IH, SK = 1 MHz 2.7V—100µACMOS input levels 5.0V—500µAI CC2Vcc Write Supply Current CS = V IH, SK = 1 MHz 2.7V—1mACMOS input levels 5.0V—3mAI SB Standby C urrent CS = V IH, SK = 0V 2.7V—10µA5.0V—30µAPOWER SUPPLY CHARACTERISTICST A = –40°C to +85°C for IndustrialSymbol Parameter Test Conditions Vcc Min.Max.UnitI CC1Vcc Read Supply Current CS = V IH, SK = 1 MHz 2.7V—100µACMOS input levels 5.0V—500µAI CC2Vcc Write Supply Current CS = V IH, SK = 1 MHz 2.7V—1mACMOS input levels 5.0V—3mAI SB Standby C urrent CS = V IH, SK = 0V 2.7V—2µA5.0V—4µAPOWER SUPPLY CHARACTERISTICST A = –40°C to +125°C for AutomotiveSymbol Parameter Test Conditions Vcc Min.Max.UnitI CC1Vcc Read Supply Current CS = V IH, SK = 1 MHz 2.7V—100µACMOS input levels 5.0V—500µAI CC2Vcc Write Supply Current CS = V IH, SK = 1 MHz 2.7V—1mACMOS input levels 5.0V—3mAI SB Standby C urrent CS = V IH, SK = 0V 2.7V—3µA5.0V—8µA6Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.AIS93C46B ISSI®AC ELECTRICAL CHARACTERISTICST A = T A = 0°C to +70°C for Commercial, –40°C to +85°C for IndustrialSymbol Parameter Test Conditions Vcc Min.Max.Unitf SK SK Clock Frequency 2.5V to 5.5V01Mhz2.7V to 5.5V01Mhz4.5V to5.5V02Mhzt SKH SK HIGH Time 2.5V to 5.5V500—ns2.7V to 5.5V350—ns4.5V to5.5V250—nst SKL SK LOW Time 2.5V to 5.5V500—ns2.7V to 5.5V350—ns4.5V to5.5V250—nst CS Minimum CS LOW Time 2.5V to 5.5V500—ns2.7V to 5.5V250—ns4.5V to5.5V250—nst CSS CS Setup Time Relative to SK 2.5V to 5.5V100—ns2.7V to 5.5V50—ns4.5V to5.5V50—nst DIS Din Setup Time Relative to SK 2.5V to 5.5V100—ns2.7V to 5.5V100—ns4.5V to5.5V100—nst CSH CS Hold Time Relative to SK 2.5V to 5.5V0—ns2.7V to 5.5V0—ns4.5V to5.5V0—nst DIH Din Hold Time Relative to SK 2.5V to 5.5V100—ns2.7V to 5.5V100—ns4.5V to5.5V100—nst PD1Output Delay to “1”AC Test 2.5V to 5.5V—400ns2.7V to 5.5V—350ns4.5V to5.5V—250nst PD0Output Delay to “0”AC Test 2.5V to 5.5V—400ns2.7V to 5.5V—350ns4.5V to5.5V—250nst SV CS to Status Valid AC Test 2.5V to 5.5V—400ns2.7V to 5.5V—250ns4.5V to5.5V—250nst DF CS to Dout in 3-state AC Test, CS=VIL 2.5V to 5.5V—200ns2.7V to 5.5V—200ns4.5V to5.5V—100nst WP Write Cycle Time 2.5V to 5.5V—10ms2.7V to 5.5V—10ms4.5V to5.5V—5msN o t e s:1. C L = 100pFIS93C46B ISSI®AC ELECTRICAL CHARACTERISTICST A = –40°C to +125°C for AutomotiveSymbol Parameter Test Conditions Vcc Min.Max.Unitf SK SK Clock Frequency 2.7V to 5.5V01Mhz4.5V to5.5V02Mhzt SKH SK HIGH Time 2.7V to 5.5V500—ns4.5V to5.5V250—nst SKL SK LOW Time 2.7V to 5.5V500—ns4.5V to5.5V250—nst CS Minimum CS LOW Time 2.7V to 5.5V250—ns4.5V to5.5V250—nst CSS CS Setup Time Relative to SK 2.7V to 5.5V100—ns4.5V to5.5V50—nst DIS Din Setup Time Relative to SK 2.7V to 5.5V100—ns4.5V to5.5V100—nst CSH CS Hold Time Relative to SK 2.7V to 5.5V0—ns4.5V to5.5V0—nst DIH Din Hold Time Relative to SK 2.7V to 5.5V100—ns4.5V to5.5V100—nst PD1Output Delay to “1”AC Test 2.7V to 5.5V—400ns4.5V to5.5V—250nst PD0Output Delay to “0”AC Test 2.7V to 5.5V—400ns4.5V to5.5V—250nst SV CS to Status Valid AC Test 2.7V to 5.5V—250ns4.5V to5.5V—250nst DF CS to Dout in 3-state AC Test, CS=VIL 2.7V to 5.5V—200ns4.5V to5.5V—100nst WP Write Cycle Time 2.7V to 5.5V—10ms4.5V to5.5V—5msN o t e s:1. C L = 100pF8Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.AIS93C46B ISSI®AC WAVEFORMSFIGURE 2. SYNCHRONOUS DATA TIMINGNotes:To determine address bits An-A0 and data bits Dm-Do, see Instruction Set.IS93C46B ISSI®AC WAVEFORMSFIGURE 4. WRITE ENABLE (WEN) TIMINGNotes:1. After the completion of the instruction (D OUT is in READY status) then it may perform another instruction. If device is in BUSY status(D OUT indicates BUSY status) then attempting to perform another instruction could cause device malfunction.2. To determine address bits A n-A0 and data bits D m-D0, see Instruction Set.10Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.AIS93C46B ISSI®AC WAVEFORMSFIGURE 6. WRITE ALL (WRALL) TIMINGIntegrated Silicon Solution, Inc. — — 1-800-379-477411 R e v.A07/23/03IS93C46B ISSI®AC WAVEFORMSFIGURE 8. ERASE (REGISTER ERASE) CYCLE TIMINGNote for Figures 8 and 9:After the completion of the instruction (D OUT is in READY status) then it may perform another instruction. If device is in BUSY status (D OUT indicates BUSY status) then attempting to perform another instruction could cause device malfunction.12Integrated Silicon Solution, Inc. — — 1-800-379-4774Rev.A07/23/03IS93C46B ISSI®ORDERING INFORMATIONCommercial: 0ºC to +70ºCSpeed Voltage Range Order Part No.Package1Mhz * 2.5V to 5.5V IS93C46B-3P300-mil Plastic DIPIS93C46B-3G SOIC (rotated) JEDECIS93C46B-3GR SOIC JEDECIS93C46B-3Z169-mil TSSOPORDERING INFORMATIONIndustrial Range: -40ºC to +85ºCSpeed Voltage Range Order Part No.Package1Mhz * 2.5V to 5.5V IS93C46B-3PI300-mil Plastic DIPIS93C46B-3GI SOIC (rotated) JEDECIS93C46B-3GRI SOIC JEDECIS93C46B-3ZI169-mil TSSOPORDERING INFORMATIONAutomotive Range: -40ºC to +125ºCSpeed Voltage Range Order Part No.Package1Mhz * 2.7V to 5.5V IS93C46B-3PA300-mil Plastic DIPIS93C46B-3GRA SOIC JEDEC* The specification allows for higher speed. Please see the AC Charateristics for more information. Integrated Silicon Solution, Inc. — — 1-800-379-477413 R e v.A07/23/03。
AT93C46中文资料详解

AT93C46中文资料详解AT93C46 是1K的串行EEPROM存储器器件,它们可配置为16位(ORG 管脚接Vcc)或者8位(ORG管脚接GND)的寄存器。
每个寄存器都可通过DI(或DO管脚)串行写入(或读出)。
AT93C46 内部有一个指令缓存器储存传输进来的串行数据,再由指令译码控制逻辑与内部频率产生器,在指定的地址将数据作读取或写入的动作。
AT93C46采用Catalyst公司先进的CMOS EEPROM浮动闸(floating gate)技术制造而成。
器件可采用8脚DIP,8脚SOIC或8脚TSSOP 的封装形式。
AT93C46 集成电路AT93C46 功能介绍AT93C46 是一片串行数据存储器芯片,其接脚说明如表1 及内部结构如图3。
不论写入或读取数据,皆采用串行传输的模式作动,虽然没有比并列传输来的快速,但是在传递远距离的数据,却可以大量减少使用传输线的需求,也缩小了系统整体的占有面积。
因此,非常适合用于微控制器或是微处理器,表2是对AT93C 系列作容量上的比较。
AT93C46 内部有一个指令缓存器储存传输进来的串行数据,再由指令译码控制逻辑与内部频率产生器,在指定的地址将数据作读取或写入的动作。
AT93C46 共有7 个功能指令,我们用表3来说明之;另外,也将其控制动作用表4说明,而AT93C46 特性说明概要如下:保存的资料约40 年之久。
● 可以重复写入超过1 百万次。
● 可以记录64 组16bit 的数字。
● 采用微金属丝接口(Microwire Interface)。
● 有4 条串行金属线总线。
● 1024bit 的串行数据存储器。
● 内部是采用CMOS EEPROM 的方式。
READ:允许数据从指定的地址读出,当接受到有效的输入讯号时,数据将会被放在输出缓存器内,随着频率讯号上升同步输出,在DO 输出数据前会先输出一个“ 假的位”,如同起始位的功能一样,再由D15 一直到D0 输出为止。
93c46

1 概述CSI93c46是一种存储器可以定义为16 位ORG 引脚接Vcc 或者定义为8 位ORG 引脚接GND 的1K/2K/2K/4K/16K 位的串行E2PROM 每一个的存储器都可以通过DI 引脚或DO 引脚进行写入或读出每一片CSI93c46/56/57/66/86 都是采用CSIalyst 公司先进的CMOS E2PROM 浮动门工艺加工器件可以经受1000000 次的写入/擦除操作片内数据保存寿命达到100 年器件可提供的封装有DIP-8 SOIC-8 TSSOP-82 器件特性高速度操作1MHz低功耗工艺电源电压宽1.8 伏到6.0 伏存储器可选择8 位或者16 位结构写入时自动清除存储器内容硬件和软件写保护1000000 次写入/擦除周期100 年数据保存寿命商业级工业级和汽车级温度范围连续读操作除93c46外写入允许引脚PE 只有93C86 有3 管脚配置及其方框图3 1 管脚3 2 管脚说明说明当ORG 接Vcc 时存储器为16 位结构当ORG 接GND 是存储器为8 位结构当ORG引脚悬空时内部的上拉电阻把存储器选择为16 位结构管脚名称功能CS 片选信号SK 时钟输入DI 串行数据输入DO 串行数据输出Vcc 电源+1.8 伏到6 伏GND 接地ORG 存储器结构选择NC 不用连接PE* 写入保护4 器件操作简介CSI93c46/56 57 /66/86 是一个有1024/2048/4096/16384 位内含工业标准微处理器的非易失的存储器CSI93c46/56/57/66/86 可以选择为16 位或8 位结构当选择16 位结构时93c46有7 条9 位的指令93C57 有7 条10 位的指令93C56 和93C66 有7 条11 位的指令93C86 有7 条13 位的指令用来控制对器件进行读写和擦除操作当选择8 位结构时93c46有7 条10 位的指令93C57 有7 条11 位的指令93C56 和93C66 有7 条12 位的指令93C86 有7 条14 位的指令来控制对器件进行读写和擦除操作CSI93c46/56/57/66/86 的所有操作都在单电源上进行当执行任何的写操作时内部的升压电路将提供高压给芯片指令地址和写入的数据在时钟信号SK 的上升沿时由DI 引脚输入DO 引脚除了从器件读取数据或在进行了写操作后查询准备/繁忙ready/busy 的器件工作状态外平常是高阻态的准备/繁忙ready/busy 是开始了一个写操作后选择器件CS 为高电平后从DO 引脚读得用来测定期间工作状态的信号DO 为低电平则表示写操作还没有完成当DO 为高电平时则表示器件可以输入下一条指令此时如果有需要可以在DI 引脚移入一个高电平DO 会进入高阻态DO 引脚会在时钟SK的下降沿时进入高阻态将DO 引脚恢复高阻态是值得推荐在DI 和DO 合用一个I/O 口来读/写的应用中所有送往器件的指令格式为一个高电平1 的开始位一个2 位或4 位的操作码6 位93c46/7 位93C57 /8 位(93C56 或93C66)/10 位(93C86)(当选择8 位结构时加一位)及写入数据时的16 位数据选择8 位结构时为8 位注当器件为93C86 时执行写入擦除写全部和擦全部操作时写允许引脚PE 必须为1 如果PE 引脚悬空93C86 为允许写入模式当执行写允许和写禁止指令后PE 可以不必理会93c46是1k位串行EEPROM储存器。
[FPGA][Verilog][SPI]简单的读写SPI接口EEPROM-93C46程序
![[FPGA][Verilog][SPI]简单的读写SPI接口EEPROM-93C46程序](https://img.taocdn.com/s3/m/1221e485ec3a87c24028c428.png)
Write19: begin mo <= 0; cs <= 0; end
Read0: cs <= 0; Read1://110+add(7bit) begin cs <= 1; mo <= 1; end Read2: mo <= 1; Read3: mo <= 0;//110 Read4: mo <= 0; Read5: mo <= 1; Read6: mo <= 1; Read7: mo <= 1; Read8: mo <= 1; Read9: mo <= 1; Read10: mo <= 1; Read11: begin mo <= 0; led[7] <= mi; end Read12: led[7] <= mi; Read13: led[6] <= mi; Read14: led[5] <= mi; Read15:
从开始读数据手册,到研究时序,到编写 Verilog 程序,到仿真调试时序,整整 花了有 3-4 天时间。 最后时序已经完全正确, 却读不出任何数据,经过一个晚上的排查才发现是开发 板上的 DI DO SK CS 标号标错了,泪奔~~ 本来我想写一个完整的 SPI 接口出来,想了几天都没有头绪,最后还是写了一个 最简单的写数据读数据的小程序,如果做成接口也勉强可以用。 程序的功能很简单,往地址 0111111 的位置写了 00001111 的数据,地址都还没 有做成接口,固定在程序里面的。 具体用了一个状态机共 53 个状态,每一个状态都是一个 SCK 信号的处理,当然 有分为三个大状态,分别为 ENWR、WRITE、READ 93C46 要首先写 ENWR 信号才能写入数据,具体还得研究数据手册 通过这次 93C46 和上次写 18B20 的经历, 我感觉到数据手册的确是相当的重要的, 需要仔细推敲,分析每一个时序图!下次要做 I2C 接口的 24C02,1、2、3 线就 都学过拉。 当然作为初学者程序是写的那是超级的烂,欢迎拍砖
93c46使用方法(中文)

Rev.3.2_01应用手册 No.M103CMOS串行E2PROMS-2900A/29xxxA/93CxxA系列的使用方法目录1. 关于输入端子的连接 (2)2. 输入、输出端子等效电路 (2)2-1.输入端子 (2)2-2.输出端子 (3)3. 程序禁止指令 (4)4. 电源接通清除电路 (4)4-1.电源电压的上升方法 (4)4-2.初始化时间 (6)5. 关于往E2PROM传送16位写入数据的途中、CS下降时的写入工作 (7)6. 关于E2PROM的奇偶校验工作 (8)7. 关于输入端子噪声抑制时间 (9)8. 注意事项 (9)CMOS串行E2PROMS-2900A/29xxxA/93CxxA系列的使用方法Rev.3.2_01注意 不仅限于本公司的产品,由于E2PROM「在电源ON/OFF时工作于低电压领域内」以及「输入噪声信号而导致的指令的误识别」,具有引起误工作(误写入)的危险性。
特别是,负责传送指令给E2PROM的微机的电压,处于低于最低工作电压的电压范围内时,有可能发生这些故障。
在此所记载的内容是关于使用本E2PROM的重要内容,请务必认真阅读。
1.关于输入端子的连接S-2900A/29xxxA/93CxxA系列产品的输入端子全部为CMOS构造,所以在E2PROM工作时请设计为不能输入高阻抗。
特别是「电源ON/OFF时」和「工作待机时」,请设置CS输入为非选择状态。
数据的误写入在CS端子为非选择状态时(CS为Low、CS为High)不会发生。
因此,当CS极性为High 动态的情况下,推荐连接10 kΩ ~ 100 kΩ的下拉电阻。
为了更确实地防止误工作,虽然CS端子连接下拉/上拉电阻是最重要的,但也推荐除此以外的其他端子也连接同样的下拉/上拉电阻。
表1CS端子 High动态 Low动态CS端子的处理下拉电阻:10 kΩ ~ 100 kΩ上拉电阻:10 kΩ ~ 100 kΩ代表产品S-93C46A, S-29130A S-29194A2.输入、输出端子等效电路表示E2PROM输入端子的等效电路。
93C46使用手册

1Features•Low-voltage and Standard-voltage Operation –2.7 (V CC = 2.7V to 5.5V)–1.8 (V CC = 1.8V to 5.5V)•User-selectable Internal Organization –1K: 128 x 8 or 64 x 16–2K: 256 x 8 or 128 x 16–4K: 512 x 8 or 256 x 16•3-wire Serial Interface • 2 MHz Clock Rate (5V)•Self-timed Write Cycle (10 ms max)•High Reliability–Endurance: 1 Million Write Cycles –Data Retention: 100 Years•Automotive Grade, Extended Temperature and Lead-Free/Halogen-Free Devices Available•8-lead PDIP , 8-lead JEDEC SOIC, 8-lead EIAJ SOIC, 8-lead MAP , 8-lead TSSOP and 8-ball dBGA2™ PackagesDescriptionThe AT93C46/56/66 provides 1024/2048/4096 bits of serial electrically erasable pro-grammable read only memory (EEPROM), organized as 64/128/256 words of 16 bits each when the ORG pin is connected to VCC, and 128/256/512 words of 8 bits each when it is tied to ground. The device is optimized for use in many industrial and com-mercial applications where low-power and low-voltage operations are essential. The AT93C46/56/66 is available in space-saving 8-lead PDIP , 8-lead JEDEC SOIC, 8-lead EIAJ SOIC, 8-lead MAP , 8-lead TSSOP , and 8-ball dBGA2™ packages.20172X–SEEPR–7/04The AT93C46/56/66 is enabled through the Chip Select pin (CS) and accessed via a 3-wire serial interface consisting of Data Input (DI), Data Output (DO), and Shift Clock (SK). Upon receiving a READ instruction at DI, the address is decoded and the data is clocked out serially on the DO pin. The WRITE cycle is completely self-timed and no separate ERASE cycle is required before WRITE. The WRITE cycle is only enabled when the part is in the ERASE/WRITE ENABLE state. When CS is brought “high” fol-lowing the initiation of a WRITE cycle, the DO pin outputs the READY/BUSY status of the part.The AT93C46/56/66 is available in 2.7V to 5.5V and 1.8V to 5.5V versions.Block DiagramNote:1.When the ORG pin is connected to VCC, the x 16 organization is selected. When it is connected to ground, the x 8 organiza-tion is selected. If the ORG pin is left unconnected and the application does not load the input beyond the capability of the internal 1 Meg ohm pullup, then the x 16 organization is selected. The feature is not available on the 1.8V devices.2.For the A T93C46, if x 16 organization is the mode of choice and Pin 6 (ORG) is left unconnected, Atmel recommends usingthe A T93C46A device. For more details, see the AT93C46A datasheet.Absolute Maximum Ratings*Operating Temperature ......................................−55°C to +125°C *NOTICE:Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent dam-age to the device. This is a stress rating only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliabilityStorage T emperature .........................................−65°C to +150°C Voltage on Any Pinwith Respect to Ground ........................................−1.0V to +7.0V Maximum Operating Voltage ..........................................6.25V DC Output Current........................................................5.0 mA30172X–SEEPR–7/04IL IH Pin Capacitance (1)DC CharacteristicsApplicable over recommended operating range from: T AI = −40°C to +85°C, V CC = +1.8V to +5.5V , T = -40°C to +125°C, V = +1.8V to +5.5V (unless otherwise noted).AC CharacteristicsApplicable over recommended operating range from T AI = −40°C to + 85°C, T AE = −40°C to +125°C, V CC = As Specified,40172X–SEEPR–7/0450172X–SEEPR–7/04Note:The X’s in the address field represent don’t care values and must be clocked.2.This device is not recommended for new designs. Please refer to AT93C66A.3.The X’s in the address field represent don’t care values and must be clocked.Instruction Set for the AT93C46Instruction Set for the AT93C56(1) and AT93C66(2)60172X–SEEPR–7/04Functional DescriptionThe AT93C46/56/66 is accessed via a simple and versatile 3-wire serial communication interface. Device operation is controlled by seven instructions issued by the host pro-cessor. A valid instruction starts with a rising edge of CS and consists of a Start Bit (logic “1”) followed by the appropriate Op Code and the desired memory address location.READ (READ): The Read (READ) instruction contains the address code for the mem-ory location to be read. After the instruction and address are decoded, data from the selected memory location is available at the serial output pin DO. Output data changes are synchronized with the rising edges of serial clock SK. It should be noted that a dummy bit (logic “0”) precedes the 8- or 16-bit data output string.ERASE/WRITE (EWEN): To assure data integrity, the part automatically goes into the Erase/Write Disable (EWDS) state when power is first applied. An Erase/Write Enable (EWEN) instruction must be executed first before any programming instructions can be carried out. Please note that once in the EWEN state, programming remains enabled until an EWDS instruction is executed or V CC power is removed from the part.ERASE (ERASE): The Erase (ERASE) instruction programs all bits in the specified memory location to the logical “1” state. The self-timed erase cycle starts once the ERASE instruction and address are decoded. The DO pin outputs the READY/BUSY status of the part if CS is brought high after being kept low for a minimum of 250 ns (t CS ).A logic “1” at pin DO indicates that the selected memory location has been erased and the part is ready for another instruction.WRITE (WRITE): The Write (WRITE) instruction contains the 8 or 16 bits of data to be written into the specified memory location. The self-timed programming cycle t WP starts after the last bit of data is received at serial data input pin DI. The DO pin outputs the READY/BUSY status of the part if CS is brought high after being kept low for a minimum of 250 ns (t CS ). A logic “0” at DO indicates that programming is still in progress. A logic “1” indicates that the memory location at the specified address has been written with the data pattern contained in the instruction and the part is ready for further instructions. A READY/BUSY status cannot be obtained if the CS is brought high after the end of the self-timed programming cycle t WP .ERASE ALL (ERAL): The Erase All (ERAL) instruction programs every bit in the mem-ory array to the logic “1” state and is primarily used for testing purposes. The DO pin outputs the READY/BUSY status of the part if CS is brought high after being kept low for a minimum of 250 ns (t CS ). The ERAL instruction is valid only at V CC = 5.0V ± 10%. WRITE ALL (WRAL): The Write All (WRAL) instruction programs all memory locations with the data patterns specified in the instruction. The DO pin outputs the READY/BUSY status of the part if CS is brought high after being kept low for a minimum of 250 ns (t CS ).The WRAL instruction is valid only at V CC = 5.0V ± 10%.ERASE/WRITE DISABLE (EWDS): To protect against accidental data disturb, the Erase/Write Disable (EWDS) instruction disables all programming modes and should be executed after all programming operations. The operation of the READ instruction is independent of both the EWEN and EWDS instructions and can be executed at any time.70172X–SEEPR–7/04Timing DiagramsSynchronous Data TimingNote: 1.This is the minimum SK period.2.This device is not recommended for new designs. Please refer to AT93C66A.3.A 8 is a DON’T CARE value, but the extra clock is required.4.A 7 is a DON’T CARE value, but the extra clock is required.READ TimingOrganization Key for Timing DiagramsEWDS TimingWRITE Timing80172X–SEEPR–7/0490172X–SEEPR–7/04Note:1.Valid only at V CC = 4.5V to 5.5V .ERASE TimingNote: 1.Valid only at V CC = 4.5V to 5.5V.100172X–SEEPR–7/04110172X–SEEPR–7/04AT93C46 Ordering InformationNote: 1.This device is not recommended for new designs. Please refer to AT93C56A.2.For 2.7V devices used in the 4.5V to 5.5V range, please refer to performance values in the AC and DC characteristics table.120172X–SEEPR–7/04130172X–SEEPR–7/04Notes:1.This device is not recommended for new designs. Please refer to AT93C66A.2.For 2.7V devices used in the 4.5V to 5.5V range, please refer to performance values in the AC and DC characteristics table.Packaging Information8P3 – PDIP140172X–SEEPR–7/04150172X–SEEPR–7/04160172X–SEEPR–7/04170172X–SEEPR–7/048A2 – TSSOP8U3-1 – dBGA2180172X–SEEPR–7/04190172X–SEEPR–7/048Y1 – MAP0172X–SEEPR–7/04Disclaimer: Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standard warranty which is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products are not authorized for use as critical components in life support devices or systems.Atmel CorporationAtmel Operations2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 487-2600Regional HeadquartersEuropeAtmel SarlRoute des Arsenaux 41Case Postale 80CH-1705 Fribourg SwitzerlandTel: (41) 26-426-5555Fax: (41) 26-426-5500AsiaRoom 1219Chinachem Golden Plaza 77 Mody Road Tsimshatsui East Kowloon Hong KongTel: (852) 2721-9778Fax: (852) 2722-1369Japan9F, Tonetsu Shinkawa Bldg.1-24-8 ShinkawaChuo-ku, Tokyo 104-0033JapanTel: (81) 3-3523-3551Fax: (81) 3-3523-7581Memory2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 436-4314Microcontrollers2325 Orchard Parkway San Jose, CA 95131, USA Tel: 1(408) 441-0311Fax: 1(408) 436-4314La Chantrerie BP 7060244306 Nantes Cedex 3, France Tel: (33) 2-40-18-18-18Fax: (33) 2-40-18-19-60ASIC/ASSP/Smart CardsZone Industrielle13106 Rousset Cedex, France Tel: (33) 4-42-53-60-00Fax: (33) 4-42-53-60-011150 East Cheyenne Mtn. Blvd.Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300Fax: 1(719) 540-1759Scottish Enterprise Technology Park Maxwell BuildingEast Kilbride G75 0QR, Scotland Tel: (44) 1355-803-000Fax: (44) 1355-242-743RF/AutomotiveTheresienstrasse 2Postfach 353574025 Heilbronn, Germany Tel: (49) 71-31-67-0Fax: (49) 71-31-67-23401150 East Cheyenne Mtn. Blvd.Colorado Springs, CO 80906, USA Tel: 1(719) 576-3300Fax: 1(719) 540-1759Biometrics/Imaging/Hi-Rel MPU/High Speed Converters/RF DatacomAvenue de Rochepleine BP 12338521 Saint-Egreve Cedex, France Tel: (33) 4-76-58-30-00Fax: (33) 4-76-58-34-80Literature Requests/literature© Atmel Corporation 2004. All rights reserved. Atmel ® and combinations thereof, are the registered trademarks, and dBGA ™ is the trademark of Atmel Corporation or its subsidiaries. Other terms and product names may be the trademarks of others.。
关于调试93C46的读写出现的问题

#defineDIO_STATE_InTRISB4=1
#defineDIO_STATE_OutTRISB4=0
//写93c46操作码和地址函数(8位数据存储结构):
void Write93c46OpcAndAddr(Uint8 opcode,Uint8 addr)
{
DIO=(wdata&0x80)?1:0;//逐位写入
CLK=0;//产生时钟
asm("nop");
asm("nop");
asm("nop");
asm("nop");
CLK=1;
wdata<<=1;//取下一位
}
CS=0;//选通禁止
Delay10us(1);
}
//93C46写使能函数:
void WriteEnable93C46(void)
{
if(FLAG_10MS)
{
FLAG_10MS=0;
//led=1;
// eeprombuf[0]=Read93c46Data(0x05);
// eeprombuf[1]=Read93c46Data(0x05);
// eeprombuf[2]=Read93c46Data(0x06);
if(eeprombuf[0]==0x95&&eeprombuf[1]==0x20&&eeprombuf[2]==0x30) led=1;
93C46为容量1K的EE2PROM,工作电压为REDA: 2~5.5V WRITE: 2.4~5.5V,通过3线的SPI接口来进行读取,管脚排布如下图
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
FEATURES•Single supply 5.0V operation •Low power CMOS technology - 1 mA active current (typical)- 1 µ A standby current (maximum)•64 x 16 bit organization•Self-timed ERASE and WRITE cycles (including auto-erase)•Automatic ERAL before WRAL•Power on/off data protection circuitry •Industry standard 3-wire serial interface•Device status signal during ERASE/WRITE cycles •Sequential READ function•1,000,000 E/W cycles guaranteed •Data retention > 200 years•8-pin PDIP/SOIC and 8-pin TSSOP packages •Available for the following temperature ranges: DESCRIPTIONThe Microchip T echnology Inc. 93C46B is a 1K-bit,low-voltage serial Electrically Erasable PROM. The device memory is configured as 64 x 16 bits. Advanced CMOS technology makes this device ideal for low-power, nonvolatile memory applications. The 93C46B is available in standard 8-pin DIP , surface mount SOIC, and TSSOP packages. The 93C46BX are only offered in a 150 mil SOIC package.-Commercial (C):0 ° C to +70 ° C -Industrial (I): -40 ° C to +85 ° C -Automotive (E): -40 ° C to +125 °C93C46B1.0ELECTRICALCHARACTERISTICS1.1Maximum Ratings*V CC...................................................................................7.0V All inputs and outputs w.r.t. V SS...............-0.6V to V CC +1.0V Storage temperature.....................................-65°C to +150°C Ambient temp. with power applied.................-65°C to +125°C Soldering temperature of leads (10 seconds).............+300°C ESD protection on all pins................................................4 kV *Notice: Stresses above those listed under “Maximum ratings” may cause permanent damage to the device. This is a stress rating only and functional operation of the device at those or any other conditions above those indicated in the operational listings of this specification is not implied. Exposure to maximum rating conditions for extended peri-ods may affect device reliability.TABLE 1-1PIN FUNCTION TABLE Name FunctionCS Chip SelectCLK Serial Data ClockDI Serial Data InputDO Serial Data OutputV SS GroundNC No ConnectV CC Power SupplyTABLE 1-2DC AND AC ELECTRICAL CHARACTERISTICSAll parameters apply over the specified operating ranges unless otherwise noted Commercial (C) V CC = +4.5V to +5.5V T amb = 0°C to +70°C Industrial (I)V CC = +4.5V to +5.5V T amb = -40°C to +85°C Automotive (E)V CC = +4.5V to +5.5V T amb = -40°C to +125°CParameter Symbol Min.Max.Units Conditions High level input voltage V IH 2.0V CC +1V(Note 2)Low level input voltage V IL-0.30.8VLow level output voltage V OL—0.4V I OL = 2.1 mA; V CC = 4.5V High level output voltage V OH 2.4—V I OH = -400 µA; V CC = 4.5V Input leakage current I LI-1010µA V IN = V SS to V CCOutput leakage current I LO-1010µA V OUT = V SS to V CCPin capacitance (all inputs/outputs)C IN, C OUT—7pFV IN/V OUT = 0 V (Notes 1 & 2)T amb = +25°C, F CLK = 1 MHz I CC read — 1 mAOperating current I CC write— 1.5mAStandby current I CCS—1µA CS = V SSClock frequency F CLK—2MHz V CC = 4.5VClock high time T CKH250—nsClock low time T CKL250—nsChip select setup time T CSS50—ns Relative to CLK Chip select hold time T CSH0—ns Relative to CLK Chip select low time T CSL250—nsData input setup time T DIS100—ns Relative to CLK Data input hold time T DIH100—ns Relative to CLK Data output delay time T PD—400ns C L = 100 pFData output disable time T CZ—100ns C L = 100 pF (Note 2) Status valid time T SV—500ns C L = 100 pFProgram cycle time T WC—2ms ERASE/WRITE mode T EC—6ms ERAL modeT WL—15ms WRAL modeEndurance—1M—cycles25°C, V CC = 5.0V, Block Mode (Note 3) Note 1:This parameter is tested at Tamb = 25°C and F CLK = 1 MHz.2:This parameter is periodically sampled and not 100% tested.3:This application is not tested but guaranteed by characterization. For endurance estimates in a specific appli-cation, please consult the T otal Endurance Model which may be obtained on Microchip’s BBS or website.93C46B2.0PIN DESCRIPTION2.1Chip Select (CS)A high level selects the device; a low level deselects the device and forces it into standby mode. However, a pro-gramming cycle which is already in progress will be completed, regardless of the Chip Select (CS) input signal. If CS is brought low during a program cycle, the device will go into standby mode as soon as the pro-gramming cycle is completed.CS must be low for 250 ns minimum (T CSL ) between consecutive instructions. If CS is low, the internal con-trol logic is held in a RESET status.2.2Serial Clock (CLK)The Serial Clock (CLK) is used to synchronize the com-munication between a master device and the 93C46B.Opcodes, addresses, and data bits are clocked in on the positive edge of CLK. Data bits are also clocked out on the positive edge of CLK.CLK can be stopped anywhere in the transmission sequence (at high or low level) and can be continued anytime with respect to clock high time (T CKH ) and clock low time (TCKL ). This gives the controlling master freedom in preparing the opcode, address, and data.CLK is a “Don't Care” if CS is low (device deselected).If CS is high, but ST ART condition has not been detected, any number of clock cycles can be received by the device, without changing its status (i.e., waiting for a ST ART condition).CLK cycles are not required during the self-timed WRITE (i.e., auto ERASE/WRITE) cycle.After detecting a ST ART condition, the specified num-ber of clock cycles (respectively low to high transitions of CLK) must be provided. These clock cycles are required to clock in all required opcodes, addresses,and data bits before an instruction is executed (T able 2-1). CLK and DI then become don't care inputs waiting for a new ST ART condition to be detected. 2.3Data In (DI)Data In (DI) is used to clock in a ST ART bit, opcode,address, and data synchronously with the CLK input.2.4Data Out (DO)Data Out (DO) is used in the READ mode to output data synchronously with the CLK input (T PD after the posi-tive edge of CLK).This pin also provides READY/BUSY status information during ERASE and WRITE cycles. READY/BUSY sta-tus information is available on the DO pin if CS is brought high after being low for minimum chip select low time (T CSL ) and an ERASE or WRITE operation has been initiated.The status signal is not available on DO, if CS is held low during the entire ERASE or WRITE cycle. In this case, DO is in the HIGH-Z mode. If status is checked after the ERASE/WRITE cycle, the data line will be high to indicate the device is ready.TABLE 2-1INSTRUCTION SET FOR 93C46BInstruction SBOpcodeAddressData InData OutReq. CLK CyclesERASE 111A5A4A3A2A1A0—(RDY/BSY)9ERAL 10010X X X X —(RDY/BSY)9EWDS 10000X X X X —HIGH-Z 9EWEN 10011X X X X —HIGH-Z 9READ 110A5A4A3A2A1A0—D15 - D025WRITE 101A5A4A3A2A1A0D15 - D0(RDY/BSY)25WRAL1001XXXXD15 - D0(RDY/BSY)2593C46B3.0FUNCTIONAL DESCRIPTIONInstructions, addresses and write data are clocked into the DI pin on the rising edge of the clock (CLK). The DO pin is normally held in a HIGH-Z state except when reading data from the device, or when checking the READY/BUSY status during a programming operation.The READY/BUSY status can be verified during an ERASE/WRITE operation by polling the DO pin; DO low indicates that programming is still in progress, while DO high indicates the device is ready. The DO will enter the HIGH-Z state on the falling edge of the CS.3.1START ConditionThe ST ART bit is detected by the device if CS and DI are both high with respect to the positive edge of CLK for the first time.Before a ST ART condition is detected, CS, CLK, and DI may change in any combination (except to that of a ST ART condition), without resulting in any device oper-ation (ERASE, ERAL, EWDS, EWEN, READ, WRITE,and WRAL). As soon as CS is high, the device is no longer in the standby mode.An instruction following a START condition will only be executed if the required amount of opcodes,addresses, and data bits for any particular instruction is clocked in.After execution of an instruction (i.e., clock in or out of the last required address or data bit) CLK and DI become don't care bits until a new ST ART condition is detected.3.2Data In (DI) and Data Out (DO)It is possible to connect the Data In (DI)and Data Out (DO) pins together. However, with this configuration, if A0 is a logic-high level, it is possible for a “bus conflict”to occur during the “dummy zero” that precedes the READ operation. Under such a condition, the voltage level seen at DO is undefined and will depend upon the relative impedances of DO and the signal source driv-ing A0. The higher the current sourcing capability of A0,the higher the voltage at the DO pin.3.3Data ProtectionDuring power-up, all programming modes of operation are inhibited until Vcc has reached a level greater than 3.8V . During power-down, the source data protection circuitry acts to inhibit all programming modes when Vcc has fallen below 3.8V at nominal conditions.The ERASE/SRITE Disable (EWDS) and ERASE/WRITE Enable (EWEN) commands give additional pro-tection against accidental programming during normal operation.After power-up, the device is automatically in the EWDS mode. Therefore, an EWEN instruction must be performed before any ERASE or WRITE instruction can be executed.93C46B3.4ERASEThe ERASE instruction forces all data bits of the spec-ified address to the logical “1” state. This cycle begins on the rising clock edge of the last address bit.The DO pin indicates the READY/BUSY status of the device if CS is brought high after a minimum of 250 ns low (T CSL ). DO at logical “0” indicates that program-ming is still in progress. DO at logical “1” indicates that the register at the specified address has been erased and the device is ready for another instruction.3.5Erase All (ERAL)The Erase All (ERAL) instruction will erase the entire memory array to the logical “1” state. The ERAL cycle is identical to the ERASE cycle, except for the different opcode. The ERAL cycle is completely self-timed and commences at the rising clock edge of the last address bit. Clocking of the CLK pin is not necessary after the device has entered the ERAL cycle.The DO pin indicates the READY/BUSY status of the device, if CS is brought high after a minimum of 250 ns low (T CSL ) and before the entire ERAL cycle is complete.93C46B3.6ERASE/WRITE Disable and Enable (EWDS/EWEN)The device powers up in the ERASE/WRITE Disable (EWDS) state. All programming modes must be pre-ceded by an Erase/Write Enable (EWEN) instruction.Once the EWEN instruction is executed, programming remains enabled until an EWDS instruction is executed or Vcc is removed from the device. T o protect against accidental data disturbance, the EWDS instruction can be used to disable all ERASE/WRITE functions and should follow all programming operations. Execution of a READ instruction is independent of both the EWDS and EWEN instructions.3.7READThe READ instruction outputs the serial data of the addressed memory location on the DO pin. A dummy zero bit precedes the 16-bit output string. The output data bits will toggle on the rising edge of the CLK and are stable after the specified time delay (T PD ). Sequen-tial read is possible when CS is held high. The memory data will automatically cycle to the next register and output sequentially.FIGURE 3-6:READ TIMINGCSCLKDIDO110An•••A0HIGH-Z0Dx •••D0Dx •••D0•••Dx D093C46B3.8WRITEThe WRITE instruction is followed by 16 bits of data,which are written into the specified address. After the last data bit is clocked into the DI pin, the self-timed auto-erase and programming cycle begins.The DO pin indicates the READY/BUSY status of the device, if CS is brought high after a minimum of 250 ns low (T CSL ) and before the entire write cycle is complete.DO at logical “0” indicates that programming is still in progress. DO at logical “1” indicates that the register at the specified address has been written with the data specified and the device is ready for another instruc-tion.3.9Write All (WRAL)The Write All (WRAL) instruction will write the entire memory array with the data specified in the command.The WRAL cycle is completely self-timed and com-mences at the rising clock edge of the last data bit.Clocking of the CLK pin is not necessary after the device has entered the WRAL cycle. The WRAL com-mand does include an automatic ERAL cycle for the device. Therefore, the WRAL instruction does not require an ERAL instruction, but the chip must be in the EWEN status.The DO pin indicates the READY/BUSY status of the device if CS is brought high after a minimum of 250 ns low (T CSL ).93C46BNOTES:93C46BNOTES:93C46BNOTES:93C46B93C46B PRODUCT IDENTIFICATION SYSTEMT o order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office.Sales and SupportData SheetsProducts supported by a preliminary Data Sheet may have an errata sheet describing minor operational differences and recom-mended workarounds. To determine if an errata sheet exists for a particular device, please contact one of the following:1.Y our local Microchip sales office.2.The Microchip Corporate Literature Center U.S. FAX: (602) 786-7277.3.The Microchip’s Bulletin Board, via your local CompuServe number (CompuServe membership NOT required).AMERICASCorporate OfficeMicrochip Technology Inc.2355 West Chandler Blvd.Chandler, AZ 85224-6199Tel: 602-786-7200 Fax: 602-786-7277 Technical Support: 602 786-7627 Web: AtlantaMicrochip T echnology Inc.500 Sugar Mill Road, Suite 200B Atlanta, GA 30350Tel: 770-640-0034 Fax: 770-640-0307BostonMicrochip Technology Inc.5 Mount Royal Avenue Marlborough, MA 01752T el: 508-480-9990 Fax: 508-480-8575ChicagoMicrochip Technology Inc.333 Pierce Road, Suite 180Itasca, IL 60143Tel: 630-285-0071 Fax: 630-285-0075DallasMicrochip T echnology Inc.14651 Dallas Parkway, Suite 816Dallas, TX 75240-8809Tel: 972-991-7177 Fax: 972-991-8588DaytonMicrochip T echnology Inc.Two Prestige Place, Suite 150Miamisburg, OH 45342Tel: 937-291-1654 Fax: 937-291-9175Los AngelesMicrochip Technology Inc.18201 Von Karman, Suite 1090Irvine, CA 92612Tel: 714-263-1888 Fax: 714-263-1338New YorkMicrochip T echnology Inc.150 Motor Parkway, Suite 416Hauppauge, NY 11788T el: 516-273-5305 Fax: 516-273-5335San JoseMicrochip Technology Inc.2107 North First Street, Suite 590San Jose, CA 95131T el: 408-436-7950 Fax: 408-436-7955TorontoMicrochip Technology Inc.5925 Airport Road, Suite 200Mississauga, Ontario L4V 1W1, Canada Tel: 905-405-6279 Fax: 905-405-6253ASIA/PACIFICHong KongMicrochip Asia Pacific RM 3801B, Tower T wo Metroplaza223 Hing Fong RoadKwai Fong, N.T., Hong KongTel: 852-2-401-1200 Fax: 852-2-401-3431IndiaMicrochip Technology India No. 6, Legacy, Convent Road Bangalore 560 025, IndiaT el: 91-80-229-0061 Fax: 91-80-229-0062KoreaMicrochip Technology Korea 168-1, Y oungbo Bldg. 3 Floor Samsung-Dong, Kangnam-Ku Seoul, KoreaTel: 82-2-554-7200 Fax: 82-2-558-5934ShanghaiMicrochip TechnologyRM 406 Shanghai Golden Bridge Bldg.2077 Y an’an Road West, Hongiao District Shanghai, PRC 200335T el: 86-21-6275-5700 Fax: 86 21-6275-5060SingaporeMicrochip T echnology Taiwan Singapore Branch 200 Middle Road #10-03 Prime Centre Singapore 188980T el: 65-334-8870 Fax: 65-334-8850Taiwan, R.O.CMicrochip Technology Taiwan 10F-1C 207Tung Hua North Road Taipei, Taiwan, ROCT el: 886 2-717-7175 Fax: 886-2-545-0139EUROPEUnited KingdomArizona Microchip Technology Ltd.Unit 6, The CourtyardMeadow Bank, Furlong RoadBourne End, Buckinghamshire SL8 5AJ Tel: 44-1628-851077 Fax: 44-1628-850259FranceArizona Microchip Technology SARL Zone Industrielle de la Bonde 2 Rue du Buisson aux Fraises 91300 Massy, FranceTel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79GermanyArizona Microchip Technology GmbH Gustav-Heinemann-Ring 125D-81739 Müchen, GermanyTel: 49-89-627-144 0 Fax: 49-89-627-144-44ItalyArizona Microchip Technology SRL Centro Direzionale Colleone Palazzo Taurus 1 V . Le Colleoni 120041 Agrate Brianza Milan, ItalyTel: 39-39-6899939 Fax: 39-39-6899883JAPANMicrochip Technology Intl. Inc.Benex S-1 6F3-18-20, Shin Y okohama Kohoku-Ku, Y okohama Kanagawa 222 JapanTel: 81-4-5471- 6166 Fax: 81-4-5471-61225/8/97Printed on recycled paper.。