An eight-output controller directly drives a common-anode display. Bits 0 through 6 correspond to segments aaa through ggg, and bit 7 controls the decimal point. The logical illumination mask for digit 5 with the decimal point off is 0b01101101, where 1 means lit. The hardware output byte instead uses 1 for HIGH and 0 for LOW. With the common anode at the positive supply, which output byte produces the intended display?
0b10010010
0b00010010
0b11101101
0b01101101
Unlock full course notes by signing up
Pack digit patterns into bytes
Firmware stores one byte per digit for a common-cathode seven-segment display. The bit order, from bit 7 down to bit 0, is dp g f e d c b a, and a 1 lights that segment. The decimal point stays off. The segments are named as in the figure; on this display the digit 6 includes the top segment a and the digit 9 includes the bottom segment d.
Complete the table. Write each binary byte as eight digits, most significant bit first, with no spaces. Write each hexadecimal value as two hex digits without a 0x prefix.
Include the blanking time in the scan budget
A microcontroller multiplexes a four-digit common-cathode display, scanning the digits one after another. Each digit is lit for 2.0 ms, and after each digit all four digits are blanked for 0.5 ms before the next one is switched on. While a digit is lit, each of its lit segments carries 15 mA. Assume the displayed value does not change, so a given segment is lit in every frame.
Find the frame period (the time to show all four digits once) in ms to one decimal place, the refresh rate of each digit in Hz to the nearest whole number, the duty cycle of each digit (the percentage of time it is lit) to the nearest whole percent, and the average current through one lit segment in mA to one decimal place.
Repair a mapping that passes one digit test
A common-cathode display uses logical masks with bits 0 through 6 assigned to a,b,c,d,e,f,ga,b,c,d,e,f,ga,b,c,d,e,f,g. A function extracts bit sss and writes its state to segmentPins[s]. The current array is {2, 3, 4, 5, 6, 7, 8}, where each number identifies a digital output pin.
Exactly two segment connections have been interchanged; all others are correct. Testing shows:
Requesting digit 1, whose mask lights b,cb,cb,c, actually lights c,fc,fc,f.
Check the current when every segment is lit
A controller continuously displays 8 on one common-cathode digit, lighting all seven segments. Each segment has its own identical resistor. Under the stated ideal model, every HIGH output remains at 4.80 V4.80\ \text{V}4.80 V, every lit LED drops 2.00 V2.00\ \text{V}2.00 V, and the common cathode is at ground.
The permitted current is at most 10.0 mA10.0\ \text{mA}10.0 mA per output and 50.0 mA50.0\ \text{mA}50.0 mA combined across these seven outputs. The common terminal is rated above 50.0 mA50.0\ \text{mA}50.0 mA, the decimal point is disconnected, and there are no other loads. Treat resistor values as exact. Available resistors are 330 Ω330\ \Omega330 Ω, 390 Ω390\ \Omega390 Ω, 470 Ω470\ \Omega470 Ω and 680 Ω680\ \Omega680 Ω. Which is the smallest available resistance that satisfies both output-current limits?