Columbia ENGI E1112 - Presentation (21 pages)

Previewing pages 1, 2, 20, 21 of 21 page document View the full content.
View Full Document

Presentation



Previewing pages 1, 2, 20, 21 of actual document.

View the full content.
View Full Document
View Full Document

Presentation

26 views

Other


Pages:
21
School:
Columbia University
Course:
Engi E1112 - Gateway Lab for Computer Science and Computer Engineering
Gateway Lab for Computer Science and Computer Engineering Documents

Unformatted text preview:

ENGI E1112 Departmental Project Computer Science Computer Engineering By Kaiven Zhou Alex Ge Anna Teng Introduction THE LCD DISPLAY 1 void lcd init 2 void lcd put char7 char ch int col 3 void lcd print7 const char c Lab 1 A Scrolling Display By Abhinav Mishra Andrew Pope Yiming Ge Anna Teng Will VanArsdall Kaiven Zhou int strlen const char s int n for n 0 s 0 s n return n int main lcd init char test test int len 0 len strlen test int x 0 the message length of the message the starting position of the first character while 1 int i t j t x for i 0 i len i lcd put char7 test i t 12 t while j 50000 lcd print7 j 0 x return 0 j 1 clears the screen Lab 2 Scanning the Keyboard Keyboard init Keyboard column low int Keyboard column high int Keyboard row read int define NUM COLUMNS 7 define NUM ROWS 6 const char keys 44 N I YR PV PMT FG Amort CshFl IRR NPV Bond RCL INPUT UP 7 8 9 DOWN 4 5 6 x SHIFT 1 2 3 0 int keyboard key int i j int x 1 for i 0 i NUM COLUMNS i keyboard column low i for j 0 j NUM ROWS j if keyboard row read j keyboard column high i Resets the current column return x x keyboard column high i return 0 Lab 3 Entering and Displaying Numbers Was a number entered Was the change sign key pressed Was an operation entered Was a garbage key pressed By Kaiven Zhou Yiming Ge Anna Teng void keyboard get entry struct entry result int inputNumber INT MAX int lastKey 1 inputOperation 1 numOfDigits 0 lcd put char7 0 by default the number is positive while 1 while keyboard key ensure no key is pressed while lastKey 1 lastKey keyboard key get key if 0 lastKey lastKey 9 numOfDigits MAX NUM DIGITS if inputNumber INT MAX inputNumber 0 int integerOfLastKey lastKey 0 char to int inputNumber 10 inputNumber integerOfLastKey lcd put char7 lastKey numOfDigits 1 the newest digit placed should go after the sign and the previous number which has numOfDigits digits numOfDigits else if lastKey if inputNumber INT MAX inputNumber 0 inputNumber 1 if inputNumber 0 lcd put char7 0 else lcd put



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Presentation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Presentation and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?