在线时间0 小时
UID225437
ST金币0
蝴蝶豆0
注册时间2009-7-17
新手上路
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2010-10-14 16:44:48
|
显示全部楼层
a0a.1 0b0c
RE:写eeprom
没人回复呀 附上程序,请帮忙看下哪里耽误了读写的时间
EEPROM.H文件内容:
/* Includes ------------------------------------------------------------------*/
#include "STM8S103k3u.h"
#define FLASH_DATA_START_PHYSICAL_ADDRESS ((unsigned long int)0x004000) /*!< Data EEPROM memory: start address */
#define FLASH_DATA_END_PHYSICAL_ADDRESS ((unsigned long int)0x00427F) /*!< Data EEPROM memory: end address */
#define FLASH_RASS_KEY1 ((unsigned char)0xAE) /*!< First RASS key */
#define FLASH_RASS_KEY2 ((unsigned char)0x56) /*!< Second RASS key */
unsigned char EEPROM_ReadByte(unsigned long int Address);
void EEPROM_ProgramByte(unsigned long int Address, unsigned char Data);
EEPROM.C文件内容
/* Includes ------------------------------------------------------------------*/
#include "EEPROM.h"
/* -------------------------------------------------------------------------- */
/* ROUTINE NAME: Check_EEPROM_Address. */
/* INPUT/OUTPUT: EEPROM Target Address. */
/* DESCRIPTION: Check_EEPROM_Address is available address. */
/* -------------------------------------------------------------------------- */
unsigned char Check_EEPROM_Address(unsigned long int Address)
{
if(Address >= FLASH_DATA_START_PHYSICAL_ADDRESS && Address |
|