Thursday, 27 July 2017

Building A Real Time Clock using Dot Matrix Display on Proteus

Designing a Real Time Clock using Dot Matrix Display on Proteus Objective -Display Time on an 8X32 Dot matrix Display In this article, a Real Time Clock RTC DS 1307 is interfaced with a microcontroller and the time is displayed on a Dot matrix display. The circuit is simulated using the Proteus software. We shall discuss the project in two parts, one is interfacing the Dot matrix display and the other is interfacing the RTC DS 1307. Any RTC IC, for example, DS 3232 comes with an integrated crystal with which alarms can be interfaced. This article explains the programming part using the software ‘mikro C PRO for AVR’ in a progressive way. Logic is developed step by step so that by following the article, one can design displays of different sizes and formats. Let’s discuss the dot matrix displays first. Showing text or characters on a matrix display is done by refreshing the display with data frames. Now, we will discuss column refreshing. For this purpose, data frames for the columns are gathered and refreshed. Selection of Dot matrix Display Array 32 X 8 Array contains 8-Rows and 32-Columns. This is selected because we have to display time with seconds’ resolution and it contains 6 digits. Each digit is framed as a 5 X 7 Matrix i.e.., 5-Columns and 7-Rows. So, for six digits we need 5*6=30 columns and two columns for separating hours, minutes and seconds. From the displays readily available as a module, 4*8X8 LED Matrix displays are sufficient. However, we can change the display array according to our requirements by making suitable corrections in the programming part. Framing the characters Now, let’s frame the digits as a 5X7 Matrix. For this purpose, we need to declare a two-dimensional array of ‘char’ type for 10 digits. Below image shows the framing of digit ‘0’ for a Column Common Cathode type of module which means that columns are enabled by giving low signal and corresponding row LEDs are enabled with high signal     From the above image, every dot in the digit is considered as High i.e.., logic 1. As there are 5-Columns, for every single column, the row LEDs which should glow is stored in the array. Thus we need 5-bytes for every digit. The font or style is of our choice. The style can be of segment type also. We should frame the digit according to the shape. Similarly, other digits are also framed. Below image shows frames of digit ‘0’ of a Column common anode type as it is readily available in proteus. Just by negating the data, the framed characters can be interchanged.     As the digits are framed, it’s time to display them. To display the digits on the matrix arrays, 5-Pins to control individual columns and 7-Pins to control rows are required in this case. The program flow is like this, Enable column-1 and issue corresponding rows data to the rows. Wait for a few milliseconds and disable the column-1. Now, remove the rows data, Enable column-2 and issue rows data of column-2. Repeat the previous steps continuously as a loop to show the digit.   For a single digit, it is feasible to control with a single microcontroller. But if a number of matrices are combined to form an array, the above circuit is modified, leaving the same program flow. To reduce the column pins, Column-1 of all the 8X8 matrices are connected together to form a single node and like vice the remaining columns. So, only 8-Pins are required to control all the columns of the array. As...
read more

The post Building A Real Time Clock using Dot Matrix Display on Proteus appeared first on Electronic Circuits and Diagram-Electronics Projects and Design.

No comments:

Post a Comment

How 'clean' does a quantum computing test facility need to be?

How to keep stray radiation from 'shorting' superconducting qubits; a pair of studies shows where ionizing radiation is lurking and ...