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

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

?? sst39vf800a.txt

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

SST39VF800A
8 Mbit Multi-Purpose Flash

September 2001


ABOUT THE SOFTWARE
This application note provides software driver examples for 39VF800A,
8 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.

ABOUT THE SST39VF800A

Companion product datasheets for the SST39VF800A 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_39VF800A       Check manufacturer and device ID
CFI_Query               CFI Query Entry/Exit command sequence
Erase_Entire_Chip       Erase the contents of the entire chip
Erase_One_Sector        Erase a sector of 2048 words
Erase_One_Block         Erase a block of 32K words
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 39VF800A 8 Mbitt 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 39VFX00A */
#define BLOCK_SIZE              32768   /* Must be 32K words for 39VFX00A  */

#define SST_ID                  0xBF    /* SST Manufacturer's ID code   */
#define SST_39VF800A             0x2781  /* SST39VF800A 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_39VF800A                */
/*                                                                      */
/* This procedure decides whether a physical hardware device has a      */
/* SST39VF800A 8 Mbit Multi-Purpose Flash installed or not  */
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          return TRUE:  indicates a SST39VF800A     */
/*          return FALSE: indicates not a SST39VF800A                 */
/************************************************************************/

int Check_SST_39VF800A
{
        WORD far *Temp;
        WORD SST_id1;
        WORD far *Temp1;
        WORD SST_id2;
        int  ReturnStatus;

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

        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();

        /* Read the product ID from 39VF800A */

        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 SST39VF800 installed or not */

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

        /* Issue the Soffware Product ID Exit code thus returning the 39VF800A */
        /* 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();

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

        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();

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


        /* Issue the CFI Exit code thus returning the 39VF800A  */
        /* 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();
}


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

        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:   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 39VF800A  */

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

        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:   Program_One_Word                                        */
/*                                                                      */
/* This procedure can be used to program ONE word of data to the        */
/* 39VF800.                                                             */
/*                                                                      */
/* 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 39VF800A      */
/*           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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人激情免费电影网址| 欧美成人性福生活免费看| 国产欧美一区二区精品秋霞影院| 免费观看日韩av| 91精品国产黑色紧身裤美女| 亚洲bdsm女犯bdsm网站| 欧美精品99久久久**| 日韩综合一区二区| 欧美高清www午色夜在线视频| 天堂va蜜桃一区二区三区| 日韩一级大片在线观看| 国产精品18久久久久久久久久久久 | 视频在线观看91| 91麻豆精品国产自产在线观看一区| 免费久久精品视频| 久久亚洲一区二区三区明星换脸| 国产一区二区不卡老阿姨| 中文字幕在线一区免费| 在线观看日韩精品| 精品一区二区久久| ...av二区三区久久精品| 欧美日韩亚洲综合在线 | 成人欧美一区二区三区黑人麻豆 | 欧美女孩性生活视频| 麻豆成人91精品二区三区| 国产午夜亚洲精品不卡| 91成人在线观看喷潮| 美日韩一区二区三区| 亚洲欧洲一区二区在线播放| 欧美性一区二区| 美女视频第一区二区三区免费观看网站| 91精品国产综合久久香蕉麻豆| 久久精品久久综合| 亚洲欧洲成人精品av97| 欧美福利视频一区| 国产精品综合视频| 亚洲精品国产一区二区精华液 | 最新欧美精品一区二区三区| 欧洲日韩一区二区三区| 激情小说欧美图片| 一区二区三区毛片| 久久综合久色欧美综合狠狠| 在线观看区一区二| 国产呦精品一区二区三区网站| 玉米视频成人免费看| 日韩一级大片在线观看| 在线视频一区二区免费| 成人免费视频视频在线观看免费 | 久久国产欧美日韩精品| 悠悠色在线精品| 国产日韩三级在线| 日韩欧美一级精品久久| 欧美少妇性性性| 99久久精品国产精品久久| 狠狠色丁香久久婷婷综| 午夜影院久久久| 日韩一区中文字幕| 国产欧美日产一区| 精品黑人一区二区三区久久 | 亚洲免费在线观看视频| 国产欧美中文在线| 欧美精品一区二| 欧美一级高清片| 欧美日韩黄色一区二区| 欧美日韩国产片| 在线免费观看不卡av| 99久久婷婷国产精品综合| 国产成人av福利| 精品一区二区三区影院在线午夜 | 国产日韩影视精品| 日韩一区二区三区观看| 4438x亚洲最大成人网| 欧美日免费三级在线| 欧美综合天天夜夜久久| 91免费视频大全| 91老师片黄在线观看| av一区二区三区四区| 国产成人在线免费| 成人av小说网| heyzo一本久久综合| av在线不卡免费看| 91免费国产在线| 欧洲一区二区三区在线| 欧美性做爰猛烈叫床潮| 在线不卡的av| 日韩免费看网站| 久久欧美一区二区| 国产精品污www在线观看| 国产精品久久久久精k8| 亚洲天堂中文字幕| 亚洲最大成人综合| 天天综合日日夜夜精品| 另类人妖一区二区av| 国产精品一区二区你懂的| 成人免费观看av| 欧美在线999| 日韩一区二区不卡| 国产性做久久久久久| 亚洲色图.com| 午夜成人免费视频| 国产一区美女在线| 成人永久aaa| 欧美在线视频全部完| 精品少妇一区二区三区免费观看| 久久久久久久综合色一本| 中文无字幕一区二区三区| 欧美国产国产综合| 91在线视频在线| 欧美午夜精品免费| 欧美熟乱第一页| 亚洲老妇xxxxxx| 91在线小视频| 欧美伊人久久久久久久久影院| 欧美精品色综合| 国产午夜精品一区二区| 亚洲一区在线观看免费 | 亚洲午夜免费电影| 免费三级欧美电影| 99精品在线免费| 欧美成人vps| 亚洲卡通动漫在线| 国内国产精品久久| 欧美在线观看你懂的| 久久天堂av综合合色蜜桃网| 国产精品国产三级国产普通话蜜臀| 日韩**一区毛片| 久久久久久影视| 欧美成人vr18sexvr| 国产精品国产a| 日本成人超碰在线观看| 99精品视频在线观看| 精品国内二区三区| 亚洲一区二区三区免费视频| 丁香激情综合国产| 欧美日韩电影在线| 亚洲欧洲三级电影| 九九视频精品免费| 91电影在线观看| 欧美国产日韩在线观看| 久久国产尿小便嘘嘘尿| 日本高清视频一区二区| 国产午夜三级一区二区三| 亚洲国产毛片aaaaa无费看| 国产精品综合av一区二区国产馆| 欧美日韩国产在线观看| 亚洲欧洲精品一区二区三区 | 久久99精品国产.久久久久久| 91亚洲国产成人精品一区二区三| 久久婷婷国产综合国色天香| 亚洲成av人影院在线观看网| 99久久综合精品| 国产欧美一区二区三区网站| 美国毛片一区二区三区| 欧美人动与zoxxxx乱| 亚洲综合视频在线观看| 色婷婷国产精品久久包臀 | 国产精品成人一区二区艾草| 国产一区二区三区四区在线观看| 欧美日本视频在线| 亚洲福利视频一区| 欧洲精品一区二区| 亚洲曰韩产成在线| 在线观看亚洲专区| 伊人色综合久久天天| 91小视频在线免费看| 亚洲色图在线播放| 色综合久久综合中文综合网| 亚洲色图20p| 在线视频你懂得一区| 亚洲综合一区二区三区| 欧美影院精品一区| 亚洲一区在线观看网站| 欧美日韩激情一区二区| 日本欧美一区二区三区乱码| 欧美一级片免费看| 蜜臀久久久久久久| 日韩免费观看高清完整版 | 亚洲免费在线视频一区 二区| 99九九99九九九视频精品| 亚洲欧美日韩系列| 欧美少妇性性性| 丝袜诱惑亚洲看片| 欧美成人女星排名| 国产伦精品一区二区三区免费迷| 久久色在线视频| 成人午夜激情在线| 亚洲精品国产视频| 精品视频1区2区| 捆绑调教美女网站视频一区| 久久综合资源网| 成人免费视频视频| 亚洲国产一区二区在线播放| 欧美一级片在线看| 成人激情电影免费在线观看| 亚洲免费观看高清完整版在线观看熊| 欧美色涩在线第一页| 美腿丝袜亚洲三区| 中文字幕亚洲区| 欧美日韩大陆一区二区| 国产麻豆成人精品|