final assignment - 1(TCO 1 Which of the following best...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1. (TCO 1) Which of the following best describes the action of a keypad driver program? (Points : 10) Each row is activated one at a time until a column is found active. All eight keypad pins inject signals into port pins configured as input pins. The active key connects a port pin to common ground on the keypad. The keypad contains logic, which actively generates a 4-bit code for every key. Question 2. 2. (TCO 1) Which of the following is not an advantage of an LCD compared to an LED display? (Points : 10) Ease of programming Limited to display numbers and a few characters Ability to display numbers, characters, and graphics Declining prices Question 3. 3. (TCO 1) For the LCD, describe the function accomplished with the R/W~ control signal. Also, indicate whether this signal is an LCD input or LCD output. (Points : 10) #inclrude<reg52.h> //including sfr registers for ports of the controller. #include<lcd.h> // //LCD Module Connections sbit RS = P0^0; sbit EN = P0^1; sbit D0 = P2^0; sbit D1 = P2^1; 0 1226691000 MultipleChoice 2 0 1226691001 MultipleChoice 4
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
sbit D2 = P2^2; sbit D3 = P2^3; sbit D4 = P2^4; sbit D5 = P2^5; sbit D6 = P2^6; sbit D7 = P2^7; //End LCD Module Connections void Delay(int a) { int j; int i; for(i=0;i<a;i++) { for(j=0;j<100;j++) { }
Image of page 2
} } void main() { int i; Lcd8_Init(); while(1) { Lcd8_Set_Cursor(1,1); Lcd8_Write_String("electroSome LCD Hello World"); for(i=0;i<15;i++) { Delay(1000); Lcd8_Shift_Left(); } for(i=0;i<15;i++)
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
{ Delay(1000); Lcd8_Shift_Right(); } Lcd8_Clear(); Lcd8_Write_Char('e'); Lcd8_Write_Char('S'); Delay(3000); } } R/W~ signal status is used to define the function of the LCD display (if to read of to write) For write purpose R/W~ bit is set Low & for read purpose it is set High. This is Lcd input signal, provided by controller. Question 4. 4. (TCO 1 ) In the standard set-up of a keypad, the four rows are connected to 9S12G128 output ports, and the four columns are connected to input ports with internal pull up resistors enabled. In your own words, describe how the scanning program determines which key is pressed. (Points : 10) Keypad is like keyboards where arrays of switches are arranged in row and column 0 1226691002 Short 2
Image of page 4
Keypad scaomkg program: The keypad scanning program involves 3 stages Keypad scanning Key switch debounce ASCII code Look up Keypad scanning:
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern