A microprocessor controlled digital clock is to use 7-segment LED display modules. Each module comprises seven...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A microprocessor controlled digital clock is to use 7-segment LED display modules. Each module comprises seven LEDs with their anodes (positive connections) connected together. The identification of each of the seven segments is shown in Figure 1. 18 SEGMENT IDENTIFICATION ор. RBO RB3 PIC 18F27K40 RCO. RB6 Driver (b) 0123456 789 3 8 Driver 0 Figure 1: Display Segment Identification Four display modules are connected to a PIC 18F27K40 as shown schematically in Figure 2. Anodes 1 7-Segment Display Cathodes 2 7 NUMERICAL DESIGNATIONS-RESULTANT DISPLAYS 4 Anodes 7-Segment Display Cathodes 5 6 Anodes 7-Segment Display Cathodes Anodes 9 7-Segment Display Cathodes Figure 2: Schematic Connections The cathodes (negative connection) of all segment 'a' LEDs are connected in parallel to pin RCO, all segment 'b' LEDS are connected in parallel to pin RC1, etc. The anodes of the least significant digit are connected to RBO and those of the most significant digit are connected to RB3. In operation, one anode and one cathode must be activated to illuminate a segment. A four-phase, time-division-multiplexed scan of all display digits must be completed at a scan rate of greater than 25 Hz to avoid perceptible flicker. (a) Discuss (using quantitative measures) the need for drivers between the PIC 18F27K40 and the display modules. You discussion should include the maximum supply current of the PIC 18F27K40, the maximum IO Pin current of the PIC 18F27K40 and the worst-case consumption of the circuit shown in Figure 2. The 10 pin connections are to be abstracted using memory-mapped structures with members. Anodes' and '. Cathodes'. Show all the code necessary to define, instantiate and set the directions of the IO pins. (c) Discuss the use of look-up tables when writing simple, elegant and reliable code. Illustrate your answer by assuming that an integer in the range 0..9 is to be displayed on a 7-segment module. (d) A time-division multiplexer routine is to be written to output four integers to the display modules shown in Figure 2. The PIC 18F27K40 is assumed to run at a 4 MHz clock speed and Timer 2 will be used to scan the display at a 50 Hz rate using an interrupt routine following a '#INT TIMER2' compiler directive. The four integers are stored in a global array instantiated as 'int Display_Digits[4]'. Show the code contained within the interrupt routine. (e) A 32.768 kHz crystal is connected to the secondary oscillator of Timer 1. Timer 1 is then configured to interrupt the processor at a 1 Hz rate. Show the code required to implement a 24-hour digital clock (hours:minutes) on the four digit display shown in Figure 2. Much of the code will be contained within an interrupt routine following a '#INT_TIMER1' compiler directive. The four integers stored in the global array 'Display_Digits' will be updated appropriately. A microprocessor controlled digital clock is to use 7-segment LED display modules. Each module comprises seven LEDs with their anodes (positive connections) connected together. The identification of each of the seven segments is shown in Figure 1. 18 SEGMENT IDENTIFICATION ор. RBO RB3 PIC 18F27K40 RCO. RB6 Driver (b) 0123456 789 3 8 Driver 0 Figure 1: Display Segment Identification Four display modules are connected to a PIC 18F27K40 as shown schematically in Figure 2. Anodes 1 7-Segment Display Cathodes 2 7 NUMERICAL DESIGNATIONS-RESULTANT DISPLAYS 4 Anodes 7-Segment Display Cathodes 5 6 Anodes 7-Segment Display Cathodes Anodes 9 7-Segment Display Cathodes Figure 2: Schematic Connections The cathodes (negative connection) of all segment 'a' LEDs are connected in parallel to pin RCO, all segment 'b' LEDS are connected in parallel to pin RC1, etc. The anodes of the least significant digit are connected to RBO and those of the most significant digit are connected to RB3. In operation, one anode and one cathode must be activated to illuminate a segment. A four-phase, time-division-multiplexed scan of all display digits must be completed at a scan rate of greater than 25 Hz to avoid perceptible flicker. (a) Discuss (using quantitative measures) the need for drivers between the PIC 18F27K40 and the display modules. You discussion should include the maximum supply current of the PIC 18F27K40, the maximum IO Pin current of the PIC 18F27K40 and the worst-case consumption of the circuit shown in Figure 2. The 10 pin connections are to be abstracted using memory-mapped structures with members. Anodes' and '. Cathodes'. Show all the code necessary to define, instantiate and set the directions of the IO pins. (c) Discuss the use of look-up tables when writing simple, elegant and reliable code. Illustrate your answer by assuming that an integer in the range 0..9 is to be displayed on a 7-segment module. (d) A time-division multiplexer routine is to be written to output four integers to the display modules shown in Figure 2. The PIC 18F27K40 is assumed to run at a 4 MHz clock speed and Timer 2 will be used to scan the display at a 50 Hz rate using an interrupt routine following a '#INT TIMER2' compiler directive. The four integers are stored in a global array instantiated as 'int Display_Digits[4]'. Show the code contained within the interrupt routine. (e) A 32.768 kHz crystal is connected to the secondary oscillator of Timer 1. Timer 1 is then configured to interrupt the processor at a 1 Hz rate. Show the code required to implement a 24-hour digital clock (hours:minutes) on the four digit display shown in Figure 2. Much of the code will be contained within an interrupt routine following a '#INT_TIMER1' compiler directive. The four integers stored in the global array 'Display_Digits' will be updated appropriately.
Expert Answer:
Answer rating: 100% (QA)
AnswerA In digital equipment a display driver is typically a semiconductor coordinated circ... View the full answer
Related Book For
Accounting Information Systems
ISBN: 9780132871938
11th Edition
Authors: George H. Bodnar, William S. Hopwood
Posted Date:
Students also viewed these mechanical engineering questions
-
In the marginal-productivity theory shown in Figure 1 2-8, let land rather than labor be the varying input. Draw a new figure and explain the theory with this new diagram. What is the residual factor?
-
B) For the truss assemblage shown in Figure 1 use the direct stiffness method to: i) Assemble the global stiffness matrix. ii) Solve for the nodal displacements. iii) Determine the stress in each...
-
Consider the thermal tanks with recycling shown in figure 1 below. The recycle stream is constant at 20% of the total flow out from the process. Assuming constant fluid properties and holdups. Derive...
-
A flat and infinitely large sheet with uniform charge density moves with constant speed in a direction parallel to its surface. Confirm the differential form of Poyntings theorem at every point not...
-
What are the different levels of financial statement assurance provided by audits, reviews, and compilations?
-
What default value would you choose for gender?
-
Some of the prior interviews suggest that the company is so cheap that they wont pay people what they are worth. Have you had similar experiences?
-
Purchases Recorded Gross and Net some of the transactions of Torres Company during August are listed below. Torres uses the periodic inventory method. August 10 Purchased merchandise on account,...
-
Schultz Incorporated ("Schultz") is a California manufacturer. Schultz employs several hourly, nonexempt workers in assembly-line positions. As a result, they are entitled to receive meal and rest...
-
Major Project - Andrew Best - Best Business Solutions Incorporated (BBSI) Andrew Best was a very inquisitive child growing up. He was a great student in school and always asked a lot of questions....
-
Sackville scale of hotness for selected chili peppers. Explain the popular theory, as to why Chiles are so pleasurable to eat. in addition, explain the health benefits from eating Chiles.
-
In October 2019, the average rent for a two-bedroom apartment in Ottawa was approximately $1,720 per month. Whereas the average house price was approximately $465,000. Assume for all payments that...
-
You just turned 30 years old, and decided that it is time to start saving for retirement. Based on your anticipated income and expenses, you expect to be able to invest $4,000 each year until you are...
-
Calculate the present value of the following stream of cash flows. The discount rate is 10%. The CF at t=0 is $1000. CFs grow at 12% for the first 6 years. Beyond that CFs grow at a rate of 4%...
-
The December 31, 2015, balance sheet of Schism, Inc., showed long-term debt of $1,385,000, $137,000 in the common stock account, and $2,620,000 in the additional paid-in surplus account. The December...
-
1. Consider two firms engaging in Bertrand Competition. Each firm picks a price at which to charge for their good. All of the demand for the good goes to the firm with the lowest price, where the...
-
Lorenz is a 'passive' owner of Dodgy Ltd. ("Dodgy") (i.e., he owns the company as an investment but is not actively involved in managing operations). Dodgy sells 10 completely different products,...
-
Find the APR in each of the following cases: NUMBER OF TIMES COMPOUNDED Semiannually Monthly Weekly Infinite EAR APR 10.4% 8.9 11.6 15.4
-
Harvard Square Software Company uses a manual sales order processing system. Sales order forms (three copies) are prepared by the sales department and forwarded to the accounting department. In the...
-
1. Which of the following is the most important element of internal control relating to the raw materials inventory of a manufacturing company? a. The physical inventory count should be made by...
-
Proper interviewing can either make or break an investigation. Describe the types of questions that are used in the interviewing process.
-
Santinis new contract for 2019 indicates the following compensation and benefits: Santini is 54 years old at the end of 2019. He is single and has no dependents. Assume that the employer matches $1...
-
In 2019, Nina contributes 10 percent of her $100,000 annual salary to her 401(k) account. She expects to earn a 7 percent before-tax rate of return. Assuming she leaves this (and any employer...
-
In 2019, Nitai (age 40) contributes 10 percent of his $100,000 annual salary to a Roth 401(k) account sponsored by his employer, AY Inc. AY Inc. matches employee contributions to the employees...
Study smarter with the SolutionInn App