⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 基于SPMC75的NNAD_Flash K9F1208的驱动程式序,对一些需要存海量数据的单片机应用场合有用.
💻 C
字号:

//========================================================================
// The information contained herein is the exclusive property of
// Sunplus Technology Co. And shall not be distributed, reproduced,
// or disclosed in whole in part without prior written permission.
//             (C) COPYRIGHT 2001 SUNPLUS TECHNOLOGY CO.
//                    ALL RIGHTS RESERVED
// The entire notice above must be reproduced on all authorized copies.
//========================================================================

//========================================================================
// Filename: main.c
// Author: Lianshu  Mou (email: Lianshu@sunnorth.com.cn)
// Date: 2004/12/22
// Description: 
//
// Reference:
// Revision:
//      2004/12/22      First version
//========================================================================
#include "SPCE061A.H"
#include "unSPMACRO.h"
#include "Queue.h"
#include "Display.h"
#include "NAND_Flash.h"

unsigned int ID;
unsigned int Flash_Data[528];
void System_Init(void);
main()
{
	int i;
	unsigned int Temp;
	unsigned long int Addr;
	Addr = 0;
	System_Init();
	*P_IOA_Dir = 0xdfff;
	*P_IOA_Attrib = 0xffff;
	*P_IOA_Buffer |= 0x8200;
	*P_IOA_Buffer &= 0x7fff;

/*	for(i=0;i<4096;i++)
	{
		Writ_Flash_ZL(0x60);
		Writ_Flash_Addr_B(Addr);
		Writ_Flash_ZL(0xd0);
		while((*P_IOA_Data & 0x2000) == 0);
		Addr += 0x2000;
	}*/
	
	Temp = Read_Flash_State(0x70);
	
	for(i=0;i<528;i++)
		Flash_Data[i] = (i+7)&0xff;
/*Writ_Flash_ZL(0x80);
	Writ_Flash_Addr(0x00000500);
	Writ_Flash_Page(Flash_Data,528);
	Writ_Flash_ZL(0x10);*/
	

	Writ_Flash_ZL(0x00);
	Writ_Flash_Addr(0x00000000);	
	Read_Flash_Page(Flash_Data,528);
	i = 0;
	i = 0;
	while(1)
	{
		i = 0;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -