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

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

?? sst39vf200a.txt

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

39VF200A
2 Mbit Multi-Purpose Flash

September 2001


ABOUT THE SOFTWARE
This application note provides software driver examples for 39VF200A 2 Mbit 
Multi-Purpose Flash, that can be used in any microprocessor based system.  
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 39VF200A

Companion product datasheet for the 39VF200A 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_39VF200       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 39VF200A 2 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 39VF200A */
#define BLOCK_SIZE              32768   /* Must be 32K words for 39VF200A  */

#define SST_ID                  0x00BF  /* SST Manufacturer's ID code   */
#define SST_39VF200             0x2789  /* SST39VF200A device code      */

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_39VF200                                       */
/*                                                                      */
/* This procedure decides whether a physical hardware device has a      */
/* SST39VF200A 2 Mbit Multi-Purpose Flash installed or not.             */
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          return TRUE:  indicates a SST39VF200A                       */
/*          return FALSE: indicates not a SST39VF200A                   */
/************************************************************************/

int Check_SST_39VF200()
{
        WORD far *Temp;
        WORD SST_id1;
        WORD far *Temp1;
        WORD SST_id2;
        int  ReturnStatus;

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

        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 39VF200A */

        Temp  = (WORD far *)0xC0000000; /* set up address to be C000:0000h */
        SST_id1  =  *Temp;              /* get first ID word               */
        SST_id1  =  SST_id1 & 0xFF;     /* mask off 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 SST39VF200A installed or not */

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

        /* Issue the SofTware Product ID Exit code thus returning the 39VF200A */
        /* 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 39VF200A   */

        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 39VF200A  */
        /* 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 39VF200A  */

        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 39VF200A  */

        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 39VF200A  */

        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        */
/* 39VF200A.                                                            */
/*                                                                      */
/* NOTE:  It is necessary to first erase the sector containing the      */
/*        word to be programmed.                                	*/
/*                                                                      */
/* Input:                                                               */
/*           Src     The WORD which will be written to the 39VF200A     */
/*           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: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 = 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一区二区三区免费野_久草精品视频
aaa亚洲精品| www一区二区| 国产欧美综合在线观看第十页| 成人一区二区三区在线观看| 久久精品国产色蜜蜜麻豆| 91污在线观看| 久久亚洲精华国产精华液 | 国产欧美精品日韩区二区麻豆天美| 日韩亚洲欧美在线| 亚洲精品免费在线观看| 亚洲免费观看在线视频| 国产乱码精品1区2区3区| 欧美日韩成人一区| 亚洲桃色在线一区| 国产高清精品网站| 99在线视频精品| 精品国产伦一区二区三区观看方式| 日韩欧美综合一区| 日韩激情一区二区| 色综合一个色综合| 国产精品久久久久久久久免费桃花| 亚洲精品免费一二三区| 国产成人鲁色资源国产91色综 | 一区二区久久久久| 成a人片国产精品| 国产日韩欧美a| 国产在线看一区| 精品sm在线观看| 精品无人区卡一卡二卡三乱码免费卡| 国产麻豆精品theporn| 欧美一区二区视频观看视频| 五月婷婷激情综合| 欧美三级视频在线观看| 亚洲一区二区三区自拍| 久久精品国产99久久6| 欧美一区永久视频免费观看| 亚洲综合在线第一页| 欧美性大战xxxxx久久久| 亚洲黄色在线视频| 欧美在线你懂得| 亚洲成人先锋电影| 日韩欧美亚洲国产另类| 狠狠色丁香婷婷综合| 国产午夜精品久久久久久久| 成人在线一区二区三区| 欧美激情一区二区| 99re这里只有精品视频首页| 一区二区三区在线视频观看58| 久久66热re国产| 2023国产精品| 丝袜脚交一区二区| 精品欧美一区二区久久| 国产69精品久久99不卡| 欧美日韩亚州综合| 老鸭窝一区二区久久精品| 精品久久一区二区| 丝袜a∨在线一区二区三区不卡| 国产电影一区在线| 亚洲欧洲在线观看av| 精品一区二区三区免费观看 | 国产精品乱码人人做人人爱| 91福利在线观看| 日韩av一级片| 欧美国产日韩一二三区| 91福利国产成人精品照片| 国产女人水真多18毛片18精品视频| 亚洲第一主播视频| 精品国产不卡一区二区三区| 91在线视频免费观看| 日本欧美一区二区三区乱码| 久久久久久免费| 欧美系列日韩一区| 国产白丝网站精品污在线入口| 欧美电视剧在线观看完整版| www.一区二区| 日韩电影在线免费看| 中文字幕不卡在线| 日韩视频一区二区三区在线播放| 亚洲第一在线综合网站| 欧美精品一区二区三区蜜桃视频 | 中文子幕无线码一区tr| 欧美三级乱人伦电影| 国产在线国偷精品产拍免费yy| 精品国产乱码久久久久久久| 91网站在线播放| 最新热久久免费视频| 日韩精品一区二区三区视频| 欧美综合一区二区| 国产福利91精品| 麻豆专区一区二区三区四区五区| 欧美一激情一区二区三区| 成人网在线播放| 久久机这里只有精品| 亚洲图片有声小说| 国产精品久久久久久久第一福利| 国产69精品久久99不卡| 蓝色福利精品导航| 日本一区二区综合亚洲| 色久综合一二码| 国产一区二区看久久| 视频一区在线播放| 日本道在线观看一区二区| 国产麻豆精品一区二区| 久久国产尿小便嘘嘘尿| 一区二区三区国产| 亚洲欧美另类久久久精品 | 一本久久a久久精品亚洲| 国产一区二区看久久| 国产精品美女久久久久久2018| www.综合网.com| 国产精品亚洲а∨天堂免在线| 亚洲色图欧美偷拍| 亚洲国产精品成人综合色在线婷婷 | 免费精品视频在线| 久久免费精品国产久精品久久久久| 国产黄色91视频| 激情小说亚洲一区| 国精产品一区一区三区mba视频 | 亚洲一区二区三区爽爽爽爽爽| 91精品国产欧美一区二区18| 欧美日韩国产另类不卡| 欧美裸体一区二区三区| 欧美日韩你懂得| 欧美高清激情brazzers| 国产精品1区2区| 亚洲成人7777| 美日韩一级片在线观看| 国内欧美视频一区二区| 亚洲一区在线观看网站| 亚洲一区二区av在线| 午夜精品久久久久久| 美女一区二区久久| 国产盗摄女厕一区二区三区| 国产69精品久久99不卡| 9l国产精品久久久久麻豆| 精品系列免费在线观看| 国产成人av一区二区| 91视频在线观看| 欧美日韩一区二区三区四区 | 国精产品一区一区三区mba视频| 综合欧美亚洲日本| 亚洲午夜在线视频| 美腿丝袜一区二区三区| av电影一区二区| 欧美系列亚洲系列| 精品1区2区在线观看| 亚洲图片你懂的| 日本一区二区三区在线不卡| 日韩美女啊v在线免费观看| 亚洲成人免费在线观看| 国产美女精品人人做人人爽| www.久久久久久久久| 欧美丰满一区二区免费视频| 一本大道久久a久久综合婷婷| 国产精品一区专区| 欧美性色综合网| 久久嫩草精品久久久精品| 亚洲乱码国产乱码精品精98午夜 | 亚洲精品视频一区| 麻豆91在线观看| 99精品欧美一区二区三区小说| 国产一区二区三区精品视频| 欧美午夜精品一区二区蜜桃 | 国产福利一区二区| 欧美丝袜丝交足nylons图片| 欧美视频精品在线| 国产日韩精品一区二区三区 | 欧美日本在线看| 国产精品入口麻豆九色| 轻轻草成人在线| 久久激情五月婷婷| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 色88888久久久久久影院野外| 91国产免费看| 亚洲国产精华液网站w| 男女男精品视频网| 欧美视频一区在线观看| 中文字幕一区二区不卡| 亚洲蜜臀av乱码久久精品蜜桃| 亚洲国产综合人成综合网站| 成人午夜精品在线| 在线日韩一区二区| 亚洲欧美综合网| 国产成人在线电影| 久久综合九色综合97婷婷女人| 国产精品美女视频| 亚洲一区二区在线免费观看视频| 秋霞影院一区二区| 欧美日韩亚洲高清一区二区| 伊人夜夜躁av伊人久久| gogo大胆日本视频一区| 国产精品区一区二区三区| 久久黄色级2电影| 日韩一二三区视频| 日本va欧美va精品发布| 欧美一区二区三区小说| 日本大胆欧美人术艺术动态| 欧美巨大另类极品videosbest | 成人免费av资源| 国产三级精品三级|