updated pictures, added arduino example

This commit is contained in:
dekunukem
2017-11-20 16:58:03 +00:00
parent 76858d4fb2
commit 5d32d7f35a
4 changed files with 37 additions and 1 deletions

View File

@@ -1,6 +1,8 @@
# exixe: Low-cost miniature Nixie tube driver modules
![Alt text](https://i.imgur.com/JjhNDUQ.jpg)
![Alt text](resources/title.jpg)
![Alt text](resources/breadboard.jpg)
exixe is a miniature driver module for IN-12 and IN-14 Nixie tubes.

View File

@@ -0,0 +1,34 @@
#include <SPI.h>
#define SPI_BUF_SIZE 16
uint8_t spi_buf[SPI_BUF_SIZE];
const int slaveSelectPin = 10;
void setup()
{
pinMode(slaveSelectPin, OUTPUT);
digitalWrite(slaveSelectPin, HIGH);
SPI.begin();
// 8MHz SCLK, MSB first, SPI mode 0
SPI.beginTransaction(SPISettings(8000000, MSBFIRST, SPI_MODE0));
spi_buf[0] = 0xaa; // first byte, header
spi_buf[4] = 0x80 | 127; // digit 4 full brightness
spi_buf[13] = 0x80 | 127; // red LED full brightness
spi_buf[14] = 0x80 | 28; // green LED brightness 28
spi_buf[15] = 0x80 | 0; // blue LED fully off
}
void loop()
{
// cs low
digitalWrite(slaveSelectPin, LOW);
// send 16 byte command
for (int i = 0; i < SPI_BUF_SIZE; ++i)
SPI.transfer(spi_buf[i]);
// cs high
digitalWrite(slaveSelectPin, HIGH);
delay(200);
}

BIN
resources/breadboard.jpg Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

View File

Before

Width:  |  Height:  |  Size: 625 KiB

After

Width:  |  Height:  |  Size: 625 KiB