亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
韩国成人在线视频| 亚洲精品国产成人久久av盗摄| 久久精品无码一区二区三区| 国产精品免费丝袜| 一区二区在线电影| 免费在线观看不卡| 成人小视频免费在线观看| 欧美三级电影网| 国产婷婷色一区二区三区| 亚洲欧洲精品一区二区三区| 日本视频在线一区| 国产99精品在线观看| 欧美日韩亚洲综合在线 | 夜夜嗨av一区二区三区网页| 五月天丁香久久| 国产91在线看| 欧美日产在线观看| 欧美国产精品中文字幕| 婷婷综合在线观看| 不卡一区在线观看| 日韩视频在线观看一区二区| 亚洲视频免费在线观看| 久久99精品国产麻豆不卡| 一本色道a无线码一区v| 精品福利二区三区| 亚洲成a天堂v人片| 成人国产一区二区三区精品| 91精品国产综合久久精品性色| 欧美精品一区二区三区久久久| 一区二区三区影院| 国产精品996| 欧美美女喷水视频| 中文字幕亚洲欧美在线不卡| 激情图区综合网| 欧美性色综合网| 中文子幕无线码一区tr | 日韩三级精品电影久久久| 中文字幕日本乱码精品影院| 精品无人码麻豆乱码1区2区| 欧美性生活一区| 亚洲同性gay激情无套| 国产麻豆视频一区二区| 91精品国产色综合久久不卡电影| 国产精品电影一区二区| 激情文学综合网| 欧美一区二区三区系列电影| 亚洲黄网站在线观看| 岛国一区二区在线观看| 精品久久国产字幕高潮| 日韩精品三区四区| 欧美性生活大片视频| 亚洲欧美日韩久久| 国产91精品精华液一区二区三区| 日韩精品中午字幕| 日韩av在线发布| 欧美日韩欧美一区二区| 一区二区三区久久久| 99久久er热在这里只有精品15| 国内成+人亚洲+欧美+综合在线| 欧美日韩国产小视频在线观看| ...中文天堂在线一区| 国产suv精品一区二区6| 国产日韩欧美综合一区| 久久国产日韩欧美精品| 日韩女优毛片在线| 免费成人av在线播放| 日韩一区和二区| 欧美96一区二区免费视频| 91精品国产色综合久久不卡蜜臀| 亚洲不卡av一区二区三区| 欧美日韩在线精品一区二区三区激情| 一区二区三区精品视频| 日本韩国欧美一区二区三区| 一区二区三区加勒比av| 欧美私人免费视频| 天天av天天翘天天综合网色鬼国产| 欧美日韩的一区二区| 视频一区视频二区中文| 7777精品伊人久久久大香线蕉完整版 | 亚洲免费在线电影| 91成人国产精品| 亚洲午夜国产一区99re久久| 欧美日韩精品系列| 日韩极品在线观看| 亚洲精品在线免费观看视频| 国产精品综合av一区二区国产馆| 国产欧美日韩在线看| 99久久综合国产精品| 亚洲黄色在线视频| 精品视频一区三区九区| 青青草国产精品亚洲专区无| 精品少妇一区二区三区免费观看 | 精品国产亚洲在线| 国产精品888| 综合电影一区二区三区| 欧美视频自拍偷拍| 蜜桃一区二区三区四区| 国产亚洲人成网站| 91麻豆国产香蕉久久精品| 亚洲国产综合在线| 精品欧美久久久| 99热精品国产| 婷婷中文字幕一区三区| 欧美精品一区在线观看| 99久免费精品视频在线观看| 午夜久久久久久| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 91丝袜美腿高跟国产极品老师| 亚洲国产综合在线| 精品国产欧美一区二区| 99久久精品国产网站| 日韩高清在线观看| 国产日韩欧美高清在线| 欧美日韩亚洲高清一区二区| 久久国产三级精品| 亚洲欧美日韩在线播放| 日韩精品中文字幕一区二区三区| 成人一区二区三区视频在线观看| 亚洲午夜久久久久久久久电影院| 久久综合丝袜日本网| 91行情网站电视在线观看高清版| 久久国产免费看| 亚洲免费成人av| 精品国产乱码久久久久久久| 99国产精品国产精品毛片| 裸体歌舞表演一区二区| 一区二区三区色| 亚洲精品一线二线三线无人区| 色狠狠桃花综合| 国产在线精品一区二区三区不卡| 一区二区三区日韩| 久久久久久影视| 欧美日韩黄色一区二区| 粉嫩在线一区二区三区视频| 日韩va亚洲va欧美va久久| 亚洲欧美区自拍先锋| 欧美精品一区二区三区蜜桃视频| 欧美在线免费观看亚洲| 成人av免费在线播放| 久久er99热精品一区二区| 伊人一区二区三区| 久久精品水蜜桃av综合天堂| 欧美一区二区三区免费视频| 一本一道波多野结衣一区二区| 精品亚洲免费视频| 日韩二区在线观看| 亚洲图片另类小说| 国产欧美日韩另类视频免费观看| 91精品国产综合久久福利软件| 色94色欧美sute亚洲线路一ni| 国产精品伊人色| 九色porny丨国产精品| 亚洲第一会所有码转帖| 亚洲欧美怡红院| 国产精品日日摸夜夜摸av| 欧美mv和日韩mv的网站| 欧美一区二区三区在线视频| 欧洲一区在线观看| 色综合天天视频在线观看 | 国产精品婷婷午夜在线观看| 欧美一区二区三区免费视频| 欧美性色欧美a在线播放| 波多野结衣在线一区| 激情文学综合插| 老司机午夜精品| 蜜臀av性久久久久av蜜臀妖精| 亚洲动漫第一页| 亚洲一区在线视频观看| 一区二区三区产品免费精品久久75| 中文字幕一区二区三区精华液| 国产清纯在线一区二区www| 精品99999| 久久网站最新地址| 久久精品一区二区三区不卡 | 国产在线不卡视频| 极品少妇一区二区三区精品视频 | 日韩欧美电影在线| 日韩一区二区三| 欧美一级二级三级蜜桃| 日韩一区二区三区高清免费看看| 欧美日韩成人一区二区| 91福利社在线观看| 欧美午夜精品久久久久久孕妇| 欧美视频一区在线| 91超碰这里只有精品国产| 欧美美女直播网站| 欧美一区二区三区视频免费播放 | 国产精品一区二区久久精品爱涩| 麻豆精品在线视频| 久久99久久99精品免视看婷婷 | 久久久国产一区二区三区四区小说 | 一区二区视频在线看| 一区二区三区四区视频精品免费| 亚洲一区二区三区免费视频| 亚洲国产精品久久不卡毛片| 日韩高清不卡一区二区| 欧美精品日日鲁夜夜添| 欧美成人女星排行榜| 久久婷婷成人综合色| 国产精品视频在线看|