亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sst39vf400a.txt

?? SST 系列Nor flash 的讀寫源碼
?? TXT
?? 第 1 頁 / 共 3 頁
字號:
Software
Drivers

39VF400A
4 Mbit Multi-Purpose Flash

September 2001


ABOUT THE SOFTWARE

This application note provides software driver examples for 39VF400A 4 Mbit 
Multi-Purpose Flash, that can be used in any microprocessor based system. 
Please note that the software driver for 39VF400A is the same as the driver 
for 39VF400 except the part number has been changed. Software driver examples 
used in this document utilize two programming languages: (a) high -level "C" 
for broad platform support and (b) optimized x86 assembly language. In many 
cases, software driver routines can be inserted "as is" into the main body of 
code being developed by the system software developers. Extensive comments 
are included in each routine to describe the function of each routine. The 
driver in "C" language can be used with many microprocessors and
microcontrollers, while the x86 assembly language provides an optimized solution
for x86 microprocessors. A Code Segment base address equal to C000h was used in
this sample code.  Software designers shall assign the segment address
appropriate to their designs.

ABOUT THE 39VF400A

Companion product datasheet for the 39VF400A should be reviewed in conjunction 
with this application note for a complete understanding of the device.

Both the C and x86 assembly code in the document contain the following routines,
in this order:

Name                    Function
------------------------------------------------------------------
Check_SST_39VF400A      Check manufacturer and device ID
CFI_Query               CFI Query Entry/Exit command sequence
Erase_One_Sector        Erase a sector of 2048 words
Erase_One_Block         Erase a block of 32K words
Erase_Entire_Chip       Erase the contents of the entire chip
Program_One_Word        Alter data in one word
Program_One_Sector      Alter data in 2048 word sector
Program_One_Block       Alter data in 32K word block
Check_Toggle_Ready      End of internal program or erase detection using
                        Toggle bit
Check_Data_Polling      End of internal program or erase detection using
                        Data# polling


"C" LANGUAGE DRIVERS

/***********************************************************************/
/* Copyright Silicon Storage Technology, Inc. (SST), 1994-2001         */
/* Example "C" language Driver of 39VF400A 4 Mbit Multi-Purpose Flash  */
/* Nelson Wang, Silicon Storage Technology, Inc.                       */
/*                                                                     */
/* Revision 1.0, Sept. 12, 2001                                     */
/*                                                                     */
/* This file requires these external "timing"  routines:               */
/*                                                                     */
/*      1.)  Delay_150_Nano_Seconds                                    */
/*      2.)  Delay_25_Milli_Seconds                                    */
/*      3.)  Delay_100_Milli_Seconds                                   */
/***********************************************************************/

#define FALSE                   0
#define TRUE                    1

#define SECTOR_SIZE             2048    /* Must be 2048 words for 39VF400A */
#define BLOCK_SIZE              32768   /* Must be 32K words for 39VF400A  */

#define SST_ID                  0x00BF  /* SST Manufacturer's ID code   */
#define SST_39VF400A            0x2780  /* SST39VF400A device code      */
                                        /* same device code as SST39VF400 */

typedef unsigned char           BYTE;
typedef unsigned int            WORD;

/* -------------------------------------------------------------------- */
/*                       EXTERNAL ROUTINES                              */
/* -------------------------------------------------------------------- */

extern void     Delay_150_Nano_Seconds();
extern void     Delay_25_Milli_Seconds();
extern void     Delay_100_Milli_Seconds();


/************************************************************************/
/* PROCEDURE:   Check_SST_39VF400A                                      */
/*                                                                      */
/* This procedure decides whether a physical hardware device has a      */
/* SST39VF400A 4 Mbit Multi-Purpose Flash installed or not.             */
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          return TRUE:  indicates a SST39VF400A                       */
/*          return FALSE: indicates not a SST39VF400A                   */
/************************************************************************/

int Check_SST_39VF400A()              /* same device code as SST39VF400 */
{
        WORD far *Temp;
        WORD SST_id1;
        WORD far *Temp1;
        WORD SST_id2;
        int  ReturnStatus;

        /*  Issue the Software Product ID code to 39VF400A   */

        Temp1 = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp1= 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp1 = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp1= 0x5555;                 /* write data 0x5555 to the address */
        Temp1 = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp1= 0x9090;                 /* write data 0x9090 to the address */

        Delay_150_Nano_Seconds();       /* insert delay time = Tida         */

        /* Read the product ID from 39VF400A */

        Temp  = (WORD far *)0xC0000000; /* set up address to be C000:0000h */
        SST_id1  =  *Temp;              /* get first ID word               */
        SST_id1  =  SST_id1 & 0xFF;     /* mask of higher byte             */
        Temp1 = (WORD far *)0xC0000001; /* set up address to be C000:0001h */
        SST_id2  =  *Temp1;             /* get second ID word              */

        /* Determine whether there is a SST39VF400A installed or not */

        if ((SST_id1 == SST_ID) && (SST_id2 ==SST_39VF400A))
                ReturnStatus = TRUE;
        else
                ReturnStatus = FALSE;

        /* Issue the Soffware Product ID Exit code thus returning the 39VF400A*/
        /* to the read operating mode                                         */

        Temp1  = (WORD far *)0xC0005555; /* set up address to be C000:5555h   */
        *Temp1 = 0xAAAA;                 /* write data 0xAAAA to the address  */
        Temp1  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh   */
        *Temp1 = 0x5555;                 /* write data 0x5555 to the address  */
        Temp1  = (WORD far *)0xC0005555; /* set up address to be C000:5555h   */
        *Temp1 = 0xF0F0;                 /* write data 0xF0F0 to the address  */

        Delay_150_Nano_Seconds();        /* insert delay time = Tida          */

        return(ReturnStatus);
}


/************************************************************************/
/* PROCEDURE:   CFI_Query                                               */
/*                                                                      */
/* This procedure should be used to query for CFI information           */
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          None                                                        */
/************************************************************************/

int CFI_Query()
{
        WORD far *Temp1;

        /*  Issue the Software Product ID code to 39VF400A   */

        Temp1 = (WORD far *)0xC0005555; /* set up address to be C000:5555h    */
        *Temp1= 0xAAAA;                 /* write data 0xAAAA to the address   */
        Temp1 = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh    */
        *Temp1= 0x5555;                 /* write data 0x5555 to the address   */
        Temp1 = (WORD far *)0xC0005555; /* set up address to be C000:5555h    */
        *Temp1= 0x9898;                 /* write data 0x9898 to the address   */

        Delay_150_Nano_Seconds();       /* insert delay time = Tida           */

        /* --------------------------------- */
        /*  Perform all CFI operations here  */
        /*  NOTE:  no sample code provided   */
        /* --------------------------------- */


        /* Issue the CFI Exit code thus returning the 39VF400A */
        /* to the read operating mode                          */

        Temp1  = (WORD far *)0xC0005555; /* set up address to be C000:5555h   */
        *Temp1 = 0xAAAA;                 /* write data 0xAAAA to the address  */
        Temp1  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh   */
        *Temp1 = 0x5555;                 /* write data 0x5555 to the address  */
        Temp1  = (WORD far *)0xC0005555; /* set up address to be C000:5555h   */
        *Temp1 = 0xF0F0;                 /* write data 0xF0F0 to the address  */

        Delay_150_Nano_Seconds();        /* insert delay time = Tida          */
}


/************************************************************************/
/* PROCEDURE:   Erase_One_Sector                                        */
/*                                                                      */
/* This procedure can be used to erase a total of 2048 words.           */
/*                                                                      */
/* Input:                                                               */
/*      Dst     DESTINATION address where the erase operation starts    */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

int Erase_One_Sector (WORD far *Dst)
{
        WORD far *Temp;

        /*  Issue the Sector Erase command to 39VF400A  */

        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0x8080;                 /* write data 0x8080 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */

        Temp  = Dst;                  /* set up starting address to be erased */
        *Temp = 0x3030;                 /* write data 0x3030 to the address */
        Delay_25_Milli_Seconds();       /* Delay time = Tse                 */
}


/************************************************************************/
/* PROCEDURE:   Erase_One_Block                                         */
/*                                                                      */
/* This procedure can be used to erase a total of 32K words.            */
/*                                                                      */
/* Input:                                                               */
/*      Dst     DESTINATION address where the erase operation starts    */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

int Erase_One_Block (WORD far *Dst)
{
        WORD far *Temp;

        /*  Issue the Sector Erase command to 39VF400A  */

        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0x8080;                 /* write data 0x8080 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */

        Temp  = Dst;                  /* set up starting address to be erased */
        *Temp = 0x5050;                 /* write data 0x5050 to the address */
        Delay_25_Milli_Seconds();       /* Delay time = Tbe                 */
}


/************************************************************************/
/* PROCEDURE:   Erase_Entire_Chip                                       */
/*                                                                      */
/* This procedure can be used to erase the entire chip.                 */
/*                                                                      */
/* Input:                                                               */
/*      NONE                                                            */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

int Erase_Entire_Chip()
{
        WORD far *Temp;

        /*  Issue the Chip Erase command to 39VF400A  */

        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0x8080;                 /* write data 0x8080 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp  = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp  = (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0x1010;                 /* write data 0x1010 to the address */
        Delay_100_Milli_Seconds();      /* Delay Tsce time                  */
}


/************************************************************************/
/* PROCEDURE:   Program_One_Word                                        */
/*                                                                      */
/* This procedure can be used to program ONE word of data to the        */
/* 39VF400.                                                             */
/*                                                                      */
/* NOTE:  It is necessary to first erase the sector containing the      */
/*        word to be programmed.                                			*/
/*                                                                      */
/* Input:                                                               */
/*           SrcWord The WORD which will be written to the 39VF400A     */
/*           Dst     DESTINATION address which will be written with the */
/*                   data passed in from Src                            */
/*                                                                      */
/* Output:                                                              */
/*           None                                                       */
/************************************************************************/

void Program_One_Word (WORD SrcWord,    WORD far *Dst)
{
	WORD far *Temp;
        WORD far *SourceBuf;
        WORD far *DestBuf;
        int Index;

        DestBuf = Dst;

        Temp =  (WORD far *)0xC0005555; /* set up address to be C000:555h   */
        *Temp = 0xAAAA;                 /* write data 0xAAAA to the address */
        Temp =  (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh  */
        *Temp = 0x5555;                 /* write data 0x5555 to the address */
        Temp =  (WORD far *)0xC0005555; /* set up address to be C000:5555h  */
        *Temp = 0xA0A0;                 /* write data 0xA0A0 to the address */
        *DestBuf = SrcWord;             /* transfer the byte to destination */
        Check_Toggle_Ready(DestBuf);    /* wait for TOGGLE bit to get ready */
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲成人精品av97| 欧美日韩不卡一区二区| 久久色视频免费观看| 精品一区二区久久| 26uuu精品一区二区三区四区在线| 狠狠色丁香婷婷综合| 久久久久久一级片| 91丨九色丨蝌蚪丨老版| 亚洲一区视频在线观看视频| 欧美日韩高清一区二区不卡| 热久久一区二区| 日韩你懂的在线播放| 国产成人夜色高潮福利影视| 亚洲人123区| 51精品国自产在线| 国产毛片精品一区| 亚洲欧美在线视频| 欧美精品第1页| 成人开心网精品视频| 亚洲一区二区精品久久av| 欧美一级精品在线| www.亚洲精品| 日韩电影在线观看电影| 久久综合九色综合久久久精品综合| 成人av在线资源网站| 亚洲高清免费观看 | 91免费视频大全| 性欧美疯狂xxxxbbbb| 久久影音资源网| 99久久国产综合精品麻豆| 美女视频黄 久久| 亚洲精选视频在线| 久久夜色精品一区| 欧美日韩一区 二区 三区 久久精品| 国产伦精品一区二区三区免费| 亚洲精品成人悠悠色影视| 欧美一区二区在线看| 99精品热视频| 国模大尺度一区二区三区| 亚洲男人的天堂在线观看| 精品国产凹凸成av人导航| 色老头久久综合| 国产91富婆露脸刺激对白| 亚洲va欧美va国产va天堂影院| 国产亚洲精品资源在线26u| 欧美日韩国产色站一区二区三区| 国产色婷婷亚洲99精品小说| 宅男在线国产精品| 91视频精品在这里| 国产精品一区二区三区四区| 视频一区免费在线观看| 综合自拍亚洲综合图不卡区| 日韩视频不卡中文| 欧美日韩一区二区三区在线| av影院午夜一区| 国产一区二区三区不卡在线观看| 无吗不卡中文字幕| 一区二区三区欧美日| 国产精品久久久久久久久久免费看 | 亚洲日本va午夜在线影院| 精品国产伦一区二区三区免费 | 99在线热播精品免费| 麻豆91在线观看| 日韩综合小视频| 亚洲va在线va天堂| 亚洲图片欧美色图| 亚洲精品国产品国语在线app| 中文av字幕一区| 国产午夜精品一区二区三区视频| 日韩欧美一区在线观看| 91精品国产一区二区| 欧美欧美欧美欧美首页| 欧美日韩一区二区三区四区五区| 日本高清不卡在线观看| 色综合天天综合| 91麻豆自制传媒国产之光| 97久久精品人人做人人爽50路| 成人性生交大合| 成人av网站在线| jizz一区二区| 91视频com| 在线观看欧美黄色| 欧美撒尿777hd撒尿| 欧美日韩你懂得| 7777精品伊人久久久大香线蕉经典版下载 | 美女脱光内衣内裤视频久久影院| 午夜国产不卡在线观看视频| 亚洲成人av福利| 亚洲高清视频在线| 三级久久三级久久| 久久精品国产在热久久| 久久国产精品色婷婷| 狠狠色狠狠色综合日日91app| 国产伦精品一区二区三区视频青涩 | 国产欧美日韩精品在线| 国产日韩精品视频一区| 国产精品久久久久久久久晋中| 国产精品福利在线播放| 亚洲人成伊人成综合网小说| 亚洲线精品一区二区三区八戒| 日韩福利电影在线| 激情五月婷婷综合| jizz一区二区| 91精品综合久久久久久| 精品国产一区二区三区久久影院| 亚洲国产成人一区二区三区| 亚洲精品伦理在线| 日韩**一区毛片| 国产v日产∨综合v精品视频| 一本到高清视频免费精品| 欧美日本一区二区| 久久久久一区二区三区四区| 一区二区三区四区在线免费观看 | 亚洲柠檬福利资源导航| 五月开心婷婷久久| 国产成人免费9x9x人网站视频| 色综合久久久久综合| 欧美一区二区黄| 日韩美女视频19| 久久99国产精品免费网站| 成人精品高清在线| 日韩一区二区三区四区五区六区| 国产精品欧美精品| 日本在线不卡视频一二三区| 成人av在线一区二区| 欧美日韩国产精选| 国产精品久久久久婷婷| 免费人成精品欧美精品| 99免费精品视频| 精品国产一区二区三区av性色| 自拍偷拍亚洲激情| 国产乱码精品一区二区三区av | 99国产精品99久久久久久| 制服丝袜国产精品| 亚洲欧洲无码一区二区三区| 美女一区二区视频| 欧美色视频在线观看| 国产精品久久毛片av大全日韩| 日韩电影在线观看网站| 91国产丝袜在线播放| 中文欧美字幕免费| 激情文学综合插| 欧美日本在线一区| 一区二区三区精品久久久| 懂色一区二区三区免费观看| 日韩欧美美女一区二区三区| 亚洲成人精品影院| 欧美日韩国产a| 一区二区三区在线播| 不卡影院免费观看| 国产午夜精品一区二区三区嫩草 | 欧美精品电影在线播放| 一区二区三区美女视频| 不卡区在线中文字幕| 国产亚洲欧洲997久久综合 | 日韩一区二区电影网| 亚洲一区二区偷拍精品| 99天天综合性| 国产精品午夜在线| 成人性视频免费网站| 国产亚洲精品免费| 国产精品2024| 国产日韩视频一区二区三区| 国产美女精品人人做人人爽 | 国产成人精品在线看| 精品va天堂亚洲国产| 久久国产麻豆精品| 精品精品国产高清a毛片牛牛| 日本不卡123| 日韩欧美你懂的| 国产一区二区视频在线播放| 精品对白一区国产伦| 国产一区二区三区| 欧美激情一区不卡| voyeur盗摄精品| 亚洲三级电影全部在线观看高清| www.一区二区| 亚洲男同1069视频| 欧美亚洲动漫精品| 天堂成人国产精品一区| 欧美一区二区三区在| 激情图片小说一区| 国产精品久久久久婷婷二区次| 91在线国内视频| 性欧美疯狂xxxxbbbb| 日韩免费福利电影在线观看| 国产精品一区二区免费不卡| 中文字幕第一区第二区| 色综合av在线| 三级精品在线观看| 久久色视频免费观看| 91在线一区二区三区| 午夜不卡av免费| 精品国产免费视频| 91一区一区三区| 青青草视频一区| 五月激情六月综合| 欧美大片免费久久精品三p| 国产成人亚洲精品狼色在线| 成人免费在线视频观看|