1. 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.
    Dismiss Notice

The wiring of a 16f874

Discussion in 'Microcontrollers' started by nick_a_louse, May 14, 2003.

  1. nick_a_louse

    nick_a_louse New Member

    Joined:
    May 14, 2003
    Messages:
    1
    Likes:
    0
    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
     
  2. kinjalgp

    kinjalgp Active Member

    Joined:
    Oct 28, 2002
    Messages:
    1,851
    Likes:
    3
    Location:
    INDIA/USA
    You should get sine wave on both the pins of the crystal. Both sine waves will be 180 degree out of phase.
     
  3. Madmartin

    Madmartin New Member

    Joined:
    May 21, 2003
    Messages:
    24
    Likes:
    0
    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.
     

Share This Page