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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sst25lf020a.c

?? SST25LF020A存儲器SPI驅(qū)動程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*Software DriverSST25LF020A 2 Mbit (256K x 8) Serial Flash MemoryFebruary 25th, 2004, Rev. 1.1ABOUT THE SOFTWAREThis application note provides software driver examples for 25LF020A,Serial Flash. Extensive comments are included in each routine to describe the function of each routine.  The interface coding uses polling method rather than the SPI protocol to interface with these serial devices.  Thefunctions are differentiated below in terms of the communication protocols(uses Mode 0) and specific device operation instructions. This code has been designed to compile using the Keil compiler.ABOUT THE 25LF020ACompanion product datasheets for the 25LF020A should be reviewed in conjunction with this application note for a complete understanding of the device.Device Communication Protocol(pinout related) functions:Functions                    		Function------------------------------------------------------------------init					Initializes clock to set up mode 0.Send_Byte				Sends one byte using SI pin to send and 					shift out 1-bit per clock rising edgeGet_Byte				Receives one byte using SO pin to receive and shift 					in 1-bit per clock falling edgeCE_High					Sets Chip Enable pin of the serial flash to highCE_Low					Clears Chip Enable of the serial flash to lowHold_Low				Clears Hold pin to make serial flash holdUnhold					Unholds the serial flashWP_Low					Clears WP pin to make serial flash write protectedUnWP					Disables write protection pinNote:  The pin names of the 25LF020A are used in this application note. The associated test codewill not compile unless these pinouts (SCK, SI, SO, SO, CE, WP, Hold) are pre-defined on yoursoftware which should reflect your hardware interfaced. 	 Device Operation Instruction functions:Functions                    		Function------------------------------------------------------------------Read_Status_Register			Reads the status register of the serial flashEWSR					Enables the Write Status RegisterWRSR					Performs a write to the status registerWREN					Write enables the serial flashWRDI					Write disables the serial flashRead_ID					Reads the manufacturer ID and device IDRead					Reads one byte from the serial flash and returns byte(max of 20 MHz CLK frequency)Read_Cont				Reads multiple bytes(max of 20 MHz CLK frequency)HighSpeed_Read				Reads one byte from the serial flash and returns byte(max of 33 MHz CLK frequency)HighSpeed_Read_Cont				Reads multiple bytes(max of 33 MHz CLK frequency)Byte_Program				Program one byte to the serial flashAuto_Add_IncA				Initial Auto Address Increment processAuto_Add_IncB				Successive Auto_Address_Increment process after AAI initiationChip_Erase				Erases entire serial flashSector_Erase				Erases one sector (4 KB) of the serial flashBlock_Erase				Erases one block (32 KB) of the serial flashWait_Busy				Polls status register until busy bit is lowWait_Busy_AAI				Polls status register until busy bit is low for AAI programmingWREN_Check				Checks to see if WEL is setWREN_AAI_Check				Checks to see if WEL and AAI mode is set*/                                                                     "C" LANGUAGE DRIVERS *//********************************************************************//* Copyright Silicon Storage Technology, Inc. (SST), 1994-2003	    *//* Example "C" language Driver of 25LF020A Serial Flash		    *//* Conrado Canio, Silicon Storage Technology, Inc.                  *//*                                                                  */ /* Revision 1.0, June 30th, 2003			  	    */   /* Revision 1.1, February 25th, 2004:                               *//* 	- Fixed the bug on HighSpeed_Read_Cont function that had the*//*		dummy byte cycle shifted before the LSB address.    *//*	- Replaced the comments about the memory range of the       *//*		25LF040A device with the memory	range of the        *//*		25LF020A device. 		                    *//********************************************************************/#include <stdio.h>#include <stdlib.h>/* Function Prototypes */void init();void Send_Byte(unsigned char out);unsigned char Get_Byte();void CE_High();void CE_Low();void Hold_Low();void Unhold();void WP_Low();void UnWP();unsigned char Read_Status_Register();void EWSR();void WRSR(byte);void WREN();void WRDI();unsigned char Read_ID(ID_addr);unsigned char Read(unsigned long Dst);void Read_Cont(unsigned long Dst, unsigned long no_bytes);unsigned char HighSpeed_Read(unsigned long Dst); void HighSpeed_Read_Cont(unsigned long Dst, unsigned long no_bytes);void Byte_Program(unsigned long Dst, unsigned char byte);void Auto_Add_IncA(unsigned long Dst, unsigned char byte);void Auto_Add_IncB(unsigned char byte);void Chip_Erase();void Sector_Erase(unsigned long Dst);void Block_Erase(unsigned long Dst);void Wait_Busy();void Wait_Busy_AAI();void WREN_Check();void WREN_AAI_Check();void Verify(unsigned char byte, unsigned char cor_byte);unsigned char idata upper_128[128];	/* global array to store read data */					/* to upper RAM area from 80H - FFH *//************************************************************************//* PROCEDURE: init							*//*									*//* This procedure initializes the SCK to low. Must be called prior to 	*//* setting up mode 0.							*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		SCK							*//************************************************************************/void init(){	SCK = 0;	/* set clock to low initial state */}/************************************************************************//* PROCEDURE: Send_Byte							*//*									*//* This procedure outputs a byte shifting out 1-bit per clock rising	*//* edge on the the SI pin(LSB 1st).					*//*									*//* Input:								*//*		out							*//*									*//* Output:								*//*		SI							*//************************************************************************/void Send_Byte(unsigned char out){		unsigned char i = 0;	for (i = 0; i < 8; i++)	{				if ((out & 0x80) == 0x80)	/* check if MSB is high */			SI = 1;		else			SI = 0;			/* if not, set to low */		SCK = 1;			/* toggle clock high */		out = (out << 1);		/* shift 1 place for next bit */		SCK = 0;			/* toggle clock low */	}}/************************************************************************//* PROCEDURE: Get_Byte							*//*									*//* This procedure inputs a byte shifting in 1-bit per clock falling	*//* edge on the SO pin(LSB 1st).						*//*									*//* Input:								*//*		SO							*//*									*//* Output:								*//*		None							*//************************************************************************/unsigned char Get_Byte(){	unsigned char i = 0, in = 0, temp = 0;	for (i = 0; i < 8; i++)	{		in = (in << 1);		/* shift 1 place to the left or shift in 0 */		temp = SO;		/* save input */		SCK = 1;		/* toggle clock high */	if (temp == 1)			/* check to see if bit is high */		in = in | 0x01;		/* if high, make bit high */		SCK = 0;		/* toggle clock low */	}	return in;}/************************************************************************//* PROCEDURE: CE_High							*//*									*//* This procedure set CE = High.					*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		CE							*//*									*//************************************************************************/void CE_High() {	CE = 1;				/* set CE high */}/************************************************************************//* PROCEDURE: CE_Low							*//*									*//* This procedure drives the CE of the device to low.  			*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		CE							*//*									*//************************************************************************/void CE_Low() {		CE = 0;				/* clear CE low */}/************************************************************************//* PROCEDURE: Hold()							*//*									*//* This procedure clears the Hold pin to low.				*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		Hold							*//************************************************************************/void Hold_Low(){	Hold = 0;			/* clear Hold pin */}/************************************************************************//* PROCEDURE: Unhold()							*//*									*//* This procedure sets the Hold pin to high.				*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		Hold							*//************************************************************************/void Unhold(){	Hold = 1;			/* set Hold pin */}/************************************************************************//* PROCEDURE: WP()							*//*									*//* This procedure clears the WP pin to low.				*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		WP							*//************************************************************************/void WP_Low(){	WP = 0;				/* clear WP pin */}/************************************************************************//* PROCEDURE: UnWP()							*//*									*//* This procedure sets the WP pin to high.				*//*									*//* Input:								*//*		None							*//*									*//* Output:								*//*		WP							*//************************************************************************/void UnWP(){	WP = 1;				/* set WP pin */}/************************************************************************//* PROCEDURE: Read_Status_Register					*//*									*//* This procedure read the status register and returns the byte.	*//*									*//* Input:								*//*		None							*//*									*//* Returns:								*//*		byte							*//************************************************************************/unsigned char Read_Status_Register(){	unsigned char byte = 0;	CE_Low();			/* enable device */	Send_Byte(0x05);		/* send RDSR command */	byte = Get_Byte();		/* receive byte */	CE_High();			/* disable device */	return byte;}/************************************************************************//* PROCEDURE: EWSR							*//*									*//* This procedure Enables Write Status Register.  			*//*									*//* Input:								*//*		None							*//*									*//* Returns:								*//*		Nothing							*//************************************************************************/void EWSR(){	CE_Low();			/* enable device */	Send_Byte(0x50);		/* enable writing to the status register */	CE_High();			/* disable device */}/************************************************************************//* PROCEDURE: WRSR							*//*									*//* This procedure writes a byte to the Status Register.			*//*									*//* Input:								*//*		byte							*//*									*//* Returns:								*//*		Nothing							*//************************************************************************/void WRSR(byte){	CE_Low();			/* enable device */	Send_Byte(0x01);		/* select write to status register */	Send_Byte(byte);		/* data that will change the status of BPx 						or BPL (only bits 2,3,7 can be written) */	CE_High();			/* disable the device */}/************************************************************************//* PROCEDURE: WREN							*//*									*//* This procedure enables the Write Enable Latch.			*//*									*//* Input:								*//*		None							*//*									*//* Returns:								*//*		Nothing							*//************************************************************************/void WREN(){	CE_Low();			/* enable device */	Send_Byte(0x06);		/* send WREN command */	CE_High();			/* disable device */}/************************************************************************//* PROCEDURE: WRDI							*//*									*//* This procedure disables the Write Enable Latch.			*//*									*//* Input:								*//*		None							*//*									*//* Returns:								*//*		Nothing							*//************************************************************************/void WRDI(){	CE_Low();			/* enable device */	Send_Byte(0x04);		/* send WRDI command */	CE_High();			/* disable device */}/************************************************************************//* PROCEDURE: Read_ID							*//*									*//* This procedure Reads the manufacturer's ID and device ID.  It will 	*//* use 90h or ABh as the command to read the ID (90h in this sample).   *//* It is up to the user to give the last byte ID_addr to determine      *//* whether the device outputs manufacturer's ID first, or device ID 	*//* first.  Please see the product datasheet for details.  Returns ID in *//* variable byte.							*//*									*//* Input:								*//*		ID_addr							*//*									*//* Returns:								*//*		byte:	ID1						*//*									*//************************************************************************/unsigned char Read_ID(ID_addr){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线你懂的| 成人听书哪个软件好| 韩国理伦片一区二区三区在线播放 | 亚洲免费观看在线视频| 亚洲国产人成综合网站| 国产·精品毛片| 在线不卡欧美精品一区二区三区| 国产校园另类小说区| 午夜国产精品一区| 色婷婷一区二区| 国产色产综合产在线视频| 免费的国产精品| 欧美高清性hdvideosex| 91精品国产免费久久综合| 日韩视频免费观看高清在线视频| 国产精品理论片在线观看| 日韩国产精品久久久久久亚洲| 色久优优欧美色久优优| 色综合久久久久久久| 国产精品每日更新| 免费观看30秒视频久久| 欧美顶级少妇做爰| 中文字幕av一区二区三区高 | 国产成人午夜视频| 久久久久久9999| 国产精品996| 中文字幕一区在线观看视频| 成人夜色视频网站在线观看| 久久精品视频在线看| 成人性生交大片免费看视频在线| 久久久亚洲综合| 国产成人在线色| 亚洲最新视频在线播放| 激情av综合网| 一区二区三区.www| 色哟哟在线观看一区二区三区| 国产精品国产三级国产有无不卡 | 日本韩国一区二区| 日韩高清在线观看| 色香蕉成人二区免费| 日本午夜精品视频在线观看| 久久人人超碰精品| 91国内精品野花午夜精品| 免费看精品久久片| 亚洲国产电影在线观看| 欧美天堂一区二区三区| 日韩一区二区三免费高清| 成人午夜激情影院| 青青草国产成人99久久| 国产精品拍天天在线| 精品久久久久香蕉网| 在线视频国内自拍亚洲视频| 久久激情五月激情| 精品久久久久久久久久久久包黑料| 99国产精品99久久久久久| 国产在线视频不卡二| 亚洲一二三区不卡| 国产精品成人免费在线| 成人动漫一区二区在线| 韩国精品免费视频| 国内精品伊人久久久久av一坑| 自拍偷拍亚洲综合| 亚洲国产精品精华液2区45| 欧美白人最猛性xxxxx69交| 99精品1区2区| jizzjizzjizz欧美| 色国产精品一区在线观看| 99精品一区二区| 成人18精品视频| 国产成人aaa| 亚洲曰韩产成在线| 视频一区二区三区入口| 亚洲地区一二三色| 亚洲不卡在线观看| 日本女人一区二区三区| 亚洲日本va在线观看| 亚洲欧美成人一区二区三区| 国产精品毛片久久久久久久| 综合av第一页| 一区二区三区欧美视频| 4438成人网| 精品国产一区二区三区四区四 | 在线观看日韩电影| 7777精品伊人久久久大香线蕉经典版下载 | 日韩欧美电影在线| 日韩免费高清电影| 亚洲欧美日韩中文字幕一区二区三区| 精品国产1区二区| 国产精品福利一区二区三区| 国产精品麻豆网站| 亚洲欧美韩国综合色| 日韩二区三区在线观看| 国产99精品在线观看| 丝袜美腿亚洲色图| 国产成人免费av在线| 成人avav影音| 在线看一区二区| 中文字幕在线不卡一区| 久久久亚洲综合| 国产丝袜欧美中文另类| 麻豆91精品91久久久的内涵| 777午夜精品免费视频| 麻豆成人av在线| 精品久久久网站| 成人av先锋影音| 中文字幕字幕中文在线中不卡视频| 99久久综合国产精品| 中文字幕亚洲在| 欧美日韩国产不卡| 国产乱码精品1区2区3区| 国产精品丝袜黑色高跟| 91麻豆国产自产在线观看| 亚洲精品免费一二三区| 67194成人在线观看| 国产成人aaaa| 五月天一区二区| 国产精品色一区二区三区| 欧美丝袜丝交足nylons图片| 另类综合日韩欧美亚洲| 国产精品精品国产色婷婷| 欧美日韩国产高清一区| 丰满亚洲少妇av| 日本视频免费一区| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美精品一级二级三级| 99精品热视频| 国产美女精品人人做人人爽| 亚洲图片自拍偷拍| 亚洲欧美怡红院| 国产三级精品三级| 日韩欧美亚洲另类制服综合在线 | 亚洲欧洲日产国产综合网| 日韩欧美电影一区| 91精品国产欧美日韩| 欧美日韩亚洲综合在线| 欧美色老头old∨ideo| 91久久精品国产91性色tv| 成人午夜av影视| 青青草国产成人av片免费| 视频在线观看一区二区三区| 亚洲精品国产高清久久伦理二区| 国产欧美一区二区三区鸳鸯浴 | 欧美一级一级性生活免费录像| 91久久香蕉国产日韩欧美9色| 91一区二区三区在线播放| 99视频在线精品| 成人动漫一区二区三区| 91丝袜国产在线播放| 91免费看片在线观看| 欧美综合色免费| 91精品婷婷国产综合久久竹菊| 这里是久久伊人| 欧美刺激午夜性久久久久久久| 欧美高清视频一二三区| 精品国产91九色蝌蚪| 国产精品伦理在线| 一区二区在线观看视频在线观看| 亚洲宅男天堂在线观看无病毒| 亚洲午夜久久久久久久久久久| 亚洲一区二区在线播放相泽| 亚洲成人综合网站| 国内外成人在线| 欧美日韩你懂得| 国产亚洲综合性久久久影院| 亚洲色图制服丝袜| 亚洲大片在线观看| 成人精品一区二区三区中文字幕 | 欧美日韩精品一区二区三区蜜桃 | 亚洲精品老司机| 国产高清精品久久久久| 一本大道久久a久久综合| 日韩欧美高清在线| 亚洲国产日韩综合久久精品| 九九精品视频在线看| 欧美在线影院一区二区| 久久久午夜精品理论片中文字幕| 亚洲四区在线观看| 国产精品综合一区二区三区| 欧美亚洲动漫另类| 中文字幕亚洲欧美在线不卡| 老司机免费视频一区二区| 在线亚洲高清视频| 亚洲天堂a在线| 国产精品资源站在线| 91超碰这里只有精品国产| 亚洲欧洲一区二区三区| 韩国女主播成人在线观看| 91精品国产入口| 午夜电影久久久| 欧美又粗又大又爽| 国产精品激情偷乱一区二区∴| 国产乱人伦精品一区二区在线观看| 欧美一二三四区在线| 日韩黄色免费网站| 在线不卡中文字幕播放| 亚洲成人免费在线| 日韩免费视频线观看| 国产一区二区三区四| 欧美极品xxx| 91麻豆产精品久久久久久|