Zibb

Feature

Weather or not: All signs point to “no”

Tales From The Cube: When recycling old embedded code, the whole become less than the sum of the parts when you're up against a tradeshow deadline, of course.

By JT Klopcic, United Parcel Service -- EDN, 6/25/2009

Business had been going well at my former place of employment, a start-up company selling microprocessor-controlled weather stations to schools and broadcast entities. The start-up was taking off, orders were picking up, and our booth was popular at trade shows. Always on the lookout for things new and different, our president had become enamored of scrolling LED signs, and he insisted we needed one in the booth at the next show. “Just imagine: Up-to-the-second weather readings scrolling and flashing in bright colors will be right behind the presenter! Who wouldn’t stop to take a look at that?” he said. Although I had reservations about the aesthetic appeal of barometric-pressure readings blinking in rainbow hues, I had to admit that it would be a nice challenge that would show off some of our company’s technical expertise. So I agreed, but I regretted it when I found out that we had limited time to get this show on the road.

The boss had already selected a vendor for the scrolling signs, so I took a look at the interface specification. I was pleasantly surprised to find that it supported a rich serial protocol for transmitting and updating messages for display. I needed only to convert our serial-data stream from the weather station to a format that the sign understood. The job was starting to seem a lot easier.

We wanted a stand-alone unit that we could later sell, so we went with an 8051-family microcontroller, which would receive weather data on one UART and transmit display data with the other. To save time and effort, we ordered an OEM board from a vendor we had used before, and we recycled a number of embedded C routines to handle the serial-data streams. The only remaining task was to write some simple C code to transfer weather data from one stream to another.

The initial work went perfectly. I had hard-coded some test messages into the interface, and the sign displayed them perfectly. I set up the serial-input buffer and state machine on the receiving port, and I could see the extracted weather data in the debugging output. I had only to include the weather data in the output stream. I expanded the output buffer to hold the larger data, and I then reset the system.

Read more
Tales from the Cube

Panic quickly set in. Instead of my orderly flow of temperatures and precipitation counts, I got only garbled letters and symbols. Something was seriously wrong. Even though we had tested the serial code in a number of other applications, I began to comb through it, looking for any mistake I could have made. I checked and double-checked every inch of the code. After banging my head against the wall for a few hours, I shut off my computer and went home.

The next morning I realized what the problem was. Prying up the main RAM chip on the OEM board from its socket, I found that one of the data pins was bent under the chip, causing all the ASCII characters to get scrambled before I sent them to the sign, which dutifully displayed the gibberish anyway.

After we straightened the pin, it was not long before we had a working sign-interface module, just in time for the next trade show. Even our president was impressed. “Looks great!” he said. “Now, I have this idea for a weather billboard.”


Author Information
JT Klopcic is a technical specialist with United Parcel Service Information Services (Timonium, MD). You can reach him at jtk_1997@yahoo.com.



Reed Business Information Resource Center

Featured Company


Most Recent Resources

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author

There are no additional articles written by this author.


ADVERTISEMENT

Knowledge Center


Events

Microchip Worldwide Embedded Designer’s Forum
Dates: 10/6/2009 - 2/15/2010
Location: 120 Locations Worldwide

eXample Consulting Group's SIX SIGMA GREEN BELT training program
Dates: 11/27/2009 - 11/29/2009
Location: Bangalore, India

Signal Integrity and High-Speed Design
Dates: 12/1/2009 - 12/3/2009
Location: Stockholm, Sweden

MEMS Technology Course
Dates: 12/1/2009 - 12/2/2009
Location: Cambridge, United Kingdom

Oxford University Systems Engineering - Fast Track Short Course
Dates: 3/6/2010 - 3/21/2010
Location: Oxford, United Kingdom

Submit an EventSubmit an Event




Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites