# Real Time Clock using MSP430

**URL:** <https://community.sparkfun.com/t/real-time-clock-using-msp430/2261>\
**Category:** MicroMod\
**Tags:** msp\
**Created:** [July 19, 2006, 8:49pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261 "2006-07-19T20:49:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilbert](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@dilbert](https://community.sparkfun.com/u/dilbert)\
**Post date:** [July 19, 2006, 8:49pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/1 "2006-07-19T20:49:58Z")

</div>

Hi !

Im a beginner in the field of embedded systems.

I am making a real time clock using the msp430F2013, which will display the time on a lcd (using a 32768 Hz external quartz crystal).

(I have the eZ430-F2013 tool)

The problem is I cannot create the circuit, as I don’t possess sufficient knowledge for that.

If somebody could help me (PLEASE !) with the schematic, i would be very grateful.

Thanks.

---

<div class="post-metadata">

**Author:** ![OldCow](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@OldCow](https://community.sparkfun.com/u/OldCow)\
**Post date:** [July 20, 2006, 2:00am UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/2 "2006-07-20T02:00:03Z")

</div>

Check [http://www.sparkfun.com/commerce/catego … p?cPath=76](http://www.sparkfun.com/commerce/categories.php?cPath=76) and pick a LCD that you like (but do not order it yet). Read the documents and draft a design to interface to F2013. Post your design here. And others will help you.

---

<div class="post-metadata">

**Author:** ![dilbert](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@dilbert](https://community.sparkfun.com/u/dilbert)\
**Post date:** [July 22, 2006, 9:09pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/3 "2006-07-22T21:09:35Z")

</div>

Hi !

I selected the Hitachi HD44780 16x2 screen, as its the most basic one !

I’ll use the 4-bit mode, as nothing else is possible with the ez430.

So, im going to have the following pin connections on the ez430F2013:

Pin 1 - Vcc

Pin 2 - (P1.0) -

Pin 3 - (P1.1) - RS (register select)

Pin 4 - (P1.2) - R/W (read write)

Pin 5 - (P1.3) - E

Pin 6 - (P1.4) - DB7

Pin 7 - (P1.5) - DB6

Pin 8 - (P1.6) - DB5

Pin 9 - (P1.7) - DB4

Pin 10 - RST

Pin 11 - TEST

Pin 12 - XOUT - quartz crystal

Pin 13 - XIN - quartz crystal

Pin 14 - Ground

I’ll handle the coding part, but i need help with the schematic.

Most of the parts reqd are already there on the ez430, but i need help with the following :

(i) a stable power supply for both HD44780(+4.2V and +5V) and ez430 Target Board (Pin1,14) (+5V or +3.3 V, im not sure)

(ii) how to connect the quartz crystal across XIN and XOUT

(iii) Any other external circuitry reqd.

Thanx

---

<div class="post-metadata">

**Author:** ![OldCow](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@OldCow](https://community.sparkfun.com/u/OldCow)\
**Post date:** [July 23, 2006, 5:23am UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/4 "2006-07-23T05:23:09Z")

</div>

My knowledge about this is very limited. I am sure others will help you.

(1) The datasheets of the Basic 16x2 LCD seems to say that there are two versions. One needs 4.5V to 5.5V to operate, the other one works anywhere from 2.7V to 5.3V. You need to ask SparkFun Electronics about this. The F2013 operates between 1.8V and 3.6V. Thus you definitely want to use the 2.7V to 5.3V LCD, so that F2013 and LCD can share a 3V Lithium primary battery. The LCD needs about 1.5 mA, F2012 needs less than 1 mA.

(2) The backlight of the LCD needs 4.2V and draws 120 mA. You probably need to use 3 AAA batteries and a push button to conserve battery life.

(3) The 32768 Hz crystal usually comes in a small cylindrical package with two leads at the same end of the cylinder. Just sold them directly to pins 12 and 13 of F2013. F2013 has internal capacitors for the crystal under firmware control.

(4) I think if you invert the order of DB4-7 so that they match P1.4-7 in the same order will make your firmware more straightforward.

---

<div class="post-metadata">

**Author:** ![OldCow](https://avatars.discourse-cdn.com/v4/letter/o/e274bd/32.png) [@OldCow](https://community.sparkfun.com/u/OldCow)\
**Post date:** [July 24, 2006, 5:00pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/5 "2006-07-24T17:00:53Z")

</div>

Could someone else help?

I asked Sparky about 3.3V LCD. This is his reply:

> All of our 16x2 LCDs are 5V - they don’t work at lower than 4.2V. Only
> 
> the CFAX display can run at 3.3V.
> 
> I’m not sure why all the 16x2 LCDs are produced this way. Could have
> 
> something to do with the internal negative bias generator circuit, but
> 
> the CFAX display does this without problems. Sorry we don’t have a lower
> 
> voltage display!
> 
> -Nathan

---

<div class="post-metadata">

**Author:** ![DIXON](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@DIXON](https://community.sparkfun.com/u/DIXON)\
**Post date:** [August 2, 2006, 7:50pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/6 "2006-08-02T19:50:25Z")

</div>

I have just bought a very nice displays from [www.mms-e.co.uk](http://www.mms-e.co.uk).

They have all kinds of displays that works at 3.3. I bought the DOG models, that without backlight are extremly thin comparing the standard ones.

I doesn’t measured the power consuption, but if it’s true what they say in the datasheet it is very low.

Regarding the interface, DOG displays not only have parallel 4 or 8 bit interface, it also has SPI that could be controlled with only 3 wires (parallel uses 4 or 8 plus 3 for control lines). I don’t remember if there were an other more interface.

I hope you find it usefull

Regards,

Carlos.

---

<div class="post-metadata">

**Author:** ![Verlwb](https://avatars.discourse-cdn.com/v4/letter/v/e9a140/32.png) [@Verlwb](https://community.sparkfun.com/u/Verlwb)\
**Post date:** [October 7, 2006, 12:01pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/7 "2006-10-07T12:01:30Z")

</div>

> DIXON:  
> I have just bought a very nice displays from [www.mms-e.co.uk](http://www.mms-e.co.uk).
> 
> They have all kinds of displays that works at 3.3. I bought the DOG models, that without backlight are extremly thin comparing the standard ones.
> 
> I doesn’t measured the power consuption, but if it’s true what they say in the datasheet it is very low.
> 
> Regarding the interface, DOG displays not only have parallel 4 or 8 bit interface, it also has SPI that could be controlled with only 3 wires (parallel uses 4 or 8 plus 3 for control lines). I don’t remember if there were an other more interface.
> 
> I hope you find it usefull
> 
> Regards,
> 
> Carlos.

thanks for the tip on the 3.3volt LCDs

verlwb/aka. dilbert

---

<div class="post-metadata">

**Author:** ![scoot](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@scoot](https://community.sparkfun.com/u/scoot)\
**Post date:** [December 20, 2006, 3:16am UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/8 "2006-12-20T03:16:38Z")

</div>

How do I insert a file?

I can send you a schematic for a board using an MSP430, real time clock, flash, rs232 comms to the pc, and an interface for a serial 128x64 LCD.

---

<div class="post-metadata">

**Author:** ![ik\_bahrian](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@ik\_bahrian](https://community.sparkfun.com/u/ik_bahrian)\
**Post date:** [March 20, 2007, 2:03pm UTC](https://community.sparkfun.com/t/real-time-clock-using-msp430/2261/9 "2007-03-20T14:03:37Z")

</div>

check this might be it will helpful for you…

[http://eleceng.dit.ie/frank/msp430/msp430Interrupts.pdf](http://eleceng.dit.ie/frank/msp430/msp430Interrupts.pdf)
