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...
-
How does a return on investment pricing objective differ from an objective of increasing market share?
-
Explain the meaning of the term documentation as it pertains to computers and an information systems department. How might a clients documentation be used by the auditors?
-
Maui Resort Inc. determined that the balance in its deferred tax asset account on December 31, 2020, was \(\$ 50,000\). Management reviewed all available positive and negative evidence to estimate...
-
An excerpt from the income statement of the Kelly Company follows. Estimated fixed costs in Year 1 are $660,000. a. What percentage of sales revenue is variable cost? b. What is the break-even point...
-
Problem 6-6 (Algo) Consider the following table: Scenario Severe recession Mild recession Normal growth Boom Required: Probability 0.10 Stock Fund Rate of Return -34% Bond Fund Rate of Return -13%...
-
Lasky Manufacturing has two divisions: Carolinas and Northeast. Lasky has a cost of capital of 7.5 percent. Selected financial information (in thousands of dollars) for the first year of business...
-
You have access to two investment opportunities. Mutual Fund A, which promises 20% expected return with a variance of 0.36, and Mutual Fund B, which promises 15% expected return with a variance 0f...
-
A company is setting its direct materials and direct labor standards for its leading product. Direct materials cost from the supplier are $5.00 per square foot, net of purchase discount. Freight-in...
-
Brown Printing, a small family-owned business, began operations on March 1, manufacturing premium quality books. The owners have expertise in printing but no accounting knowledge or experience. The...
-
Johnson Manufacturing produces self-watering planters for use in upscale retail establishments. Sales projections for the first five months of the upcoming year show the estimated unit sales of the...
-
Suppose you are a nonprofit organization that has cultivated a relationship with a high-net-worth donor. This donor tells you that she is willing to make an investment in one of your programs that...
-
Carver Inc. uses the weighted-average method in its process costing system. The following data concern the operations of the company's first processing department for a recent month: Work in process,...
-
Sunland Hand Trucks has a preferred share issue outstanding that pays a dividend of $1.30 per year. The current cost of preferred equity for Sunland is 10.60 percent. If Sunland issues additional...
-
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.
-
Immediately after Parental Times Ltd had acquired control of Offspring One Ltd and Offspring Two Ltd the following balance sheets were drawn up. You are to draw up a consolidated balance sheet....
-
Pop Ltd buys 100 per cent of the shares of Sibling Ltd on 31 December 2002. The balance sheets of the two companies on 31 December 2003 are as shown. You are to draw up a consolidated balance sheet...
-
Dad and Mum Ltd bought 60 per cent of the shares of Child 1 and 2 Ltd on 31 March 2004. The balance sheets of the two companies on 31 March 2005 are as follows. You are to draw up a consolidated...
Study smarter with the SolutionInn App