Maker Pro
Maker Pro

need help to write simple program

KUMARA SHP

Aug 1, 2014
122
Joined
Aug 1, 2014
Messages
122
I am going to write to make speed meter
I use 7 segment display with display drivers
here is the circuit
using micro c for pic can you help me to do it.
I am really new to programming.
sp.jpg
 

KUMARA SHP

Aug 1, 2014
122
Joined
Aug 1, 2014
Messages
122
sensor gives 1 per rotation
below 3 display for display the traveled distance
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
If you're new to programming, this may not be a good project to start with. It contains a number of separate functional requirements: input capture and debounce, pulse counting, conversion of pulses to a rate, arithmetic scaling, conversion to numeric representation, and multiplexed display driving. You'll probably need some control button as well.

You may decide to use interrupts for input capture and for display update, and interrupts are a whole subject to themselves.

I suggest you start with a simple program to control an LED. Then progress to driving multiple seven-segment displays in a multiplexed arrangement (see http://www.google.com/search?q=multiplexed+7-segment+display+drive&tbm=isch). You may choose to drive the display using a timer interrupt, though this is not necessary. Then move to the input logic - debouncing may be needed, and you may choose to use an interrupt here as well, though again, that is not necessary.

Finally, you can progress to joining the two parts together. That would include arithmetic scaling, possibly using calibration factors stored in EEPROM, and conversion of pulse events to a rate value.

Each one of these stages represents a lot of learning for someone who is new to programming. If you're serious about this project, try some simpler projects first, then learn about multiplexed display drive. It is widely used and there are lots of example designs and code fragments that you can use.

We will be happy to help you, but you should get some programming experience, and then work on one operational function at a time.
 

jayanthd

Jul 4, 2015
43
Joined
Jul 4, 2015
Messages
43
If you still need a mikroC PRO PIC code then I can write it for you.
 
Top