Library to use my Photo MOS Relays Circuit having 16 or less channels.
Fork of PMRC4ch by
Diff: PMRC16ch.cpp
- Revision:
- 46:fe9918f73ec0
- Parent:
- 45:ed91c1743564
- Child:
- 47:a097e670a983
--- a/PMRC16ch.cpp Mon Aug 10 11:53:07 2020 +0000 +++ b/PMRC16ch.cpp Wed Oct 21 17:01:32 2020 +0000 @@ -167,7 +167,7 @@ update(); //enable insertion data to SR m_CLR = 1; - for(int i = 0; i < m_num_ch; i++) { + for(int i = 16 - m_num_ch; i < 16; i++) { tmp_bit[0] = 0b01 & (arg_bits >> (2 * i)); tmp_bit[1] = 0b01 & (arg_bits >> (2 * i + 1)); // if the chan. is not HiZ meaning Hi or Lw