Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[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
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
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
4,857
Helped
1,068
Reputation
2,146
Reaction score
1,053
Trophy points
1,393
Location
California, USA
Activity points
26,502
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?
 

ltsharma

Advanced Member level 4
Joined
May 26, 2013
Messages
110
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,306
Location
banglore
Activity points
2,003
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:

rampschm.PNG
 

barry

Advanced Member level 5
Joined
Mar 31, 2005
Messages
4,857
Helped
1,068
Reputation
2,146
Reaction score
1,053
Trophy points
1,393
Location
California, USA
Activity points
26,502
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.
 

ltsharma

Advanced Member level 4
Joined
May 26, 2013
Messages
110
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,306
Location
banglore
Activity points
2,003
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..
 

ltsharma

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

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


Replaced crystal, it works awesome


Thanks a lot :D
 

ltsharma

Advanced Member level 4
Joined
May 26, 2013
Messages
110
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,306
Location
banglore
Activity points
2,003
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top