[SOLVED] Need help with RPM meter using PIC16F628A

Status
Not open for further replies.

ltsharma

Advanced Member level 4
Joined
May 26, 2013
Messages
110
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,306
Location
banglore
Visit site
Activity points
2,003
Hi,

I did a motorbike RPM meter using PIC16F628A (20MHz crystal),
Everything is perfect in Proteus, On PCB its not giving output,

Details:

Connected LEDs for showing RPM
Used T0CKI as pulse counter, and pulled down using 10K, (flow : Signal--> npn transistor --> schmitt trigger (7414) --> RA4/T0CKI/CMP2 pin,)
used 20MHz crystal and 33pf Cap's
Power source is Transformer(12-0-12)--> rectifier & 2200uf cap --> 7805 (100nf on both side) --> MCU
MCLR -->10K-->vcc || -->100nf-->Ground || Reverse diode --> Vcc

problem:

I did it in Breadboard its kind of working after putting pulldown resistor to RA4/T0CKI/CMP2 pin,
Some times works when i touch circuit,
When i place MCU on pcb its not working, all LEDs left ON even i dint connect anything to RA4/T0CKI/CMP2 pin,


Please help me, i cant recognized what is the problem,, THANK YOU
 

1) Don't use a breadboard
2) Don't use a breadboard
3) Definitely don't use a breadboard.

You can't use a breadboard and expect anything to work at 20MHz. The fact that it "sometimes works" when you touch it should give you a hint about that.

You don't really give us a lot of information. "It doesn't work when you put it on the PCB": That tells us nothing. You might as well tell us the color of your car or how many brothers you have.

Are you sure your PCB has no errors? Are your supply voltages ok? Is the PIC damaged? Have you verified that the device is programmed properly? Can you see the oscillator working? Do you have a schematic?
 

yes, i did everything, PIC verification, pcb trace, PIC is programming perfectly and verified,
supply voltage is 5.04V

how to check oscillator working?

schematic:

 

Another question: Is the power pin of your pic bypassed with a cap?

To verify your oscillator, just put an oscilloscope on one side or the other of the crystal-you should see 20MHz.

Maybe you can modify your code to simply toggle one of the outputs, just to verify that your code is actually running.
 
yes, i did added decoupling capacitor, no issue with that

just have to check crystal now, im dont having CRO

just check by replacing it..
 

hehhhhh,,,,

Its worked,, crystal is gone (a band new crystal )


Replaced crystal, it works awesome


Thanks a lot
 

hey again another question, how to do RPM meter with continuous values? using Timer or CCP module or any?

i did it with timer of 0.25 sec, but its not fast as motorbike throttle, and also its showing random values (like 12, 14, 18, 20, 22,) but i needed 12, 13, 14, 15 like this, how would i do?,
i heard some about CCP module, i dont know how, is it possible?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…