Ing. Telecomunicaciones

Páginas: 14 (3296 palabras) Publicado: 18 de noviembre de 2012
Column #77: Tool Time

Column #77, September 2001 by Jon Williams:

Tool Time
I’m pretty darned sure that if comedian Tim Allen knew anything about microcontrollers he’d be a
BASIC Stamp user. Of course, he’d rewire it for 220 volts and over-clock the PIC/SX to run at 10
gigahertz so he could point at it proudly and grunt like a pig (That’s how I show off my Stamp
projects, don’t you?).Tim and his f amous TV alter-ego both love tools – but then, don’t we all? Tools are good. They
help us build and create things. They’re even better when they’re free. And that’s what we’re
going to chat about this month: a couple of freebie tools from Parallax. One is new, the other
isn’t but has some really neat surprises.

LCD REDUX
My favorite BASIC Stamp peripheral is the character LCD.I love them. I have a truckload on
my desk and I use them all the time. I have 2x16, 2x20, 4x20; I have just about every flavor of
Scott Edwards serial LCDs. I’ll say it again: I love them.

The Nuts and Volts of BASIC Stamps (Volume 3) • Page 31

Column #77: Tool Time

LCDs are good because they’re inexpensive (downright cheap in some cases), easy to connect to
the Stamp and allow usto provide a lot of information to the outside world. Naturally I was
thrilled when I learned that the BS2p would have direct support for parallel LCDs and that the
commands would work very much like SEROUT and SERIN – allowing me to use the formatting
modifiers. Does it get any better than this?
For LCD lovers like me – it just has. About the only thing tedious when using character LCDs isdesigning custom characters and adding the data to a PBASIC program. Until recently, I would
do like you and create my characters on paper. Ugh! Too tedious.
Enter the LCD Character Creator. This nifty little program (okay, I wrote it, but I still think it’s
nifty) lets you design and save custom LCD characters and save the definitions to use later. It
supports 5x7 and 5x10 character designs andeven includes the standard character set (from the
Hitachi HD44780A00 ROM) so you have a starting point. The on-screen preview graphic lets you
see what your custom character will look like in a display next to other characters.
Essentially, this is a little paint program for LCD characters. Left-clicking on a pixel will toggle it
on or off. There’s also clear, fill, invert, mirror and flipcommands. To make it easy to
incorporate the new character into a PBASIC program, there’s a text line at the bottom of the
screen that can be copied right into your PBASIC source (this cool idea comes from Stamp user
Steven M).
While the program is very easy to use, it comes with online help (Windows® HTML Help
format) that explains all the menu items, includes a connection schematic (Figure77.2 is right out
of the help file) and demo programs for the BS2, BS2e, BS2sx and BS2p. It’ll even point your
browser to the Parallax web site.
COOL Digits
While playing one day I got the idea that I would create a custom set of digits for my LCD
projects; you know, something that looked a little more sci-fi or computer-like. Creating the digits
was no problem with my new program. But then –oops – I have ten digits and only eight custom
characters in an LCD.

Page 32 • The Nuts and Volts of BASIC Stamps (Volume 3)

Column #77: Tool Time

Figure 77.1: LCD Generator Character Map Program

After scratching my head for a few minutes I remembered a trick that Scott Edwards taught me. If
you change the definition of a custom character that is being displayed, the LCD willchange along
with it. So for this project, I changed my thinking from eight custom characters to eight spots on
the LCD that I could update at any time. All I have to do is download new information to my
assigned position.
Okay, let’s do it. Take a look at Listing 77.1. This is a simple program – short and sweet. Its
purpose is to display a running counter with my cool new digits. I’ll use a...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • ing. telecomunicaciones
  • Ing en telecomunicaciones
  • Ing. Telecomunicaciones
  • Ing. Telecomunicaciones
  • Ing. De Telecomunicaciones
  • Ing. Telecomunicaciones
  • ing. en telecomunicaciones
  • Ing. Telecomunicaciones

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS