Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > LCD/Display


Reply
 
Share Thread Tools Display Modes
Old 05-16-2002, 12:03 AM   #1
Registered User
 
Join Date: May 2002
Location: Australia
Posts: 30
mosh
batch file programming LCD's

When i start my mp3box i want to write something on the LCD screen.
i'ts running msdos and and when i boot it up i will make a autoexec.bat type of file and make it print on the screen a program selection. What i was wondering if anyone has tryied this, is in batch file programming you can redirect an output to a serial port or paralell port instead of the screen so if i ECHO'ed some text to the Com1 or LPTn port will is print it on the LCD? I can't try this at the moment becasue i don't have one.

or if not can anyone sujest anything else.



by the way anyone wants to know a bit of batch file programming it can be really useful. goto http://www.astalavista.com/code/dos/batch.shtml it's a very nice tut.
__________________
Cheers Mosh
mosh is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 05-16-2002, 12:34 AM   #2
FLAC
 
Join Date: Apr 2001
Location: Here, There, Everywhere
Posts: 1,436
magnetik
Re: batch file programming LCD's

you need to locate a little utility called lcdprint.exe. I have seen it floating around a bit, never used it myself personally....

then u can do things like

c:\>lcdprint.exe "Hello you, reading the LCD"

you can't just pipe the output from a DOS ECHO,etc to a printer/serial port and expect some action. its a little more advanced than that.....
__________________
Project - GAME OVER :(
magnetik is offline   Reply With Quote
Old 05-16-2002, 01:22 AM   #3
Registered User
 
Join Date: Apr 2002
Location: Bay Area, California, USA
Posts: 64
izaram
Here's the page for LCDPrint, it says it will print a text file, dunno about just strings. I can't try it because I don't have an LCD yet.

http://www.geocities.com/SiliconVall...therUtils.html

Someone else in this thread says they have been able to do what you mention (pipe text to com1).

http://www.mp3car.com/vbulletin/show...&threadid=3616

Hope it works. Please post your success/failure because I expect to do something similar.
izaram is offline   Reply With Quote
Old 05-16-2002, 05:44 PM   #4
Registered User
 
Join Date: May 2002
Location: Australia
Posts: 30
mosh
cheers

Thnx for that people
much appriciated when i get my LCD I'll try the LCDprint
I'll keep u posted
__________________
Cheers Mosh
mosh is offline   Reply With Quote
Old 05-17-2002, 04:23 AM   #5
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 51
kaysee
This is easy to do in a batch file, but only if you've got a serial LCD.

MODE COM1:9600,N,8,1,P
ECHO put your text here >COM1

assuming your serial LCD is configured for 9600 baud.

first line sets up the serial port - type MODE /? from a DOS prompt for more info. Make sure you've wired the LCD up correctly, or you'll get an Abort/Retry/Ignore error.

For a parallel LCD, it's a lot more involved, so LCDPRINT would be the best way to go.
__________________
-------
bum. broke it.
kaysee is offline   Reply With Quote
Old 05-18-2002, 06:04 PM   #6
Registered User
 
Join Date: Dec 2001
Location: Paignton, Devon, UK
Posts: 315
Andrew Chappell
This is easy to do with LCD Print using simple dos batch commands (old dos skills alert! )

You can use the dos command echo and redirect it to a text file (e.g. c:\out.txt) by using the following lines:

"
echo Congratulations, your lcd is working! > c:\out.txt
lcdprint 378 40 4 c:\out.txt
"

where 378 is your parallel port address and 40 4 is your lcd size

However, this isn't much good to get multiline output (as in on all lines of your lcd). The best way I know to do this is to create individual text files for the lines on your display and then combine them before outputting the combined file to the lcd using lcdprint.

Here is a pretty good way to do this - the example used is for a 40 x 4 display:

"
echo Line 1 of the display > c:\message1.txt
echo Line 2 of the display > c:\message2.txt
echo Line 3 of the display > c:\message3.txt
echo Line 4 of the display > c:\message4.txt
copy c:\message*.txt c:\out.txt /y
lcdprint 378 40 4 c:\out.txt
"

Basically, you prepare each line of your text and send it to an individual filename sharing a common beginning (e.g. message*.txt). The copy command then combines the files including a carriage return at the end of each file, giving you a 4 line text document. You must be sure to add the /y extension on or it will not overwrite c:\out.txt if it already exists. Then, LCDprint is called to output the text to the screen.

Things are so much easier in visual basic...

If you are still stuck then I can send you a dummy batch file e.t.c.

Have Fun

Andrew
__________________
Mediabox Hardware Project
Current Stage: A complete redesign, although not much happening right now!

Mediabox Software Project
Status: Writing Sync Software (still) and playing around with interface
To do: Far too much!
Andrew Chappell is offline   Reply With Quote
Old 05-19-2002, 01:55 AM   #7
Registered User
 
Join Date: May 2002
Location: Australia
Posts: 30
mosh
cheers andrew and kaysee

U guys were alot of help thanks so much that.
The LCDprint looks like the way to go


thanks so much
__________________
Cheers Mosh
mosh is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics