LCDInfo.com

http://www.lcdinfo.com
It is currently Fri Nov 22, 2024 0:16

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu May 26, 2005 16:35 
Offline

Joined: Thu May 26, 2005 16:21
Posts: 2
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]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 15:32 
Offline

Joined: Thu Mar 16, 2006 22:01
Posts: 13
I have used this display, I admit was a bit rough in the beginning. but after much trial I finally got it.

from what I remember the screen is slip into two halves a left side and a right side. CS1 is for the left and CS2 is for the right. before we tackle CS2 can you turn on and off the correct pixels on the left side ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 16:00 
Offline

Joined: Thu Mar 16, 2006 22:01
Posts: 13
I Just remembered I wrote some code a long while ago for the CFAG12864B-YYH-V LCD. Should be almost the same as yours.

Anyway... try to leave the code in main all in tact because It gives a cool example of what the LCD code can do. Has things like Line, Box, Circle, Pset and so on.

Go to this group and then to the files section, and get the file called "128 x 64 LCD Driver"

[url] http://groups.yahoo.com/group/netburner_group/ [/url]


Good Luck!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group