1
\$\begingroup\$

It is my first project with a PIC microcontroller, so I am sorry if my question seems too basic.

I have programmed the PIC as a frequency counter with two inputs: one input for a PLL, and another input for a clock (I am not using an external oscillator... This clock is used as a windows of 1 second so that the PIC can count on that 1 second how much pulses does the PLL make). However, the big problem is the following: Each part works well alone with 5 volts of output, but when I connect the clock to the microcontroller's input, the output voltage of the clock drops from 5 volts to less than 1 volt. With less than 1 volt, the PIC is not able to recognize my 1 second windows. Why does this happend? How can I avoid or correct this problem?

Schematics of PIC and PLL: PIC and PLL

Schematics of clock: The output is Q1 of 4018. That output goes directly to the input of the PIC (the input of the pic is where that square signal of the first image goes) Evcerything is fed with 5 volts Clock circuit

\$\endgroup\$
10
  • \$\begingroup\$ I really appreciate your help \$\endgroup\$
    – Junjiro
    Commented Jul 4, 2017 at 4:05
  • \$\begingroup\$ My first question is how it is that you know the clock starts out delivering \$5\:\textrm{V}\$. My second question is how it is that you then know it drops from \$5\:\textrm{V}\$ to \$1\:\textrm{V}\$? Are you observing this with an oscilloscope? \$\endgroup\$
    – jonk
    Commented Jul 4, 2017 at 4:10
  • 1
    \$\begingroup\$ What is the oscillator you are using? This is a symptom of a lack of clock drive strength (the clock isn't strong enough) combined with possibly plugging it into the wrong pin on the microcontroller. \$\endgroup\$ Commented Jul 4, 2017 at 4:12
  • \$\begingroup\$ Is the input pin you are using for the clock actually set as an input? \$\endgroup\$ Commented Jul 4, 2017 at 4:34
  • 3
    \$\begingroup\$ I strongly advise you to post your schematics and tells us which components that you use. It is otherwise too broad to answer. Also what do you mean "each part works well alone with 5 volts of output". What parts? \$\endgroup\$
    – nickagian
    Commented Jul 4, 2017 at 6:50

1 Answer 1

1
\$\begingroup\$

As mentioned in the comments above - if your microcontroller pin isn't set as an input you will see this problem, as you're effectively shorting it to ground.

Another possibility is that your supply is browning out. Have you got decoupling caps on the VCC pins on each chip?

\$\endgroup\$
1
  • \$\begingroup\$ I have just checked if the pin was set as an input, and it wasn't. Thanks Peter Benett and naxxfish... that was the problem... Excuse me if I made you loose your time \$\endgroup\$
    – Junjiro
    Commented Jul 4, 2017 at 13:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.