Introduction: 12-Hour Digital Clock Using ARM Cortex-M4

About: I'm Electrical Engineering Student, Coffee Lover, Automated System designer, Programmer and Security System Designer.

This is a breadboard based project which uses ARM Cortex-M4(Texas Instruments EK-TM4C123GXL) to make a 12-Hour Digital Clock. The output of 12-Hour Digital Clock can be obtained on 16x2 LCD Screen.

We can set and modify time using two Toggle Switches. Two Toggle Switches are used to adjust the Hours and Minutes. During the setting of Hours and Minutes or the normal operation of 12-Hour Digital Clock, an on boardRGB LED continuously shows the status of ARM Cortex-M4(Texas Instruments EK-TM4C123GXL).

This RGBLED continuously blinks with one second period to show different active modes of 12-Hour Digital Clock.The whole circuit is powered by +5V(VBUS) and +3.3V of EK-TM4C123GXL.

.bin file of c99 code is attached with the provided link at the end of this tutorial. .bin file can be uploaded to the microcontroller using LM Flash Programmer.

Step 1: Requirements

The following things are required to get this project done:

1- Texas Instruments EK-TM4C123GXL

2- Potentiometer (eg 5K)

3- LCD 16x2

4- Two Toggle Switches (3-Pins)

5- LM Flash Programmer (software on PC)

=> If you don't know how to use and install LM Flash Programmer, then please check out my previous Instructable, or click on the following links:

Downloading LM Flash Programmer

Upload .bin or .hex File Using LM Flash Programmer

Step 2: Pin-outs & Wiring

The Pin-outs & Wiring of ARM Cortex-M4(Texas Instruments EK-TM4C123GXL) and other peripheral is attached with this step and also given following:

==================
TM4C123GXL => LCD

==================

VBUS => VDD or VCC

GND => VSS

PB4 => RS

GND => RW

PE5 => E

PE4 => D4

PB1 => D5

PB0 => D6

PB5 => D7

+3.3V => A

GND => K

=========================

TM4C123GXL => Potentiometer

=========================

VBUS => 1st pin

GND => 3rd pin

==================

Potentiometer => LCD

==================

2nd pin => Vo

=> You can set contrast using Potentiometer

==========================

TM4C123GXL => Toggle Switch 1

==========================

VBUS => 1st pin

GND => 3rd pin

PA5 => 2nd pin

==========================

TM4C123GXL => Toggle Switch 2

==========================

VBUS => 1st pin

GND => 3rd pin

PA6 => 2nd pin

Step 3: Upload the .bin File

Upload the attached .bin file with this step to ARM Cortex-M4(Texas Instruments EK-TM4C123GXL) using LM Flash Programmer.

Step 4: Get Your Output

After uploading .bin file to ARM Cortex-M4(Texas Instruments EK-TM4C123GXL), you can get your 12-Hour Digital Clock output on 16x2 LCD Screen.

Also, you can set or modify Hours and Minutes using two Toggle Switches. An on board RGBLED continuously shows the status of ARM Cortex-M4(Texas Instruments EK-TM4C123GXL).