Hi all, I am trying to get an HD44780 parallel display to work with an 08M2 chip. I have successfully simulated the circuit using Picaxe VSM and it works perfect, however, when I built it it did not display anything at all. Is there something I am missing? Any help would be appreciated. Here is the code:
Code:
pause 100
'############################Define Sysmbols for 74HC595 and HD44780 pins
symbol shift595_CLOCK=c.0 'Shift clock and Storage clock of 74HC595 are joined
symbol shift595_DATA=c.1
symbol LCD_LATCH=c.2 'Enable pin on HD44780 LCD module
symbol RS=c.4
symbol outbyte = b0
symbol counter = b1
symbol nibblecount = b2
symbol bitcount = b3
'###########################Send Inititialization commands
for counter = 0 to 6
lookup counter ,($33, $32, $28, $10, $01, $06, $0F), outbyte
low RS
gosub WRITE_LCD
next counter
'###########################Send Data
for counter = 48 to 57
outbyte = counter
high RS
gosub WRITE_LCD
'pause 100
next counter
'###########################Send Inititialization commands
counter = 0
lookup counter ,($C0), outbyte
low RS
gosub WRITE_LCD
'#############Send Data
for counter = 0 to 12
lookup counter ,("Hello World!!"), outbyte
high RS
gosub WRITE_LCD
next counter
end
'###########################Write data/instructions to the LCD Subroutine
WRITE_LCD:
for nibblecount = 1 to 2
for bitcount = 0 to 3
if bit7 = 1 then
high shift595_DATA
else
low shift595_DATA
endif
pulsout shift595_CLOCK, 1
outbyte=outbyte * 2
next bitcount
pulsout shift595_CLOCK, 1
pulsout LCD_LATCH, 1
pause 4
next nibblecount
return