I am attempting to implement the code presented in Microchip's
application note AN557,
however, I have run into a problem I can't seem to figure out. Whenever
the code needs
to display a number with an '8' in it, the PIC appears to lock up. This
happens for all
numbers with an '8', 8, 18,80-88, 118, etc. Any ideas on what might
cause this? Any help
would be appreciated.

Hi, Kelly; My first guesses, is you're using Figure 1 there; Are you
perhaps exceeding the per-port (Port B here) sourcing current limit of
100mA, and/or running your voltage regulator into temporary current
limiting, here? Either could cause this problem. I don't know your
entire schematic, no clue what your voltage source is, so cannot say
"the" answer yet. (220 ohms across (5-0.7V) yields a guessed
per-segment current of 19.54mA, times 8 = 156.4 mA, which is over that
limit; Try 360+ ohm resistors, that should give you under 100mA on
PortB.) Alternately: Turn on B0..3, for a "half cycle", then turn on
B4..7 for the other "half cycle", you can then keep those 220 ohm
resistors. Fun, huh?

BTW; I'm looking at Spice as a "here's my schematic, what's wrong with
it" medium for the PICList; Pretty easy to hand-make schematics in the
Spice input language, fairly small, I'll keep looking into it. Get free
SPICE versions for most all platforms together, and we can pass
schematics back & forth, no software to write etc., should work well.

Actually, I built figure 2, but I believe they operate in the same
fashion. For testing, I've
bypassed all of the key scanning code, so only the display code is
running. BTW, the
keypad is not connected during this test.

For this project I'm using a 16F877. I think I'm OK as far as port
current is concerned. My
data sheet for the 16F877 says that the current limit for ports A, B and
E combined is 200
mA and I'm not using ports A or E. I'm also using 330 ohm resistors
which means
per-segment current is around 13 mA. As for the voltage regulator
(7805), I'll have to check
on it.

I remember reading somewhere (I was hoping it was the PICList) that
somebody had
some trouble with the code presented in AN557 and had provided details as
to what was
wrong. For the life of me, I can't remember where I read this. I was
hoping that somebody
on the PICList might have seen this same note and remember where it was.

> Get free SPICE versions for most all platforms together, and we can
pass schematics
> back & forth, no software to write etc., should work well.

Just wanted to thank you again for the help. It turned out to be a port
problem after all.
Instead of using transistors to sink the current from the LED's, I have
them going to two
port D pins. The total current was more than the port D pins could
handle. I raised the
resistor values to 750 ohm and all is well. Thanks again!

>
> Mark,
>
> Just wanted to thank you again for the help. It turned out to be a port
> problem after all.
> Instead of using transistors to sink the current from the LED's, I have
> them going to two
> port D pins. The total current was more than the port D pins could
> handle. I raised the
> resistor values to 750 ohm and all is well. Thanks again!
>
> Kelly Kohls, N5TLE
> Dallas, TX
> Email: kkohlsEraseME.....juno.com OR EraseMEn5tleqsl.net OR RemoveMEn5tleEraseMEEraseMEarrl.net
> Homepage: http://www.qsl.net/n5tle/
>
> ________________________________________________________________
> YOU'RE PAYING TOO MUCH FOR THE INTERNET!
> Juno now offers FREE Internet Access!
> Try it today - there's no risk! For your FREE software, visit:
> dl.http://www.juno.com/get/tagj.

--
I re-ship for small US & overseas businesses, world-wide.
(For private individuals at cost; ask.)