Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Driving a 7 segment LCD using 2452

$
0
0

Hi! I am new to here. Several months ago I got a Launchpad with two chips 2553 & 2452 inside the box. I am really enjoying it except one thing: They have no LCD driver. Considering an external LCD module will bring terrible power consumption, I wonder if I can drive a simple 3 1/2 digits 7 segments LCD with very little power consumption.

 

After searching the internet I found Maxim's 4 digits decoder ICM7211 might be a choice, but it is hard to access and so expensive that I cannot accept. Another choice is to use BCD to 7 segments decoder, finally I found 4543 BCD to 7 segments decoder for LCD, it can directly drive static LCD (one COM) without extra components. The 4543 functional diagram is shown below:

 

4543.png

 

The 3 1/2 digit LCD is one of the most common LCD and very easy to access. I bought one for only one dollar. But the question is 4543 can only drive a 7 segments digit while the LCD has 3 dots, one colon, '1' on the 4th digit and some other segments. MSP430 cannot drive them directly, they need special circuit. My way is to use 4070 or 4030 quad exclusive-or gate to drive them. One of the input of the gate is connected to the back panel and another is controlled by the MSP430. 

 

The schematic is shown below:

 

 LCD Clock.png

 

Note that 4543 and 4070 need square wave to drive the LCD (for static LCD, 60 - 90Hz may work well), PWM will be a great way to produce square wave, I only use CCR0 in TIMER0_A3 to produce a 64Hz, 50%duty square wave. CCR0 is set to 255 (128Hz), and PWM mode 4 (Toggle), so the actual PWM frequency is 64Hz.

 

I designed a simple LCD clock with three 4543s and one 4070, and use only two XOR gates in 4070 to drive the hour's ten bit and the colon.  The clock is 12 hours mode and the colon will blink every second.

 

To set the time, first press "MODE" for about 3 seconds, press "SET" to set hours when only hours display on the screen, then press "MODE" again to set minutes, after that, press "MODE" to finish setting. The seconds will be automatically set to zero when quitting time set mode. 

 

I also designed a small PCB for the project. After fixing some bugs it works well now.

 

Front:

DSC08420.JPG  DSC08425.JPG

 

Back:

DSC08421.JPG  DSC08424.JPG

 

A 22uF capacitor is in parallel connection with the battery, the clock can continuously run about 15 seconds after taking the battery away. A CR2032 coin cell is at 3V and the minimum supply voltage of MSP430G2452  is 1.8V, which meas the total consumption of the project is (3 -1.8)v / 15s x 22u = 1.76uA, a 200mAh CR2032 coin cell may let the clock running for about 13 years, considering the lifetime of a coin cell, it probably may work for about 5 years.

 

The software is written using CCS, grace makes things so convenient. 

 

Code for the project can be downloaded here, sorry for the original Eagle file is in my school's PC, I will upload them as soon as I return to school.

Attached File  LCD Clock.rar   123.84KB   2 downloads

Update:I updated the software version to make the main function shorter, and added a full display of every used segments when power on. The new version with Eagle files (SCH only, sorry) can be download here:

Attached File  LCD Clock V2.rar   317.69KB   1 downloads


Viewing all articles
Browse latest Browse all 2077

Trending Articles