C8051F单片机读写串行EEPROM程序
//------------------------------------------------------------------------------
// Keil Software, Inc.
//
// Project:
//
// Filename:
// Version:
// Description: This file contains example code that will communicate to a
//
//
//
// Copyright 2000 - Keil Software, Inc.
// All rights reserved.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Header files
//------------------------------------------------------------------------------
#include
#include
//------------------------------------------------------------------------------
// Value Definitions
//------------------------------------------------------------------------------
#define
#define
#define
#define
#define
#define
#define
#define
//------------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------------
#define high_byte(x)
//------------------------------------------------------------------------------
// I/O Port Defines
//------------------------------------------------------------------------------
sbit
#define
//------------------------------------------------------------------------------
// I2C Bus (SMBus) register bit definitions
//------------------------------------------------------------------------------
sbit
sbit
sbit
sbit
sbit
sbit
sbit
sbit
//------------------------------------------------------------------------------
// Rerserve Interrupt vector space (the 8051F000 has an IV table from 0x03 to 0xAB)
//------------------------------------------------------------------------------
unsigned char code iv_table [0xB0] _at_ 0x0003;
//------------------------------------------------------------------------------
// Function Prototypes
//------------------------------------------------------------------------------
void write_byte (unsigned char data_out, unsigned int address);
unsigned char read_byte (unsigned int address);
void i2c_write (unsigned char output_data);
unsigned char i2c_read (void);
void delay_time (unsigned int time_end);
void i2c_start (void);
unsigned char
void repeated_i2c_start_and_write (unsigned char output_data);
void i2c_stop_and_write (unsigned char output_data);
//------------------------------------------------------------------------------
// MAIN FUNCTION
//------------------------------------------------------------------------------
void main (void)
{
C8051单片机读写串行EEPRO 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)