?
Solved

Programming LED Display

Posted on 2003-03-19
16
Medium Priority
?
4,021 Views
Last Modified: 2011-04-14
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

0
Comment
Question by:imd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
16 Comments
 

Author Comment

by:imd
ID: 8172062
Sorry for low points - 55 is all I had. It's actually worth more to me. Please help.
0
 
LVL 8

Expert Comment

by:adg080898
ID: 8172411
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
 

Author Comment

by:imd
ID: 8172501
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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:imd
ID: 8172508
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8172603
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8172614
0
 

Author Comment

by:imd
ID: 8172748
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8179496
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
 

Author Comment

by:imd
ID: 8186539
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8189018
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8189027
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
 
LVL 8

Expert Comment

by:adg080898
ID: 8189032
I don't know if you understand the language, but I found this in Google: http://www.liedboek.co.za/faq2.htm
0
 

Author Comment

by:imd
ID: 8193099
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
 
LVL 8

Accepted Solution

by:
adg080898 earned 210 total points
ID: 8200794
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
 

Author Comment

by:imd
ID: 8201861
thanx adg. you've given me a bit of homework to do :) will get back to you ASAP.
0
 

Expert Comment

by:CleanupPing
ID: 9446968
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

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question