Fujitsu MB2146-450-E Manual de instalación - Página 35

Navegue en línea o descargue pdf Manual de instalación para Placa base Fujitsu MB2146-450-E. Fujitsu MB2146-450-E 42 páginas. F2mc-8fx mb95f310 series 8-bit microcontroller
También para Fujitsu MB2146-450-E: Manual de instalación (40 páginas)

Fujitsu MB2146-450-E Manual de instalación

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