eRaj MP3 Alarm Clock


Project Proposal

Final Report

Schematics / Artwork

Power Budget

Cost

Future Work

Code

Datasheets

Files


Code

  • sm.c - This file implements the control algorithm for a SmartMedia 8MB card using a Cypress EZUSB chip (enhanced Intel 8051 core + EZUSB engine). The code initializes the microcontroller programmable i/o pins to talk with the SmartMedia card, sends 512 bytes to the card for programming, then attempts to read the programmed data. See comments in the code file for more information.


  • display.c - This collection of functions allow for the initialization of the LCD display and the display of both time and alarm status. The function initialize() runs the display through its initialization routine. The function displayTime( int hr, int min, bool pm) displays the current time given the hour and minute values as integers and the AM/PM status as a boolean (AM=0, PM=1). The function displayAlarm(bool off, bool type) displays the alarm type. If off=1 the alarm is off and no status information is displayed. If off=0 and type=0 the icon for the buzzer alarm is displayed. If off=0 and type=1 the icon for the musical alarm is displayed. In addition to these main functions, there are the helper functions writeChar(int char) and writeBlank(). writeChar will write a single numeric character from 0-9 on at the current cursor position on the display. writeBlank writes a blank space at the current cursor position.


  • rtc.c - This code contains functions to use the 3-wire connection, set the time and alarm for the alarm clock, and check the alarm as well. Check the main function here for examples of how the final code should ultimately use the written functions.


  • mp3.c - This pseudocode performs the simple task of clocking out data to the MP3 decoder when it asks for it. Except for I2C control commands to the decoder, this is the sole link between the audio system and the rest of the board.
   
© 2001 Seth Eatinger, JP Slavinsky, Aamir Virani, Ray Wagner