• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

The wiring of a 16f874

nick_a_louse

New Member
I'm having issues!
Hope one of you lovely knowledgeable people can help me!
What is the minimum wiring you can get away with on the 16f874?
I've connected power to both sets of Vdd and Vss, tied Mclr to 5v through a resistor. Also got a 4Mhz crystal (with 2 33pf capacitors) on OSC1 and OSC2.
The problem is that I've put some code on the chip, and at least want to test that I have a clock is working, but don't know what signal to expect from the crystal. As far as I can tell I'm getting virtually nothing (measuring with an oscilloscope).
Really need to get this thing working soon! And this chip is doing all it can to stop me!

Hope someone can shed some light for me!

Thanks, Nick
 

kinjalgp

Active Member
You should get sine wave on both the pins of the crystal. Both sine waves will be 180 degree out of phase.
 

Madmartin

New Member
Put three commands as only program at the beginning:

set some pin to output
####1
set output pin high
set same pin low
goto ####1

Then measure at the pin you decided. if there is a square wave
at about 1/8 the frequency of your crystal, the pic works.

Be sure to disable interrupts.

Everything else seems ok.
 

Latest threads

EE World Online Articles

Loading

 
Top