Driving a Bit shifted serial LCD, 2x8 PicVue PC064PYL , pt2

khamtanh

New Member
Driving a Bit shifted serial LCD, 2x8 PicVue PC064PYL , pt2
http://www.rev-ed.co.uk/picaxe/forum/Topic.asp?topic_id=3436

Guess it was a busy week when I first posted that.


After leaving it in the too hard basket for some time, felt a bit more confident attacking it again.

First analysed the assembly code.
.Read up on the commands to fully understand them.

Mapped timing of pins in excel.

Saw it didn't match with the data on hippy's page
.http://www.hippy.freeserve.co.uk/picaxe2l.htm

Decided to go in direct.
.removed the two hc164 ic's
.traced all the revelent wires.
.didn't know where the wr was
.soldered jumper wires out
.tested with working lcd circuit
..http://www.hippy.freeserve.co.uk/picaxelc.htm
.no go :(

guess it not a HD44780 compatible under that blop, or the wr is floating

Back into the too hard basket for now.
Why all the trouble when I can buy another one that is HD44780 complient for nz$13?
Hate to throw good parts away


Timing map
http://i11.photobucket.com/albums/a184/asnz2005/zMisc/8x2LCD/8x2Timing.jpg

Board
http://i11.photobucket.com/albums/a184/asnz2005/zMisc/8x2LCD/DSC01533.jpg

Traced
http://i11.photobucket.com/albums/a184/asnz2005/zMisc/8x2LCD/DSC01534.jpg

Rewired
http://i11.photobucket.com/albums/a184/asnz2005/zMisc/8x2LCD/DSC01535.jpg


Revelent assembly code:
LCDSetup
call d20ms ; wait 20ms while LCD initializes
movlw 0x30 ; LCD command (8-bit (logical) interface
call SndLCDCmd
movlw 0x38 ; LCD command (8-bit, 2 line display, 5X7 matrix)
call SndLCDCmd
movlw 0x0e ; LCD command (display on, cursor underline,
call SndLCDCmd ; and no blinking cursor)
call LCDCls ; Clear the screen
movlw LOW (M9Start - M1Start) ; set pointer to start of string
call SndLCDStr
return

LCDCls movlw 0x01 ; LCD command 01 (clear display - takes 1.64ms)
call SndLCDCmd
call d20ms ; overkill time delay
return
SndLCDChr
bsf STATUS, C ; set RS high (character) when carry bit gets output
goto SndIt
SndLCDCmd
bcf STATUS, C ; set RS low (command) when carry bit gets output
SndIt
bsf PortLCD, LCDE ; take E high before shifting data
movwf LCDTemp ; save character to output
movlw 09 ; loop through 8 bits + carry (RS)
movwf BitCnt
OutData
bsf PortLCD, LCDData ; output the state of the carry flag on LCDData line
btfss STATUS, C
bcf PortLCD, LCDData
bcf PortLCD, LCDClk ; clock out each bit
nop
bsf PortLCD, LCDClk ; Data shifts on low-high transition
rrf LCDTemp, F
decfsz BitCnt, F ; loop if all bits not sent
goto OutData
bcf PortLCD, LCDE ; lower E to latch data in LCD
return
 
Top