If the following connections are made between the mbed and t

If the following connections are made between the mbed and the PC1602F LCD, What is the correct line of code to instantiate a TextLCD object for the LCD?

LCD pins: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

mbed pins: 1 39 1 24 1 19 no no no no 20 21 22 23 39 1

(a) TextLCD(24, 19, 20, 21, 22, 23);

(b) TextLCD(19, 20, 21, 22, 23, 24);

(c) TextLCD myLCDobject(19, 20, 21, 22, 23, 24);

(d) TextLCD myLCDobject(24, 19, 20, 21, 22, 23); (e) None of (a) through (d) is the correct answer.

Solution

The mbed TextLCD library is more advanced than the simple functions we
have created.

We need to ensure that our pins are defined in the follwing order to  instantiate a TextLCD object for the LCD

TextLCD myLCDobject(19, 20, 21, 22, 23, 24);

For example....

Compile a “Hello World” example using the mbed library, which
makes use of an alphanumeric LCD much simpler and quicker to program.


#include \"mbed.h\"
#include \"TextLCD.h\"
TextLCD lcd(p19, p20, p21, p22, p23, p24);
int main() {
lcd.printf(\"Hello World!\");
}

Finally what iam saying is answer (c) is correct.

If the following connections are made between the mbed and the PC1602F LCD, What is the correct line of code to instantiate a TextLCD object for the LCD? LCD pi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site