Bullwinkle
05-07-2006, 03:34 PM
I'm in the process of transferring a breadboarded project to Eagle Lite. Part of my project will use the LCD display that can with the Stampworks kit.
However trying to connect up the BS2 pins 12..15 to the LCD header was just impossible (single sided PCB...).
The right hand side of the BS2 looks like this:
P15
P14
P13
P12
...
The LCD header looks like this (rotated 180 degrees to line up better with the BS2):
DB7 DB6
DB5 DB4
. .
. .
E RW
RS .
. .
In the end I just connected the pins on the BS2 to the header in THE ONLY WAY that would eliminate tracks crossing each other. Which was like this:
P15 -> DB4
P14 -> DB6
P13 -> DB7
P12 -> DB5
P11 -> E
P10 -> RS
P9 -> RW
This solves the hardware problem. But software was simple writting nibbles to P12..P15 to drive the LCD. Since the bit ordering is not screwed I have to change my code from this:
LCD_Out:
nLCDbus = yChr.HIGHNIB ' output high nibble
PULSOUT E, 3 ' strobe the Enable line
nLCDbus = yChr.LOWNIB ' output low nibble
PULSOUT E, 3
HIGH RS ' return to character nMode
RETURN
to this:
LCD_Out:
nLCDbus = (yChr.HIGHNIB.BIT0 << 3) | (yChr.HIGHNIB.BIT2 << 2) | (yChr.HIGHNIB.BIT3 << 1) | (yChr.HIGHNIB.BIT1) ' output high nibble
PULSOUT E, 3 ' strobe the Enable line
nLCDbus = (yChr.LOWNIB.BIT0 << 3) | (yChr.LOWNIB.BIT2 << 2) | (yChr.LOWNIB.BIT3 << 1) | (yChr.LOWNIB.BIT1) ' output low nibble
PULSOUT E, 3
HIGH RS ' return to character nMode
RETURN
I have attached the circuit diagram if anybody is interested. It's ALMOST finished. Just need to add a few connections to the shift register and I think I'm finally done.
Has anybody else had this kind of problem? How did you solve it? This is my first project so I don't want to do a double sided PCB. Single sided is hurting my brain enough.
However trying to connect up the BS2 pins 12..15 to the LCD header was just impossible (single sided PCB...).
The right hand side of the BS2 looks like this:
P15
P14
P13
P12
...
The LCD header looks like this (rotated 180 degrees to line up better with the BS2):
DB7 DB6
DB5 DB4
. .
. .
E RW
RS .
. .
In the end I just connected the pins on the BS2 to the header in THE ONLY WAY that would eliminate tracks crossing each other. Which was like this:
P15 -> DB4
P14 -> DB6
P13 -> DB7
P12 -> DB5
P11 -> E
P10 -> RS
P9 -> RW
This solves the hardware problem. But software was simple writting nibbles to P12..P15 to drive the LCD. Since the bit ordering is not screwed I have to change my code from this:
LCD_Out:
nLCDbus = yChr.HIGHNIB ' output high nibble
PULSOUT E, 3 ' strobe the Enable line
nLCDbus = yChr.LOWNIB ' output low nibble
PULSOUT E, 3
HIGH RS ' return to character nMode
RETURN
to this:
LCD_Out:
nLCDbus = (yChr.HIGHNIB.BIT0 << 3) | (yChr.HIGHNIB.BIT2 << 2) | (yChr.HIGHNIB.BIT3 << 1) | (yChr.HIGHNIB.BIT1) ' output high nibble
PULSOUT E, 3 ' strobe the Enable line
nLCDbus = (yChr.LOWNIB.BIT0 << 3) | (yChr.LOWNIB.BIT2 << 2) | (yChr.LOWNIB.BIT3 << 1) | (yChr.LOWNIB.BIT1) ' output low nibble
PULSOUT E, 3
HIGH RS ' return to character nMode
RETURN
I have attached the circuit diagram if anybody is interested. It's ALMOST finished. Just need to add a few connections to the shift register and I think I'm finally done.
Has anybody else had this kind of problem? How did you solve it? This is my first project so I don't want to do a double sided PCB. Single sided is hurting my brain enough.