I'm having a problem with stray bytes on my lcd when i switch the CS. This is the code im using to switch CS
Code:
Sub fctnCS()
If CurCS = 1 Then
WriteItC ReadItC And Not 4
WriteItC ReadItC And Not 2
CurCS = 2
Else
CurCS = 1
WriteItC ReadItC Or 2
WriteItC ReadItC Or 4
End If
End Sub
Sub WriteItC(bytInfo As Byte)
DlPortWritePortUchar 890, bytInfo
End Sub
Function ReadItC() As Byte
ReadItC = DlPortReadPortUchar(890)
End Function
My LCD is wired using the Liquid MP3 schematic found on that website.
What happens is when i execute that code i get something that looks like this
0
0
0
1
1
1
0
1
and it adds one to each side of the lcd each time i execute the sub.
its really frustrating because its not consistant
if i have data on the LCD...for instance picture that measure 128 x 64 and i execute the sub it just erases data starting at x=0. however, if im in the middle of drawing the picture, and the sub is executed to work on the other side, the first byte of the row gets corrupted....its very frustrating...andy help is appreciated. thanks in advance
SpaDusA
by the way....the code was visual basic 6.0[/img]