User Tools

Site Tools


en-us_commands:reference:isegwrite

This is an old revision of the document!


IsegWrite()

IsegWrite() outputs segment data at the specified position.

IsegWrite command operation flow

bool IsegWrite(const uint8_t segments[], uint8_t length = 4, uint8_t position = 0, uint8_t device = 0)

Commands

Command Arguments Return Value Operation
IsegWrite(segments, length, position, device) const uint8_t segments[] — Array of XGFEDCBA segment bits for each digit
uint8_t length = 4 — Number of digits to write 1~4
uint8_t position = 0 — Start position 0~3; the leftmost digit is 0
uint8_t device = 0 — FND device number 0~6, defaults to 0
bool Outputs segment data at the specified position.

Example

uint8_t data[4] = {
  IsegEncodeDigit(1),
  IsegEncodeDigit(2),
  IsegEncodeDigit(3),
  0x3E                    // V: F,E,D,C,B
};
 
IsegWrite(data);

Precautions

  • These commands are only for 4-digit FND displays with a TM1637 IC. They do not directly drive a generic multiplexed FND display.
  • Use display commands after successfully calling IsegBegin().
  • Initialization fails if CLK and DIO use the same pin, or if the device number is 7 or higher.
  • length + position must be 4 or less. Numbers outside the range are not displayed, and false is returned.
  • Communication may block execution for several ms. Do not call this from an interrupt service routine.
  • Do not use the specified pins simultaneously for UART, PWM, encoders, external interrupts or other functions.
  • Check the actual module and product manuals for FND power and signal voltages.

← Built-in Command List

en-us_commands/reference/isegwrite.1788785568.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki