Searching \ for 'Beginner seeks advice' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=beginner+seeks+advice
Search entire site for: 'Beginner seeks advice'.

Truncated match.
PICList Thread
'Beginner seeks advice'
1998\09\18@143910 by phy, Patrick (AZ76)

flavicon
face
Hello all,

I am just getting started in the PIC world, and could use some
help.  Not only am I a beginning PICer, I am also a software
engineer who is very familiar with embedded controllers but
couldn't design a circuit to save his life.  I'm familiar with
components, but I don't know how to make them work together.

Let me tell you where I'm currently at, in order to help you
help me better.  I have just bought a DT001 and DT101 from
DonTronics, and Myke Predko's book, "Programming and
Customizing the Pic Microcontroller".  I'm looking forward to
building and playing with the platform.  I've already downloaded
and installed MPLAB 3.4, and I'm starting to get familiar with it
as well.

The project I have in mind is a device with two 2-digit readouts
(four 7-segment LEDs), and two sets of 2 pushbutton inputs.  The
readouts will initially display "20" at powerup.  The buttons are
used to increment or decrement the corresponding readout by 1.
The software for this should be a piece of cake.  The hardware,
although, is a different story (for me, at least).

At first pass, it seems to me that I do not have enough I/O lines
available on the 16F84 to drive four 7-segment LEDs.  That fact
dictates some additional circuitry that is beyond my capacity to
design.  Now it seems I should have bought a DT111 for the
extra space, but oh well, I'll just use a breadboard for now.

If anyone of you reading this could help me come up with a
circuit to do what I have in mind, or point out any problems with
my approach, I would appreciate it very much.

Thank you all for your time.

Patrick Murphy
spam_OUTmurphyTakeThisOuTspamsyspac.com  (home)
.....pmurphyKILLspamspam@spam@az76.honeywell.com  (work)

1998\09\18@151834 by John Haggins

picon face
Hi Patrick,

As one beginner to another let me say I started with even less experience
than you a couple of weeks ago and boy am I surprised at what can be done.
I had almost exactly the same challenge of hooking up 4 x 7 segment LEDs to
a PIC and the same question: Not enough i/o's? Using the circuit in Myke's
book on page 264 doesn't help because even if you could do it - it would
use all the PIC 16F84 i/o lines without leaving any for push buttons.

The Answer: Well, I toyed with using a 40 pin PIC which I bought but never
started with. Instead, I dug out a device I bought and almost forgot about
- it is a 4 digit LCD which has on board intelligence and only requires ONE
i/o line from the PIC. You send it serial commands and it displays whatever
you want. There are only three connections to the device, +5v, GRND and
Data. It cost about $   and you can see it at http://www.elproducts.com

Doing it this way leave me 12 i/o lines for LED's and pushbuttons on a 16F84.

The great thing is that I also got PICBasicPro; a basic compiler that
produces PIC ASM/HEX code and that thing is AMAZING! It makes programming
the PIC a total piece of cake, especially the serial i/o for the display -
its just one line of code like this: SEROUT
1,6,[$F4,tenmins,mins,tensecs,secs] which displays a time code (4 digits)
via pin 1, in mode 6 (N9600), and the $F4 is a configuration byte for
things like whether or not you want leading zeros, colons etc.

To me, it really makes learning PIC ASM a bit redundant unless you are
working on something really critical. The book I found most useful was
"Easy PIC'n" and I use the EPIC plus programmer ($39) hooked up to PC
parallel port.

Hope this helps.
John


At 11:38 AM 9/18/98 -0700, you wrote:
{Quote hidden}

1998\09\18@155527 by Harold Hallikainen

picon face
       Although more complicated on the software side, you COULD
multiplex the LEDs so  it would take 7 lines to drive the segments plus
one line to drive each digit (assuming you have high efficiency LEDs so
the PIC can drive seven segments simultaneously, or you'll look at the
thing in the dark).  Also, multiplexing can get a bunch of buttons into
the PIC with fewer wires.
       If you want to take a hardware approach (recalling that the ideal
design has zero parts), you might look at the CD4511.  This is a 7
segment latch decoder driver.  You feed it 4 lines of BCD and strobe a
latch line and it'll hold it.  You can then share the 4 bcd lines and
have individual digit strobe lines.

Harold


Harold Hallikainen
EraseMEharoldspam_OUTspamTakeThisOuThallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

On Fri, 18 Sep 1998 11:38:19 -0700 "Murphy, Patrick (AZ76)"
<PMurphyspamspam_OUTSPACE.HONEYWELL.COM> writes:
{Quote hidden}

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\09\18@200508 by Eduardo Rivera

flavicon
face
Hi John:
Are you talkin about  the $60.00 EPIC Plus PIC programmer  sold by
MicroEngineering? Labs,Inc.

 EDU
_____________________________________

At 03:16 PM 9/18/98 -0400, you wrote:
{Quote hidden}

1998\09\18@201547 by ronruss

flavicon
face
Good point, John, on the display from elproducts. I was so impressed I added a
like to their site on my site.

For debugging without an emulator, I would use the led approach. But with the LC
D

display, I can write codes, such as state variable, timer/counters, to 'watch'
the code.
I think it's a tool that everyone needs.


John Haggins wrote:

{Quote hidden}

--

From: Ron Russ
  EMICROS  - Embedded Micro Software
 (http://www.emicros.com)
  CANPORT  - Lowest cost PC to Controller Area Network Adapter
 (http://www.emicros.com/canport.htm)
  CANTEC11 - 68HC11 SBC with Controller Area Network
 (http://www.emicros.com/cantec11.htm)

1998\09\18@203231 by John Haggins

picon face
Hi Edu,

Sorry, I just checked their price - I was wrong - its $60 ...

I still think its a great little programmer - I've also got the additional
28/40 pin ZIP add-on ($30) and I bought an additional 18 pin ZIF for the
main board.  Works great for me.

The serial LCD from elproducts is $39.95 - it has 1/2" digits.

At 06:45 PM 9/18/98 -0500, you wrote:
> Hi John:
> Are you talkin about  the $60.00 EPIC Plus PIC programmer  sold by
>MicroEngineering? Labs,Inc.
>

1998\09\18@210903 by Regulus Berdin

flavicon
face
Harold Hallikainen wrote:
>
>         Although more complicated on the software side, you COULD
> multiplex the LEDs so  it would take 7 lines to drive the segments plus
> one line to drive each digit (assuming you have high efficiency LEDs so
> the PIC can drive seven segments simultaneously, or you'll look at the
> thing in the dark).  Also, multiplexing can get a bunch of buttons into
> the PIC with fewer wires.
>         If you want to take a hardware approach (recalling that the ideal
> design has zero parts), you might look at the CD4511.  This is a 7
> segment latch decoder driver.  You feed it 4 lines of BCD and strobe a
> latch line and it'll hold it.  You can then share the 4 bcd lines and
> have individual digit strobe lines.

Another solution, other than multiplexing is to use shift registers.
Having two 74HC164 in series could only use 2 pins. Making the shift
fast enough will trick the eye to see the shifting of data. I think it
is easier on the software side.

Here is the routine to send data serially to 2 74HC164.

;data is in led1 and led2, this routine is untested.

datasend:
       movlw   .16             ;16 bits to send
       movwf   count           ;
loop    bcf     PORT,CLK_LINE   ;clear clock line
       rlf     led1            ;shift data to carry flag
       rlf     led2            ;
       bcf     PORT,DATA_LINE  ;assume data is low
       skpnc                   ;skip if low
        bsf    PORT,DATA_LINE  ; data is high
       bsf     PORT,CLK_LINE   ;pulse clock line high, transition occurs here
       decfsz  count           ;
        goto   loop            ;

Regards,
Reggie

1998\09\18@211238 by John Hansen

flavicon
face
At 08:30 PM 9/18/98 -0400, you wrote:

You might want to check out the October issue of QST
magazine on newsstands.  I did an article in it on getting
started with PIC's that includes a version of the Ludi
programmer for under $5.

John Hansen

1998\09\18@235802 by russellh

picon face
Murphy, Patrick (AZ76) wrote:
>
> Hello all,
>
> I am just getting started in the PIC world, and could use some
> help.

<snip>

> At first pass, it seems to me that I do not have enough I/O lines
> available on the 16F84 to drive four 7-segment LEDs.  That fact
> dictates some additional circuitry that is beyond my capacity to
> design.

Look up a part called the 5832. Serial in, 32 bits of parallel out, and
a level shifting driver output, so you can drive the LED's directly from
it. It uses only 3 pins for input (data, clock, and strobe), and is
available in a 40 pin dip.

Russell Hedges

1998\09\19@001534 by Michael Hagberg

flavicon
face
the 5832 is available from http://www.allegromicro.com/

to drive led displays have a look at the MAX7219
http://209.1.238.250/arpdf/1339.pdf

michael

You may leave the list at any time by writing "SIGNOFF PICLIST" in the
   body of a message to TakeThisOuTLISTSERVEraseMEspamspam_OUTMITVMA.MIT.EDU.

{Original Message removed}

1998\09\19@004046 by Mark Willis

flavicon
face
Russell Hedges wrote:
{Quote hidden}

 Another of my favorites here is the 74HC4017, a Johnson Decade Counter
with 10 decoded outputs;  You can have any 1 of 10 outputs (one only at
a time) sequentially high, there's also a ~Q{5-9} output (High during 0
through 4 states), quite usable for sequential tasks like scanning
keyboards or whatever, it'll run at 20+ MHz easily, and you can reset
the counter at any time, or disable counting etc.

 With a little sneakiness you can control this with one pin plus a
diode, resistor and capacitor, normally 2 pins do it nicely.  (Start
there if you use this, or ask for how to 1-pin it.)

 You could use this with some HexFets or equivalent to run most
anything (use HexFets to pull the cathodes of the LEDs down.)

 Mark Willis, RemoveMEmwillisspamTakeThisOuTnwlink.com

1998\09\19@161346 by Roger L Stevens

picon face
> Hello all,
>
> I am just getting started in the PIC world, and could use some
> help.

<snip>

> At first pass, it seems to me that I do not have enough I/O lines
> available on the 16F84 to drive four 7-segment LEDs.  That fact
> dictates some additional circuitry that is beyond my capacity to
> design.

Check out the Motorola MC14489. It is a 5 digit LED display driver with
serial interface
(SPI). It may be cascaded for any number of digits. It features built-in
seven segment and special character decoders and has a LED or Lamp mode
capable of driving 25 individual LEDs or lamps. The LED current source is
built in - no LED series resistors are required. It is a 20 pin device.

Roger

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]

1998\09\19@225844 by paulb

flavicon
face
Murphy, Patrick (AZ76) wrote:

> The project I have in mind is a device with two 2-digit readouts (four
> 7-segment LEDs), and two sets of 2 pushbutton inputs.

> At first pass, it seems to me that I do not have enough I/O lines
> available on the 16F84 to drive four 7-segment LEDs.

 The nub of my previous postings on this subject, describing hardware
*and* software, was that using nine PIC lines you should be able to
readily multiplex eight (or was that nine?) 7-segment displays including
decimals; or eight PIC lines to drive eight displays without decimals.
Multiplex division is by digit, i.e., one in four for a four digit
display.

 Hardware requirement is: common anode displays, eight resistors, one
NPN driver transistor per display.  The strobe lines can be used at the
same time to multiplex the keyboard; you would require one keyboard
data line.  This could possibly be substituted for one of the already
used I/O lines not required to strobe a digit; i.e., less than 8 display
digits used.

 Look in the archives for: "Re: loads of flashing LEDs" over the period
approximately 98/07/22 to 98/07/30 for an explanation of the technique.

 I really must FAQ it on my site!
--
 Cheers,
       Paul B.

1998\09\21@041159 by - Underwater Acoustics Group

flavicon
face
At 11:38 18/09/98 -0700, you wrote:
>The project I have in mind is a device with two 2-digit readouts
>(four 7-segment LEDs), and two sets of 2 pushbutton inputs.  The

>At first pass, it seems to me that I do not have enough I/O lines
>available on the 16F84 to drive four 7-segment LEDs.  That fact

You could multiplex- tho' I can't remember how many pins the F84 has...

Anyway, you would need 7 pins to drive the segments, 4 pins to select the
one of four devices, and if you are clever with the software, you could use
the same pins you use to drive the LEDs!

Note that this will make the LEDs appear dimmer, as each will only be one
1/4th of the time

Something like this:

LED_SEG 7 pins used to drive LED anodes
LED_SEL 4 pins, one connected to the cathode of each 7-segment device
SWITCH_RET      The same pins, one connected to one side of each switch
SWITCH_ENABLE   1 pin connected via diodes to the other side of each switch

And the software would:

Set LED_SEG to outputs, outputting 0
SWITCH_RET to inputs.
SWITCH_ENABLE to output, outputting 1
Look at SWITCH_RET to see what switches have been pressed, and act accordingly
Then set LED_SEG to appropriate value for first LED, and set LED_SEL to
outputs, outputting 0 on the first LED cathode and 1 on the others.

Repeat for each LED
Repeat from the top

Hope that helps/makes sense,

Nigel

--
Nigel Orr                  Research Associate   O   ______
       Underwater Acoustics Group,              o / o    \_/(
Dept of Electrical and Electronic Engineering     (_   <   _ (
    University of Newcastle Upon Tyne             \______/ \(

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...