![FTDI FT51A Application Note Download Page 146](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158146.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
145
Copyright © 2015 Future Technology Devices International Limited
3.1.6.3
I2C_master_get_status
File: ft51_i2c_master.c
This function returns the value of the
I2CMSR
register.
3.1.6.4
I2C_master_write
File: ft51_i2c_master.c
This will perform an I
2
C write to a specified slave address. The first byte sent is designated to be a
command byte and is passed separately from the optional data packet in the function parameters.
3.1.6.5
I2C_master_read
File: ft51_i2c_master.c
This will perform an I
2
C read from a specified slave address. The first byte sent is designated to be
a command byte and is passed separately from the optional data packet in the function
parameters. The command byte is written before the I
2
C bus direction is changed to read from the
slave address.
3.1.7
I
2
C Slave Library
The I
2
C Slave library provides functions to receive data from and transmit data to an I
2
C Master.
It is possible to use interrupt methods to perform both reads and write. This is not implemented in
this library.
Source Folder: i2c
3.1.7.1
I2C_slave_initialise
File: ft51_i2c_slave.c
This function will reset and initialise the I
2
C Slave peripheral. The requested slave address is
passed as a parameter and programmed into the
I2CSOA
register.
3.1.7.2
I2C_slave_get_status
File: ft51_i2c_ slave.c
This function returns the value of the
I2CSSR
register.
3.1.7.3
I2C_slave_write
File: ft51_i2c_ slave.c
This will respond to read operations from an I
2
C Master.
3.1.7.4
I2C_slave_read
File: ft51_i2c_ slave.c
This will perform an I
2
C read from a specified slave address. The first byte sent is designated to be
a command byte and is passed separately from the optional data packet in the function
parameters. The command byte is written before the I
2
C bus direction is changed to read from the
slave address.
3.1.8
AIO Library
The analogue library can sample an analogue voltage. It is a simple interface to the ADC
peripheral on the device.
There are 16 analogue pads which can be used for this, AIO_0 to AIO_15. These are at fixed pins
on the device and cannot be routed with the IOMUX Library.
Source Folder: aio