Link to home
Start Free TrialLog in
Avatar of imd
imd

asked on

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

Avatar of imd
imd

ASKER

Sorry for low points - 55 is all I had. It's actually worth more to me. Please help.
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?
Avatar of imd

ASKER

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.
Avatar of imd

ASKER

Oh yes, about the serial port, it's just connected to COM1. There's also a small LCD display connected to the same cable.
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.
Avatar of imd

ASKER

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
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.

Avatar of imd

ASKER

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?
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.

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".
I don't know if you understand the language, but I found this in Google: http://www.liedboek.co.za/faq2.htm
Avatar of imd

ASKER

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 :)
ASKER CERTIFIED SOLUTION
Avatar of adg080898
adg080898

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of imd

ASKER

thanx adg. you've given me a bit of homework to do :) will get back to you ASAP.
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.