I2C .C; Lcd .C - Fujitsu MB2146-450-E Setup Manual

F2mc-8fx mb95f310 series 8-bit microcontroller
Hide thumbs Also See for MB2146-450-E:
Table of Contents

Advertisement

4.2.5 I2C .c

In this function, we should initialize I2C status and use SCL and SDA to send data to master
device and receive data from slave device.
Following table describes the I2C library:
Function Name
unsigned char RD_I2C( unsigned char
Main_Addr, unsigned char Sub_Addr )
void Write_I2C_Proc(unsigned char
MainAddr, unsigned char SubAddr, unsigned
char I2Cdata)
Following table describes how to use these functions.
Type
Read data
RD_I2C(0xa0,0x01);
Write data to
Write_I2C_Proc(0xa0,0x01,0x25);
EEPROM

4.2.6 LCD .c

In this function, we should initialize LCD register and drive LCD by sending different data to
SEG00...SEG31
Following table describes the LCD library:
Function Name
void Init_LCD(void)
void LCD_Clear(void)
void LCD_LigON_NUM(unsigned char Num,
unsigned char Dat)
Following table describes how to use these functions.
Type
Display LCD
LCD_LigON_NUM(0x02,0x06);
MB2146-450-E Setup Guide
Chapter 4 Sample Code Manual
Read data from Sub_Addr
Write data I2Cdata to SubAddr
Example
Operation
Initializes LCD module
Clear LCD display
Drive LCD Num to display number Dat
Example
Operation
MCU-AN-500072-E-10 – Page 33
Description
Return
Read data from EEPROM sub
address 0x01
Write 0x25 to EEPROM sub
address 0x01
Description
Return
Drive LED 2 to display number 6

Advertisement

Table of Contents
loading

Table of Contents