ni2c

Universal nixie i2c module driver for the Omega2 platform


Keywords
arduino, bcd, decoder, driver, fritzing, i2c, module, nixie, onion2, pcb
License
Other
Install
pip install ni2c==0.1

Documentation

Nixie i2c driver

  • Supports up to 8 stacked drivers
  • Each driver module can power 2 nixie tubes

Introduction

I2c Interface Definition

Byte 7(MSB) 6 5 4 3 2 1 0(LSB)
i2c slave address L H H H A2 A1 A0 R/W
I/O data bus P7 P6 P5 P4 P3 P2 P1 P0

Address Reference

  • Only the write addresses are shown as the nixie driver module doesn't support read operations.
  • Arduino uses 7-bit addresses, the LSB (R/W) is not set and the address range starts at 0x38
A2 A1 A0 i2c bus 8-bit slave address
L L L 0x70
L L H 0x72
L H L 0x74
L H H 0x76
H L L 0x78
H L H 0x7A
H H L 0x7C
H H H 0x7E

BCD Decoder Reference

The two bcd decoders each use 4-bit of the 8-bit I/O expander.

The 74141 decoder has 4 inputs marked A,B,C,D which trigger corresponding outputs.

Truth Table

D C B A Output
L L L L 0
L L L H 1
L L H L 2
L L H H 3
L H L L 4
L H L H 5
L H H L 6
L H H H 7
H L L L 8
H L L H 9

All values above 0x9 are out of range and turn all outputs off.

  • "on" range: 0x0..0x9
  • "off" range: 0xA..0xF

Using the Nixie i2c module

Based on the logic tables of the bcd decoders, writing to the i2c bus to output numbers is quite simple.

One byte defines the values for both decoders:

Decoder Bits
NIXIE 1 0000ABCD
NIXIE 2 ABCD0000

Data Examples

Example value Nixie Output
0xFF all off
0x12 "21"
0x01 "10"