diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6870ff7 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ + +TARGET := driver +SRCS := $(wildcard *.cc) + +all: $(TARGET) + +$(TARGET): $(SRCS) + $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $^ diff --git a/VFD.cc b/VFD.cc new file mode 100644 index 0000000..8bf1e06 --- /dev/null +++ b/VFD.cc @@ -0,0 +1,3 @@ + +#include "VFD.h" + diff --git a/VFD.h b/VFD.h new file mode 100644 index 0000000..9e3f1b3 --- /dev/null +++ b/VFD.h @@ -0,0 +1,43 @@ + +/* + * Author: Josh Holtrop + * Date: 2009-05-03 + * + * This module provides a C++ object-oriented interface to a + * Noritake itron Vacuum Fluorescent Display model CU20025ECPB-W1J + * that my friend Mike Zwagerman let me borrow. + * + * It is connected to my PC's parallel port as follows: + * CN1 Pin Parallel Port Pin + * Gnd 1 18 Ground + * RS 4 2 Data0 + * R/|W| 5 3 Data1 + * E 6 4 Data2 + * DB4 11 5 Data3 + * DB5 12 6 Data4 + * DB6 13 7 Data5 + * DB7 14 8 Data6 + * + * Additionally, CN1 pin 1 (ground) is connected to an independent 5 volt + * power supply's ground, and CN1 pin 2 (Vcc) is connected to the + * independent power supply's +5V line. + * + */ + +#ifndef VFD_H +#define VFD_H VFD_H + +class VFD +{ + public: + static const unsigned char RW_WRITE = 0; + static const unsigned char RW_READ = 1; + static const unsigned char E_ENABLE = 0; + static const unsigned char E_DISABLE = 1; + static const unsigned char RS_COMMAND = 0; + static const unsigned char RS_DATA = 1; + + protected: +}; + +#endif diff --git a/driver.cc b/driver.cc new file mode 100644 index 0000000..4c212be --- /dev/null +++ b/driver.cc @@ -0,0 +1,12 @@ + +#include +using namespace std; + +#include "VFD.h" + +int main(int argc, char ** argv) +{ + cout << "Working on VFD module" << endl; + + return 0; +}