Programming LED Display

Hi all,

I want to control an LED display board (I think it's called 7 segment, not too sure though). It has four 'lines' - each line has 7 rows of LEDs and displays, I think, 40 characters (something like that). There's already software on the computer that does a good job, but I want to write my own for better functionality (NB: this is not for profit - I believe in freeware, and want to write this for my church).

Could anyone please help me out on how to do this? I know you probably need more detail on the microcontroller thingys or something, but what I do know is that it's connected via the serial port. I'd like to know how to control it from a C/C++ or VB program for Windows. Help on writing to ports in Windows most welcome.

Many thanks

imdAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

imdAuthor Commented:
Sorry for low points - 55 is all I had. It's actually worth more to me. Please help.
0
adg080898Commented:
Way more details are needed, but I'll try to give you he basic idea.

Most likely the display has it's own on-board logic to refresh the display. They use an idea called "multiplexing" where it actually only lights 8 (or so) LEDs at once, but it scans through the groups of 8 so fast that they all appear lit.

Those LED displays are a lot like printers, you send them commands and they obey them. LED displays usually have on-board embedded computer to store a sequence of messages and transitions, so that they can be preprogrammed to run and can be disconnected from the computer when you are finished programming it. The trick is to somehow find out the format of the commands.

The existing software might provide a "troubleshooting" display that shows the data sent to the display. You might be able to figure out enough of it to be of use, but it is not likely that you would be able to make the display any "better" than the existing software.

Is it RS-232 or RS-422?

Brand? The name of the software you already have?
0
imdAuthor Commented:
Thanks adg! You have no idea how long I've been trying to find out about this. I really appreciate this. Will up question points as soon as I get more.

Okay, it's RS-232 as far as I know. The software I have is called Hattech Church Display Controller (think it's local - I live in South Africa). Actually the display is fine - it's the user interface that bugs me. It's a DOS program written in something like TP7. Basically, all I want to do is use existing functionality (that's what I need to figure out how to code), with improved user interface and more features. The program allows you to enter songs (lyrics) and then display them on the LED board (quite simple).

The program does have some graphics view or something that shows you a graphical representation (very accurate) of how the display currently looks with what you've just 'sent' to it. It has options for flashing letters or bold letters.

All I really want to do is _add_ to the existing functionality, but utilise great technologies like database engines and GUI functionality.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

imdAuthor Commented:
Oh yes, about the serial port, it's just connected to COM1. There's also a small LCD display connected to the same cable.
0
adg080898Commented:
Do you have another PC or a laptop available? If so, you could run a terminal program (HyperTerminal included in Windows comes to mind) to "listen in" on what it is sending the display.

Instead of hooking the RS-232 cable up to the LED display, plug it into the serial port of another PC (or laptop). NOTE: You will need a "crossover" or "null modem" cable for this. It "crosses over" so _send_ goes to _receive_ and vice-versa. Get one at any computer store. (Note: only use for connecting computer-to-computer, use your existing cable whenever you connect to the display).

Using the existing sign software, make a very simple message for the display. Then, get the software to update the display. If you are lucky and the software doesn't wait for responses from the display, it will send the commands....to your other PC! Assuming it is not really complicated, you might be able to reverse-engineer enough to discover the formatting of the commands.

If your software gives errors when you attempt to monitor what it is sending, you could also access the sign from Hyperterminal (or other terminal prog) and see what it sends you back. You might be able to send something back to the existing software to fool it into believing it is connecting to the sign.

It won't be easy, but it might be worth a shot if you feel up to it.
0
adg080898Commented:
0
imdAuthor Commented:
Hey adg, I'm going to give it a shot as soon as I can - maybe today. Thanks again for your input. Will let you know how it went.

What else do you know ? :) I didn't know something like 'HyperTerminal' existed. Will definitely give it a try.

thanx
0
adg080898Commented:
Back before the internet, people used to go on BBS's (bulletin board systems). You had a serial connection to your modem. A "terminal program" gave you direct access to your serial port and allowed you to send commands to your modem to dial, answer, etc. Once connected, whatever you typed got sent, and whatever came in was displayed.

People ran BBS systems for you to dial into, had files to download, message services, etc.

HyperTerminal is a very minimal terminal program included with Windows, which you will use purely for accessing your COM port. If you can't find it under Start/Programs/Communication then go to Start/Settings/Control Panel/Add Remove Programs/Windows Setup/Communications, check HyperTerminal and click OK. Windows will install it from your Windows CD files.

0
imdAuthor Commented:
Still trying to get the whole connection thing right. At the moment I don't have suffcient hardware (cables) to do it. Well, I have figured out that HyperTerminal won't let you connect with COM1, for instance, if there's nothing on the other end of the line. So I guess I have successfully connected, but when I 'send' stuff from the LED Display program to my laptop, I don't get anything. I captured text to file but received nothing. Any ideas? What do you think I'm doing wrong?
0
adg080898Commented:
To get anything from the LED display program to your laptop, you must use a null-modem cable.

This type of cable crosses over the send and receive lines, so the send pin on one end connects to the receive pin on the other end, and the receive pin on one end connects to the send pin on the other end. Other handshaking wires are also crossed over (so out goes to in and vice versa).

If you don't use a null-modem cable, then you won't receive anything because it is going to the wrong pin on the serial port.

0
adg080898Commented:
To clarify my previous post, you need a null-modem cable to go from "the computer you use to program the LED display" to "your laptop".
0
adg080898Commented:
I don't know if you understand the language, but I found this in Google: http://www.liedboek.co.za/faq2.htm
0
imdAuthor Commented:
yes. thanx, that's the first thing I did (about a 2 months ago). i'm having trouble connecting my laptop but will try until i get it right. will keep posted

thanx :)
0
adg080898Commented:
Serial communications have four settings that must match at both ends: baud, data bits, parity, and stop bits.

If you are lucky, you can find this in the configuration screens of your display setup software. Otherwise, you may have to try a bunch of different settings.

The baud rate may be some value between 50 and 115200, but the commonly used rates are 300,1200,2400,9600,57600,115200.

The number of data bits may be 6, 7, or 8, but only 7 and 8 are generally used, usually 8.

The parity may be even, odd, mark, space, or none. Generally only none and even are used.

The number of stop bits may be 0 (none), 1, 1.5.

A convention is to write 7E1 to mean 7 data bits, even parity, 1 stop bit. Normal modem communications (like internet dialup or whatever, use 8N1 meaning 8 bits, no parity, 1 stop bit.

When you start the session in Hyperterminal, it will prompt you for the serial settings.

Connect the laptop to the (display setup) computer using a null-modem cable (we are trying to "listen in" on what the software is sending the display).

First, set the data bits to 8, and the stop bit to 1, and the parity to none. Select hardware handshaking.

With those settings, try each of these baud rates: 1200,2400,9600,57600,115200. On each test, get the display software to send something to the display (to program it).

Hopefully, you HyperTerminal will show something coming in on one of those baud rates.

If you see NOTHING in hyperterminal, then use software handshaking and retry the above tests.

If you still get nothing in HyperTerminal, then try 7 data bits, even parity, one stop bit. Try each of the baud rates above.

The chances are very good that you will find the appropriate settings. Hopefully the format of the commands that it sends are simple.

If possible, use the sign software and make something really simple, like just showing "Please" then "work" :) Use it for sending to the laptop in the test runs above.

Once you start seeing the stream of data I can start making suggestions to help you reverse engineer the data stream.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
imdAuthor Commented:
thanx adg. you've given me a bit of homework to do :) will get back to you ASAP.
0
CleanupPingCommented:
imd:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.