LCDInfo.com

http://www.lcdinfo.com
It is currently Mon Nov 25, 2024 0:20

All times are UTC + 2 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Jan 09, 2008 10:45 
Offline

Joined: Wed Oct 10, 2007 11:52
Posts: 7
hi,
I have a lcd 240x128 and it has a T6963C driver...
(CM240128-1 LCD)

My lcd is connected with the parallel port, and I want to control the lcd with visual basic.
Is this possibel?
Does some 1 has a sample file you can send me?

this is my wiring circuit: http://chrix.woaf.net/hitachi/images/schema.jpg

sry for my bad english, but it would be really Happy if you could help me!

I found a topic for this, but Marc isn't answering on my pm...
http://forum.lcdinfo.com/viewtopic.php?t=127&highlight=

thx, Fre


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 09, 2008 14:22 
Offline

Joined: Sat Oct 28, 2006 22:18
Posts: 25
if you can control the port where the lcd is connected, yes then you should be able to do it, exactly how i cant tell thats all i can help


Top
 Profile  
 
PostPosted: Mon May 05, 2008 13:47 
Offline

Joined: Sun Oct 07, 2007 10:58
Posts: 3
You can learn parallel port access using VB6 from this site
http://lcdinterfacing.googlepages.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 11, 2008 21:34 
Offline

Joined: Wed Oct 10, 2007 11:52
Posts: 7
Hi,
I tried to make my one program but it doesn't work

I use the IO.dll file...
(http://www.geekhideout.com/iodll.shtml)

Code:
Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte)
Declare Sub PortWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Integer)
Declare Sub PortDWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Long)
Declare Function PortIn Lib "IO.DLL" (ByVal Port As Integer) As Byte
Declare Function PortWordIn Lib "IO.DLL" (ByVal Port As Integer) As Integer
Declare Function PortDWordIn Lib "IO.DLL" (ByVal Port As Integer) As Long
Declare Sub SetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub ClrPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Sub NotPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Declare Function GetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte) As Boolean
Declare Function RightPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function LeftPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Declare Function IsDriverInstalled Lib "IO.DLL" () As Boolean


this is my test code now:
(I press command button 2 then 4 after that 3, normally something would come on the screen...)
Code:
Private Sub Command2_Click() 'data x as
Call PortOut(&H37A, &HC) '0111 C/D low
Call PortOut(&H37A, &H8) '0011 WR low
Call PortOut(&H378, &H1) 'x = 1 (just a random guess)
Call PortOut(&H37A, &H9) '0010 CE low
Call PortOut(&H37A, &H8) '0011 CE high
Call PortOut(&H37A, &HC) '0111 WR high
End Sub
Private Sub Command3_Click() 'command char
Call PortOut(&H37A, &H4) '1111 C/D high
Call PortOut(&H37A, &H0) '1011 WR low
Call PortOut(&H378, &H55) 'char = u
Call PortOut(&H37A, &H1) '1010 CE low
Call PortOut(&H37A, &H0) '1011 CE high
Call PortOut(&H37A, &HC) '0111 C/D low
End Sub
Private Sub Command4_Click() 'data y as
Call PortOut(&H37A, &HC)
Call PortOut(&H37A, &H8) 'Y = 8 (just a random guess)
Call PortOut(&H378, &H1)
Call PortOut(&H37A, &H9)
Call PortOut(&H37A, &H8)
Call PortOut(&H37A, &HC)
End Sub

'wiring:  CE = 1
'         RD = 14
'         wr = 16
'         c/d = 17



it's pretty easy written cuz its still a test program.

Now a bit information:
To let something pop up on the screen you need to send first a few control signals.


.1 Write data - The data to be written should be set on D0 - 7 and

C/\D taken low,
/WR taken low (/RD should be high)
/CE pulsed low for greater than 80ns

2.2 Read data - C/\D take low,

/RD take low (/WR should be high)
/CE take low
After 150ns read the data on D0-7
/CE take high

2.3 Write Command - To Write a Command - The command should be set on D0 - 7 and

C/\D taken high,
/WR taken low (/RD should be high)
/CE pulsed low for greater than 80ns

2.4 Read Status - To check the Status of the T6963C controller -

C/\D take high,
/RD take low (/WR should be high)
/CE take low
After 150ns read the data on D0-7
/CE take high
Note that there is no such thing as reading an command instruction

To send something on the screen you need to follow this course:

status check
1st data Xadrs 24h
status check
2nd data Yadrs 03h
status check
Command 21h

Source:
http://www.nbb.cornell.edu/neurobio/land/STUDENTPROJ/1999to2000/gurnee/T6963rr.pdf

I think I did exactly what the wrote on the data sheet...
what could be wrong cuz it isn't working?

My lcd works fine, I tested it with lcd studio.

some important things:
rw, ce ,rd are inverted
c/d is right
(tested it with parallel port monitor.)


thx, Fré

If you don't understand something just ask!

(sorry for my bad english)


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 12, 2008 9:15 
Offline

Joined: Wed Oct 10, 2007 11:52
Posts: 7
some 1 said I need t setup the lcd first...

is it this I need to send?:
SET CONTROL WORD
REGISTERS SETTING

if it is:
http://img186.imageshack.us/img186/9673/setlcdej5.jpg

I don't understand what they mean with D1 and D2???

I just need to send the code on the data line?
and do nothing else with the read writhe commands?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 17, 2008 16:01 
Offline

Joined: Wed Oct 10, 2007 11:52
Posts: 7
After reading the datasheet again and again...
I found something wrond in my write data and write command.
Code:
_____________
|RD-CD-WR-CE|
|0 |0 |1 |0 |
|0 |0 |1 |1 |
|----Data---|
|0 |0 |0 |1 |
|0 |0 |1 |1 |
|0 |0 |0 |0 |

RD,WR en CE are inverted by the lpt port, this signals need to come to the driver also inverted. Becous you see on the t6963c datasheet that RD,WR en CE are inverted inputs. C/D is not inverted by the LPT port and I doesn't need to get inverted to the controller port.
I think this table is not wrong, But my lcd isn't still working?
Does anyone of you know what could be rong?(with the table or the code?)

Here is my code that I use:
Code:
Public Sub WriteCtrl(Command As Byte) 'command char
Call PortOut(&H37A, &H6)
Call PortOut(&H37A, &H7)
Call PortOut(&H378, Command)
Call PortOut(&H37A, &H5)
Call PortOut(&H37A, &H7)
Call PortOut(&H37A, &H4)
End Sub
Public Sub WriteData(Data As Byte) 'data x en y as
Call PortOut(&H37A, &H2)
Call PortOut(&H37A, &H3)
Call PortOut(&H378, Data)
Call PortOut(&H37A, &H1)
Call PortOut(&H37A, &H3)
Call PortOut(&H37A, &H0)
End Sub

'wiring:  CE = 1
'         WR = 14
'         c/d = 16 (not inverted)
'         RD = 17

Public Sub CursorPointerSet()
WriteData &H5
WriteData &H3
WriteCtrl &H21
End Sub

Public Sub OffsetRegisterSet()
WriteData &H0
WriteData &H2
WriteCtrl &H22
End Sub


Public Sub AddressPointerSet()
WriteData &H0 'lowerbits from the 8bit char
WriteData &H0 'upperbits from the 8bit char
WriteCtrl &H24
End Sub

Public Sub TextHomeAddress()
WriteData &H0 'Begin adress
WriteData &H0
WriteCtrl &H40 And &H40
End Sub

Public Sub TextAreaSet()
WriteData &H1E '30lijnen
WriteData &H0
WriteCtrl &H41 And &H41
End Sub

Public Sub GrapicHomeAddress()
WriteData &H2 'waar de grafieken moeten beginnen
WriteData &H0
WriteCtrl &H42 And &H42
End Sub

Public Sub GrapicTextAreaSet()
WriteData &H0 'volgende lijn waar de volgende grafiek moet beginnen
WriteData &H14
WriteCtrl &H43
End Sub

Public Sub ModeSet()
WriteCtrl &H80
End Sub

Public Sub DisplayMode()
WriteCtrl &H94
End Sub

Public Sub Settings()
CursorPointerSet
OffsetRegisterSet
TextHomeAddress
TextAreaSet
GrapicHomeAddress
GrapicTextAreaSet
End Sub

Public Sub DisplaySet()
ModeSet
DisplayMode
End Sub

Public Sub Send()
AddressPointerSet 'APS = 00, 00
WriteData &H55 'random char
End Sub


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

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 29 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:  
cron
Powered by phpBB® Forum Software © phpBB Group