LCDInfo.com
http://forum.lcdinfo.com/

LCD + LED + Delphi
http://forum.lcdinfo.com/viewtopic.php?f=9&t=773
Page 1 of 1

Author:  Obbelix [ Mon Aug 02, 2004 20:14 ]
Post subject:  LCD + LED + Delphi

Hi!

I'm about to buy a 20x4 LCD and wire it to the LPT port. I also want a single LED that I can control from my software. Can this be done via LPT pin 17?
The above shall be controlled from Delphi 6. Is there any nice example/component that fixes this easy? If it uses inpout32.dll it would be nice, because the application must workunder win 98 and XP.

I found a component for the LCD, VSSLCD (http://www.vss.co.nz/Delphi/DEFAULT.ASP) but this one don't use inpout32.dll. And how can I combine the code for the LCD and also set pin 17 to high?

The circuit will have a LCD, four buttons, a LED and should work like this:
I press button 1, signal goes to LPT pin 10, a process is started in the application. If the process is started with success, the LED should light up.
When button 2 is pressed, the process is stopped and LED goes off.
The LCD is used to show info from the application, both when LED is on and off.

Someone that can help me to program this in Delphi?
I know how I read from LPT if an button is pressed, so that is not a problem for me...

Author:  Henri [ Thu Aug 05, 2004 15:14 ]
Post subject: 

Yes, you can use the PIN17 to control a led if it's not used by the display. But in this case the code controlling the display also needs to be aware of this. So probably you need to write yourself the code controlling the display to make this work.

Everytime you write something to the control register of parallel port you write all the bits. You just need to make sure the bit corresponding to the PIN17 is always in the state you want.

Author:  Obbelix [ Thu Aug 05, 2004 19:50 ]
Post subject: 

Yes, I realize that some days ago but I didn't have any LCD to test with then. I got it today and I'm running it with success!

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/