Maker Pro
Maker Pro

Stop-Clock Circuit, Assistance Welcomed!

D

Doug Johnson

Jan 1, 1970
0
I need to design a circuit. I am just beginning to play with PICs.

The end product I need will be used in a vehicle, so the power source
is 12 VDC. It will be a clock with 5 separate buttons which the
operator can press to stop the time (to record 5 separate event times).
The clock will display actual time, and freeze it for each event. I'm
undecided on the display method, but the operator needs to be able to
retrieve all 5 times afterward, and then be able to reset the device to
be ready to record times again.

Any advice is appreciated. I'm thinking RTC --> PIC --> LCD, but I
don't know much about them.
 
S

Spehro Pefhany

Jan 1, 1970
0
I need to design a circuit. I am just beginning to play with PICs.

The end product I need will be used in a vehicle, so the power source
is 12 VDC. It will be a clock with 5 separate buttons which the
operator can press to stop the time (to record 5 separate event times).
The clock will display actual time, and freeze it for each event. I'm
undecided on the display method, but the operator needs to be able to
retrieve all 5 times afterward, and then be able to reset the device to
be ready to record times again.

Any advice is appreciated. I'm thinking RTC --> PIC --> LCD, but I
don't know much about them.

You don't need the RTC, just use a crystal on the micro and some
hardware. For example, you might trigger an interrupt exactly every
10msec. Any micro will do, but few from Microchip have on-chip LCD
drivers (and none, last I looked, had flash memory for code). You
could use an LCD module, or could consider different display
technologies.

Best regards,
Spehro Pefhany
 
T

Tim Wescott

Jan 1, 1970
0
Spehro said:
You don't need the RTC, just use a crystal on the micro and some
hardware. For example, you might trigger an interrupt exactly every
10msec. Any micro will do, but few from Microchip have on-chip LCD
drivers (and none, last I looked, had flash memory for code). You
could use an LCD module, or could consider different display
technologies.

Best regards,
Spehro Pefhany

Spehro: It's been a while since you looked. They have scads.

Doug:

Spehro's comment about using crystal control on the PIC is good, and
it's fairly easy to implement. The PIC has counters that can be used to
form a clock.

For LCD hookup look on Microchip's website to see if they have any with
built-in LCD controllers -- if they do there may be an app note telling
you how. If not, then see if you can find someone's existing PIC
project that uses an LCD and copy that part of their circuit.

Atmel's AVR is roughly equivalent to the PIC and has a number chips in
the line with LCD drivers (which means that Microchip probably does to).

You may want to look at the Parallax website. They have "basic stamps"
which are based on PICs but are easy to use. I _think_ they have some
with LCD interfaces, or they have LCD's that are easy to interface with
a PIC. In any case this may be the way to go for your level of expertise.
 
S

Spehro Pefhany

Jan 1, 1970
0
Spehro: It's been a while since you looked. They have scads.

<looking again> Not in production! Oh, okay, sloppy writing on my
part. I meant that none of the few with LCD drivers on-chip have
flash; they are all OTP. There are a few 18F series with LCD driver
listed as "future product".

The MSP430 series, OTOH, has a number with both.
Doug:

Spehro's comment about using crystal control on the PIC is good, and
it's fairly easy to implement. The PIC has counters that can be used to
form a clock.

For LCD hookup look on Microchip's website to see if they have any with
built-in LCD controllers -- if they do there may be an app note telling
you how. If not, then see if you can find someone's existing PIC
project that uses an LCD and copy that part of their circuit.

Atmel's AVR is roughly equivalent to the PIC and has a number chips in
the line with LCD drivers (which means that Microchip probably does to).

You may want to look at the Parallax website. They have "basic stamps"
which are based on PICs but are easy to use. I _think_ they have some
with LCD interfaces, or they have LCD's that are easy to interface with
a PIC. In any case this may be the way to go for your level of expertise.

Best regards,
Spehro Pefhany
 
M

MikeM

Jan 1, 1970
0
Doug said:
I need to design a circuit. I am just beginning to play with PICs.

The end product I need will be used in a vehicle, so the power source
is 12 VDC. It will be a clock with 5 separate buttons which the
operator can press to stop the time (to record 5 separate event times).
The clock will display actual time, and freeze it for each event. I'm
undecided on the display method, but the operator needs to be able to
retrieve all 5 times afterward, and then be able to reset the device to
be ready to record times again.

Any advice is appreciated. I'm thinking RTC --> PIC --> LCD, but I
don't know much about them.

Go to a garage sale, pick up an old DOS-only laptop for ~$25
Even if it has WIN95 or WIN98, boot into DOS. Its battery will
likely be dead, but you can probably power it from a 12V cigarette
lighter plug...

Install QuickBasic 4.5

Write a simple program to read the input pins on the parallel
port. v%=INP(&H379)

Using QB's Timer and INP functions, you can log when the inputs were
driven high/low to a resolution of ~10msec.

You have a 80 char x 25 line LCD display to display results...

You can even log the events to a disc file...

MikeM
 
M

MikeM

Jan 1, 1970
0
Doug said:
I need to design a circuit. I am just beginning to play with PICs.

The end product I need will be used in a vehicle, so the power source
is 12 VDC. It will be a clock with 5 separate buttons which the
operator can press to stop the time (to record 5 separate event times).
The clock will display actual time, and freeze it for each event. I'm
undecided on the display method, but the operator needs to be able to
retrieve all 5 times afterward, and then be able to reset the device to
be ready to record times again.

Any advice is appreciated. I'm thinking RTC --> PIC --> LCD, but I
don't know much about them.

Go to a garage sale, pick up an old DOS-only laptop for ~$25
Even if it has WIN95 or WIN98, boot into DOS. Its battery will
likely be dead, but you can probably power it from a 12V cigarette
lighter plug...

Install QuickBasic 4.5

Write a simple program to read the input pins on the parallel
port. v%=INP(&H379)

Using QB's Timer and INP functions, you can log when the inputs were
driven high/low to a resolution of ~10msec.

You have a 80 char x 25 line LCD display to display results...

You can even log the events to a disc file...

MikeM
 
T

Tim Wescott

Jan 1, 1970
0
Spehro said:
<looking again> Not in production! Oh, okay, sloppy writing on my
part. I meant that none of the few with LCD drivers on-chip have
flash; they are all OTP. There are a few 18F series with LCD driver
listed as "future product".

The MSP430 series, OTOH, has a number with both.
OK, I will never again try to top your overall product knowledge of
apparently everything.

The Atmel AVR line also has some with flash and LCD (he says without
looking at the website...). The 430 is a nice part, but IMO if you're
not doing something off of battery power it's not way better than the AVR.
 
J

Joerg

Jan 1, 1970
0
Hi Doug,

In addition to Spehro's hint about MSP430: If I had to use a uC that's
the one I'd select. Mainly because there are some circuit boards that
already have an LCD on there. TI used to give away "Retro watches" which
can be reprogrammed. Then there is www.olimex.com which offers a module
with LCD, the uC, crystal and all on there. Besides buttons and the
program there isn't much you'd have to add. They have two US
distributors as far as I remember and it was well under $100.

A trip to a office supply store might be worth it, too. I have seen one
presenter using a small self contained stop watch to record break points
in his speeches. It had several memory positions so at the end he could
see how long each section took. No idea where he got it though. But it
looked like one of those little kitchen timers. I believe these kinds of
timers are also used for the game of Chess, during competitions. Also
for relay runs and swimming contests, so a sports store may be an option.

When I did swimming contests 30 years ago the trainer had a watch that
could record eight consecutive break points, down to 10 milliseconds. It
could even be connected to a contact pad so you could keep track of your
turns. After catching our breaths we could then review how much slower
we got after each lap. So there may already be something out there that
you could adapt to your purpose.

Regards, Joerg
 
A

Activ8

Jan 1, 1970
0
I need to design a circuit. I am just beginning to play with PICs.

The end product I need will be used in a vehicle, so the power source
is 12 VDC. It will be a clock with 5 separate buttons which the
operator can press to stop the time (to record 5 separate event times).
The clock will display actual time, and freeze it for each event. I'm
undecided on the display method, but the operator needs to be able to
retrieve all 5 times afterward, and then be able to reset the device to
be ready to record times again.

Any advice is appreciated. I'm thinking RTC --> PIC --> LCD, but I
don't know much about them.

Grab a couple of 16F628/648s from www.glitchbuster.com if he doesn't
have any 32.786 kHz watch crystals, grab some from mouser who also
has LCD modules. You've got plenty of pins to handle a 4-bit LCD
interface and the switches and even PWM control the contrast, which
is really overkill. If you can wait 3 weeks, you can find LCD
modules for $5 (google)

Goto www.piclist.com, read the page, read the FAQ, sign up, turn off
the mail - use the archive. Search on LCD, read the crap code, write
your own per LCD spec sheet. Search for BCD clock. That code is
pretty good, though I had to modify it for some reason I can't
remember.

Use the 16 bit counter to divide the watch crystal down to 1 s.

Then have fun with ignition noise.
 
Top