High Level Design
The basic idea of our project is to use a micro-controller to implement a graphing calculator.
Our LCD screen is divided into three sections. The section with the largest area is the display screen. It either displays the stack in calculator mode or functions in graphing mode. The narrow field on the bottom displays user inputs. The narrow side box displays various messages. See below:
In the calculator mode, our calculator can calculate normal arithmetic functions, as well as sine, cosine, tan, exp, ln and log. It also can define the Xmin, Xmax, Ymin, Ymax, the size of the graphical screen in the graphing mode. The numbers are entered onto a stack. So when a function button is pushed, the latest two elements of the stacks are used for the calculation, the result is then pushed back onto the stack.
In the graph mode, it can graph polynomials, sine, cosine, tan, exp, ln, log, and any linear combination of them.
An ATMEL Mega103L chipset with a 320x200 Seiko G321DLCD display and two keypads;
After Initialization, the controller use Timer0 to keep polling user inputs through function Keypad1() and then Keypad2(). If users have entered something, then commands are set accordingly. When the Timer0 calls CommandHandler, it looks at the commands, and does calculations, and set various flags. Display function is used to update the LCD display, based on the flags set by CommandHandler. Display function updates the LCD by calling different LCD driver functions that output either text or graphing functions that graph lines and curves on the LCD screen.
The following is a graph of our high level design flow chart