Device-Chip-MAX7219
view release on metacpan or search on metacpan
Switches the digit into BCD mode if not already so.
write_raw
await $chip->write_raw( $digit, $bits );
Writes the value at the given digit, setting the raw column lines to
the 8-bit value given.
Switches the digit into undecoded raw mode if not already so.
write_hex
await $chip->write_hex( $digit, $val );
Similar to write_bcd, but uses a segment decoder written in code rather
than on the chip itself, to turn values into sets of segments to
display. This makes it capable of displaying the letters A to F, in
addition to numbers, - and space.
lib/Device/Chip/MAX7219.pm view on Meta::CPAN
await $self->_writereg( REG_DIGIT+$digit, $val + ( $dp ? 0x80 : 0 ) );
}
=head2 write_raw
await $chip->write_raw( $digit, $bits );
Writes the value at the given digit, setting the raw column lines to the 8-bit
value given.
Switches the digit into undecoded raw mode if not already so.
=cut
async method write_raw ( $digit, $bits )
{
$digit >= 0 and $digit <= 7 or
croak "Digit must be 0 to 7";
my $decodemask = 1 << $digit;
( run in 0.378 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )