Difference: SevenSegmentDisplayAndKeypad (2 vs. 3)

Revision 32021-01-21 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

Seven Segment Display and Keypad

The Seven Segment Display and its TM1637 controller

Line: 19 to 19
  Carefully read the data sheet.
Changed:
<
<
Write a driver implementing the serial protocol. Implement he driver as class TM1637 with the following methods:
>
>
Write a driver implementing the serial protocol. Implement the driver as class TM1637 with the following methods:
 
  • start_transfer: implements the start sequence (dio going low when clk is high)
  • stop transfer: implements the "end of transfer" sequence (dio going high when clk is high)
  • write_bit: write a single bit: with clk low, set dio to the bit value, then send a pulse (high followed by low) on the clk pin
  • write byte: send 8 bits. After the eights bit, check the acknowledge signal. Switch dio to input, check acq, switch dio back to output after the falling edge of the nineth clock pulse
  • display on: switch the display on: start_transfer, send display_on command, stop transfer
Changed:
<
<
  • create a table with the led setting of the seven segments. dp means decimal point, which is only used on the second digit, where it controls the following colon.
>
>
  • create a table with the led setting of the seven segments for all hex digits and a clear digit (all segments off). dp means decimal point, which is only used on the second digit, where it controls the following colon.
 
      A
     ---
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback