My Project, feedback needed

Gday all,
I am studying/part time teaching C++ in an australian technical college.
I have been asked to write a problem and solution for a class of young students.
This is what i have so far:

The header file 'DIGI_O.OBJ' contains functions 'void setup(void), 'int Ain(void)' and 'void Bout(int)'. The setup() function must be used once before accessing the 8255 card to set it up. the Ain() function returns the data from port A of the 8255 card as an integer between 0 and 255. The Bout() function outputs an integer between 0 and 255 to port B.
Write a C program to count the number of pulses from a switch connected to bit 0 of port A and display the count on a seven segment display connected to port B. The 7 segment display accepts a BCD number between 0 and 9. The count must be displayed clearly in the middle of the screen. When the count reaches 10 your program should beep and reset the count to 0.


Could someone please write me their version to the solution, because i am unsure if mine is correct or if my problem is too difficult for the students.

thanks,
Daniel
Redirect to clone thread:
http://cplusplus.com/forum/general/24526/

-Albatross
Topic archived. No new replies allowed.