0

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

3
Contributors
2
Replies
4
Views
7 Years
Discussion Span
Last Post by Nick Evan
1

This probably belongs in the 'C' forum as it is not C++.

I agree: moved.

@OP: I suggest you post the code that you're currently using. How are we supposed to give feedback on code we can't see? You wouldn't be tricking us in giving you free homework 'ey? Because that would be against the rules.. :icon_wink:

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.