Q1. Listing 1, exam.cpp, is an mbed program used to display characters on a RS d
ID: 2078972 • Letter: Q
Question
Q1. Listing 1, exam.cpp, is an mbed program used to display characters on a RS display board. The latter is fitted with an mbed LPC1768 microcontroller module and has six large 7-segment elements, as shown in Figure 1. The pin assignments are summarised in Table 1, note that not all pins are used with the "exam.cpp program. Appendix 1 contains the LPC1768 pin diagram and corresponds to the pin numbers used in Table 1 You may assume that "PCA9635' is a driver for the on-display LEDs and that a suitable library is included in the project containing exam.cpp' ll Compile & Commit v Revision AI & Help exam cpp x #include "mbed.h" 2 #include "dispBoB.h" for RS 6 x 7-segment display 3 fincludeExplanation / Answer
Q1)
a)
i) First three lines of code indicates header files. So whenever we are execution any program in a module. We can use pre-defined variables or functions like DispBoB which is already defined in DispBoB.h
mbed.h provides library to build your application. It consists microcontroller independent module and it also includes useful c libraries, debug libraries and peripheral componenets.
DispBoB.h includes DispBOB object(class) which uses I2C protocol.
String.h includes various functions for manipulating arrays of characters , variable type and one macro
dispBOB Function cosists three parameter DispBoB(serial data , serial clock, enable pin). Pin 28 is used to get serial data which works on I2C serial protocol.
ii)
disp character type element consists selected strings to display
delimeter used is '-'
First character displayed will be E on last display (Right to left moved)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.