HT16K33 Class: Difference between revisions

Jump to navigation Jump to search
Line 132: Line 132:


=== GetComRegister(com) ===
=== GetComRegister(com) ===
Return register address.
*com : Register Number [1...16], regarding of the out latch you want to write. '''1''' is register for output '''1 - 8''' and Common '''1''', '''2''' is register  for output '''9 - 16''' and Common '''1''' ... etc. Method GetComPortRegister() should be used in place of GetComRegister().
Except for development or debugging and knowing what you are doing, there is no reason to invoke this method directly. It is a system method internal to the operation of the driver.
<syntaxhighlight lang="python">
<syntaxhighlight lang="python">
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
Line 140: Line 143:
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> MODULE_HT16K33 = FGINT1.getModule('HT16K33')
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>> LEDPACK2 = MODULE_HT16K33('LEDPACK2', '0x71', 0)
>>>
>>> print(hex(LEDPACK2.GetComRegister(3)))
0x2
>>>  
</syntaxhighlight>
</syntaxhighlight>


534

edits

Navigation menu