P2-7 - unsigned int ndx, unsigned int val); 3. Your top...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Spring 2007 Embedded Systems Programming Project 2-7 It’s show time 1. Download the time.c and seven.c examples. Work with these routine and design an addition to our project what will display the current value of the time counter we developed in part 3 on the seven segment display. The display should show days (2 digits), hours (2 digits), minutes (2 digits) and seconds (2 digits). 2. Consider making functions that will make each segment appear as an array element. Function prototypes might be as follows: void seven_segment_init( void ); unsigned int get_segment( unsigned int ndx); void set_segment(
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: unsigned int ndx, unsigned int val); 3. Your top level should look something like the following. /* file: p2_7.c */ #include <stdio.h> #include "alive.h" #include "progress.h" int main ( void ) { printf( "\n\rStarting p2_4.c (ESP N2 V2)\n\r" ); if ( sys_clock_init() != 0 ) { printf ( "No system clock available\n" ); return 4; } seven_segment_init(); while (1) { // this is where we will eventually do some real work show_time(); // display value of time counter show_progress(); // make it look like we are working alive(); // show that we are still alive } return 0; }...
View Full Document

This document was uploaded on 11/01/2011 for the course EE 492 at Boise State.

Ask a homework question - tutors are online