Skip to content

mafdezmoreno/MSP430G2-Alarm-Clock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MSP430G2-Alarm-Clock

Introduction

Hardware Requirements

  • MCU: msp430g2553 or similar (with enough memory).
  • External low frequency clock (32768Hz).
  • PCB, proto board, something to build the circuit.
  • Programmer. In my case I'm using the programmer of a launchpad.

Warning: LaunchPads with eZ430-RF2500 will not work with linux or mac, look for launchpads with eZ-FET interface.

Functions Implemented

  • Clock
  • Date
  • Alarm
  • Control to set clock time and date time.
  • Control to set alarm
  • Battery level monitoring
  • Humidity and temperature with dht sensor
  • Auto lcd light on if some button is pushed
  • Low power mode. This mode reduces minimum power consumption from 0.71mA to 0.33mA

Compiling the Code

There are two principal compiler options:

The best way to avoid problems is use CSStudio and Ti compiler. Trying another options can ba a frustrating process.

Anyway, I prefer to generate/update the makefile with CSS and then work with Clion or VSCode.

I've also tried to create a cMake projects, based on AlexanderSidorenko repo, but with no success by now.

Flashing the MCU

There are several tools to flash the compiled code into the MSC:

  • Code Composer Studio, which uses internally MSP430Flasher (recommended).
  • MSP430Flasher cl software and your favourite text editor (more work). A 'upload' make argument can be manually placed inside the CSS generated makefile.
  • mspdebuger. This was my favourite in the past, but I was unable to make in work, maybe mspdebuger is not compatible with current TI compiler.

More info about upload code using MSP430Flasher here

Hardware Connections:

Connect the following signals from the debugger to the target MCU.

  • 3.3V
  • GND
  • SBWTDIO
  • SBWTCK

Schematics and PCB

A Kicad project is included in this repo. This projects include schematics and PCB.

Todo:

  • Review of connections
  • PCB Design
  • Gerber files generation and PCB ordering.

alt text

Other Comments and Problems Working With MSP430

The real time operations can be affected for encapsulation and compiler configuration and introduce in the compiled code unexpected delays. The solution can involve simplify the code (reduce encapsulation to make it "easier" to the compiler) and/or tune the compiler settings.

Useful resources

About

Small low power alarm-clock to learn about msp430 mcu

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published