Posts

Showing posts from January, 2018

EK-TM4C123GXL - Configure the I2C Module to Transmit a Single Byte as a Master

Image
Name of this blog post is the name of chapter 16.4.1 from ARM Cortex M4 TM4C123GH6PM  microcontroller datasheet (MCU on EK-TM4C123GXL board). It will be showed how to setup I2C1 from scratch. There is a way to do this with functions for set registers parameters but in this blog post, it will be done by writing directly into the register address. It is decided that way because it is the way how drivers are done.   The EK-TM4C123GXL has support for 4 I2C serial computer buses. First, we need to unlock GPIO_PORTA register and I2C1 register. To do that we need to do that over System Control Register addresses.   Image 1 - System Control Register Map 1. Enable the I2C clock using the RCGCI2C register