16F84 help needed.
Roman Black email (remove spam text)
Ray Russell wrote:
> I am a rank begginer here so please help if you can.
> I have a project I need to do for my main hobby interest Model Railroading.
> I would like to build a speedometer for a section of track at the club.
> I have detetcors already installed that light an LED when a train passes it.
> I figure I can space 2 of these a specified distance apart and use the
> outputs of the detectors to tell the PIC to start counting and stop counting.
> Then let it do the math and display it on 2 Seven segment LED's.
> I have the chip/programer and enough hardware to power the chip. I also have
> the LED's.
> This is where I fall on my face. I have looked for a couple of days now for
> code to drive the LED's and a schematic on how to hook them up.
> I know this is asking alot since I am only a beginner here but you got to
> start somewhere!
Hi Ray, good luck with your project. Be patient and split
it into simple system modules, 16F84 is good for that as
you can quickly reprogram and test/refine each little code
The http://www.microchip.com site has some app notes on connecting
a PIC to multiple 7-seg displays. It's really not hard
electronics wise, but for the code you will need to multiplex,
ie, display each of the two numbers in turn. You might find
this a bit tricky but it's not hard really. Get each display
working separately, then work on the mutliplexing later!
If you are only timing to 2 digits resolution, you should
be able to use a simple timer0 counter, which you reset at
the first sensor and read the counter result at the second
sensor. Only gets tricky if you want exact scale MPH or
whatever, you will need to do calcs, sometimes tricky
on a PIC.
Exactly what level of skill do you have re electronics/pic
PS. I have tagged this [PIC]: to make the list happy.
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
See also: www.piclist.com/techref/microchip/devices.htm?key=16F
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the