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

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

?? 39vf160操作編程.txt

?? Name Function --- --- --- --- --- --- Check_SST_39VF160 Check manufacturer and device ID CFI_Que
?? TXT
?? 第 1 頁 / 共 3 頁
字號:
Software
Drivers

39VF160
16 Mbit Multi-Purpose Flash

September 2001


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

Companion product datasheets for the 39VF160 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.nbspcontain the following routines, 
in this order:

Name                    Function
------------------------------------------------------------------
Check_SST_39VF160       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 word
Erase_One_Block         Erase a block of 32K word
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 39VF160 16 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 39VF160 */
#define BLOCK_SIZE              32768   /* Must be 32K words for 39VF160  */

#define SST_ID                  0xBF    /* SST Manufacturer's ID code   */
#define SST_39VF160             0x2782  /* SST 39VF160 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_39VF160                                       */
/*                                                                      */
/* This procedure decides whether a physical hardware device has a      */
/* SST39VF160 16 Mbit Multi-Purpose Flash installed or not.             */
/*                                                                      */
/* Input:                                                               */
/*          None                                                        */
/*                                                                      */
/* Output:                                                              */
/*          return TRUE:  indicates a SST39VF160                        */
/*          return FALSE: indicates not a SST39VF160                    */
/************************************************************************/

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

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

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

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

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

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

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

        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 which the erase operation starts    */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

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

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

        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 which the erase operation starts    */
/*                                                                      */
/* Output:                                                              */
/*      NONE                                                            */
/************************************************************************/

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

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

        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 date to the        */
/* 39VF160.                                                             */
/*                                                                      */
/* NOTE:  It is VERY important the sector containing the word to be     */
/*        programmed was ERASED first.                                  */
/*                                                                      */
/* Input:                                                               */
/*           Src     The WORD which will be written to the 39VF160      */
/*           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 *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 */
}


/************************************************************************/
/* PROCEDURE:   Program_One_Sector                                      */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美电视剧免费观看| 欧美午夜在线一二页| 亚洲美女在线一区| 欧美大片免费久久精品三p | 成人黄页在线观看| 青草国产精品久久久久久| 国产精品白丝在线| 欧美成人性战久久| 欧美剧情片在线观看| 91美女视频网站| 在线观看欧美精品| 国产亚洲短视频| 成人免费av在线| 欧美国产精品中文字幕| 香蕉乱码成人久久天堂爱免费| 成人18视频日本| 1区2区3区精品视频| 91麻豆自制传媒国产之光| 国产精品久久久久久久岛一牛影视| 93久久精品日日躁夜夜躁欧美| 亚洲综合一区二区三区| 久久久精品蜜桃| 久久影院午夜片一区| 欧美一级夜夜爽| 欧美少妇bbb| 色偷偷一区二区三区| 不卡欧美aaaaa| 国产成人午夜99999| 国产美女精品在线| 国产曰批免费观看久久久| 石原莉奈在线亚洲三区| 亚洲成在人线在线播放| 亚洲精品五月天| 亚洲美女视频在线观看| 亚洲免费高清视频在线| 亚洲欧美综合网| 最新国产成人在线观看| 中文字幕的久久| 精品国一区二区三区| 91麻豆精品国产| 欧美一二三四区在线| 日韩欧美精品在线| 欧美sm极限捆绑bd| 精品国产青草久久久久福利| 91精品国产91久久久久久一区二区 | 91欧美一区二区| 色综合久久88色综合天天免费| 成人免费电影视频| 91小视频免费观看| 亚洲色图都市小说| 国产精品三级久久久久三级| 精品国产一区二区精华| 欧美日韩中文一区| 91精彩视频在线| 91久久精品一区二区| 国产成人精品影视| 激情图片小说一区| 日本午夜一本久久久综合| 亚洲精品久久嫩草网站秘色| 偷窥少妇高潮呻吟av久久免费| 婷婷国产v国产偷v亚洲高清| 日韩电影在线一区二区三区| 美日韩一级片在线观看| 国产精品一区二区在线观看网站| 国产精品白丝jk白祙喷水网站| www.欧美精品一二区| 欧美电影一区二区| 日韩精品自拍偷拍| 中文欧美字幕免费| 亚洲国产另类av| 国产一区二区三区在线观看免费 | 一区二区三区四区在线免费观看| 天天综合色天天综合| 国产一区二区三区免费看 | av成人免费在线| 欧美色精品天天在线观看视频| 欧美精品久久久久久久多人混战| 精品国产精品一区二区夜夜嗨| 中文字幕av一区二区三区高| 亚洲一区二区在线视频| 精品一区二区三区在线观看国产 | 在线观看日韩电影| 精品欧美乱码久久久久久1区2区| 国产精品色在线观看| 亚洲在线视频网站| 狠狠久久亚洲欧美| 97se亚洲国产综合自在线观| 欧美一区二区三区免费观看视频| 国产三级精品三级在线专区| 亚洲成av人影院| 高清在线观看日韩| 欧美一区二区三区视频| 成人免费在线视频观看| 久久国产成人午夜av影院| 97久久精品人人做人人爽| 欧美成人a∨高清免费观看| 亚洲欧美日韩国产另类专区| 久久99深爱久久99精品| 在线日韩一区二区| 国产欧美一区二区在线观看| 天天色图综合网| 91首页免费视频| www欧美成人18+| 五月天一区二区| aaa欧美大片| 国产色产综合产在线视频| 污片在线观看一区二区| 99视频精品在线| 国产亚洲成aⅴ人片在线观看| 日韩中文字幕1| 91成人网在线| 日韩一区中文字幕| 成人免费观看av| 久久色中文字幕| 三级亚洲高清视频| 日本高清免费不卡视频| 国产精品天美传媒| 国产福利91精品一区二区三区| 69成人精品免费视频| 夜夜精品视频一区二区| 成人av动漫网站| 亚洲欧美一区二区久久| 国产精品一二一区| 欧美精品一区男女天堂| 美女视频网站久久| 91精品在线观看入口| 午夜一区二区三区视频| 色av综合在线| 亚洲精品中文在线| 91香蕉视频mp4| 国产精品久久久久久久久图文区| 国产乱码精品一区二区三区av| 精品欧美久久久| 六月婷婷色综合| www日韩大片| 国产成人免费在线观看| 久久亚洲私人国产精品va媚药| 日本v片在线高清不卡在线观看| 欧美日韩成人综合| 午夜精品爽啪视频| 欧美丰满嫩嫩电影| 蜜臀av国产精品久久久久| 欧美一区二区三区免费| 捆绑变态av一区二区三区| 欧美精品一区二| 国产a级毛片一区| 国产精品成人免费在线| 色综合一区二区三区| 一区二区三区中文在线观看| 欧洲另类一二三四区| 亚洲风情在线资源站| 日韩视频免费直播| 黄色小说综合网站| 久久精品免费在线观看| 波多野结衣的一区二区三区| 日韩毛片一二三区| 欧美日韩五月天| 免费看精品久久片| www日韩大片| 色婷婷久久久久swag精品| 午夜欧美大尺度福利影院在线看| 91精品国产综合久久精品麻豆| 麻豆久久一区二区| 国产色产综合色产在线视频| 色综合天天综合网国产成人综合天 | 4438亚洲最大| 国产在线乱码一区二区三区| 国产精品亲子伦对白| 欧美三级欧美一级| 激情成人综合网| 国产精品久久久爽爽爽麻豆色哟哟 | 色诱亚洲精品久久久久久| 日一区二区三区| 久久精品欧美一区二区三区麻豆| 99视频精品全部免费在线| 午夜激情久久久| 国产亚洲午夜高清国产拍精品 | 国产一区91精品张津瑜| 五月综合激情网| 精品久久久久久久一区二区蜜臀| 岛国av在线一区| 午夜不卡av在线| 国产亚洲欧美色| 欧美日本一区二区三区四区| 国产中文字幕精品| 一区二区三区在线视频观看58| 精品国产免费人成在线观看| 91啪亚洲精品| 国产综合色在线| 亚洲自拍偷拍欧美| 国产色综合一区| 337p亚洲精品色噜噜| 99精品视频在线观看免费| 麻豆91精品视频| 亚洲最大色网站| 国产日韩精品一区二区浪潮av | 欧美日韩中文国产| 不卡的av网站| 久久99国产精品免费网站| 亚洲成人第一页|