Working! Had to insert an extra "enable" phase in VFD::sendNibble()
git-svn-id: svn://anubis/misc/parport-2x20vfd@114 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
c0c55edfec
commit
6c72574c16
5
VFD.cc
5
VFD.cc
@ -89,6 +89,11 @@ void VFD::setPPLines(unsigned char bits)
|
||||
|
||||
void VFD::sendNibble(unsigned char rs, unsigned char dat)
|
||||
{
|
||||
setPPLines( (rs << PP_OFFSET_RS)
|
||||
| (E_ENABLE << PP_OFFSET_E)
|
||||
| (RW_WRITE << PP_OFFSET_RW)
|
||||
| ((dat & 0xF) << PP_OFFSET_DATA) );
|
||||
usleep(1);
|
||||
setPPLines( (rs << PP_OFFSET_RS)
|
||||
| (E_DISABLE << PP_OFFSET_E)
|
||||
| (RW_WRITE << PP_OFFSET_RW)
|
||||
|
2
VFD.h
2
VFD.h
@ -71,7 +71,7 @@ class VFD
|
||||
static const unsigned char PP_OFFSET_RW = 1;
|
||||
static const unsigned char PP_OFFSET_E = 2;
|
||||
static const unsigned char PP_OFFSET_DATA = 3;
|
||||
static const int INIT_DELAY = 2400;
|
||||
static const int INIT_DELAY = 10000;
|
||||
|
||||
void sendByte(unsigned char rs, unsigned char dat);
|
||||
void sendNibble(unsigned char rs, unsigned char dat);
|
||||
|
Loading…
x
Reference in New Issue
Block a user