Forum Update - Announcement about May 10th, 2018 update and your password.

Measuring 69 khz RC Oscillator Circuit With Parallax USB Oscilloscope

It's for a PIC16F84A.

T circuit. Connects to OSC1.

100pf cap from 0v to T

100K ohm resistor from 5v to T

T goes into OSC1

Where do I connect the Lead 1 and ground on the circuit please?



«1

Comments

  • 31 Comments sorted by Date Added Votes

  • This is what it looks like.

    Anybody know how to adjust the scope to make it right size?


    PIC18F84%20Scope%205%209%2018.jpg
    556 x 545 - 84K


  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,929
    edited May 9 Vote Up0Vote Down
    SX28 is a PIC16F57 Clone
    No it's not. It's a much faster enhancement of the PIC architecture. A "clone" implies that it's identical. to the PIC.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery
  • microcontrollerusermicrocontrolleruser Posts: 955
    edited May 9 Vote Up0Vote Down
    Argue with the bunch on PIClist.

    I pretty much figure they know what they are talking about.

    I am attempting to use a black version Parallax USB oscilloscope.



  • Argue with the bunch on PIClist.

    I pretty much figure they know what they are talking about.

    I am attempting to use a black version Parallax USB oscilloscope.

    If you can not back that up with facts, you will be asked to delete that quote.

    Infernal Machine
  • microcontrollerusermicrocontrolleruser Posts: 955
    edited May 9 Vote Up0Vote Down
    Publison

    Oh you caught me cutting corners again!

    Understanding signals book version 1 I'm studying.

    I need to go back to testing the blinking LED with Stamp like the directions say.

    Then it tells you how to make adjustments.

    Can anybody tell what frequency the RC circuit is producing?

    I can slow it down swapping in 220 and 330 K ohm resistors for 100 K ohm.




  • 'If you can not back that up with facts, you will be asked to delete that quote.'

    Here you go.

    http://www.sxlist.com/techref/ubicom/picreplace.htm

    'SX processors have been used to replace PIC 16C57's and 54's useing the .hex file from MPLab '

    You can program a SX28 with MPLAB and a little effort.


  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,929
    edited May 9 Vote Up0Vote Down
    'SX processors have been used to replace PIC 16C57's and 54's useing the .hex file from MPLab '
    That does not make it a clone. A clone is an identical copy. But I see you changed your statement. Thanks.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery

  • You're welcome.




  • The purpose of the 29 khz oscillator is this.

    RC circuit is 'standing in' while we wait for our crystals to get here.

    The book uses a 32 khz crystal.

    There are two delays in the header file you can call. 1/2 and 1 second.

    With the 32 khz crystal you only have to count 32 times with one loop.

    A 4 mhz delay routine is a lot more code.



  • Is that vertical line really what the circuit is doing?

    Could it be caused by the settings?


  • The vertical line is an axis. The sawtooth tracing is what the circuit is doing

  • 'The vertical line is an axis.'

    What do you mean by an 'axis'?


  • Mike GreenMike Green Posts: 22,735
    edited May 10 Vote Up0Vote Down
    I'm assuming that what I think is a vertical line is the same thing you see. I see a vertical dark line in the middle of the graph. That's the Y axis of the graph of the signal over time. The X axis is horizontal and corresponds to time. The wikipedia is your friend (see here)

  • No.I mean the signal.The blue line.

    Okay.Now that you mention it, it is not quite vertical.

    Why is it doing that?


  • The blue line is your signal. The sawtooth shape of it is characteristic of an R-C circuit.

  • 'The sawtooth shape of it is characteristic of an R-C circuit. '

    Great! R-C circuit works!

    Thank you Mike!




  • How do I know what the frequency of this R/C circuit is?


  • The frequency should be in the upper right box.

    What software are you using for the scope? Ver 4.0 or 5.1?
    Infernal Machine
  • Does it look like this:
    781 x 602 - 318K
    Infernal Machine

  • 'What software are you using for the scope? Ver 4.0 or 5.1?'

    5.1.1

    'Does it look like this:' No.

    I do have what you're showing installed though.It starts up and runs in Windows 8.1 here.

    Let me double check it connects to USB scope.



  • kwinnkwinn Posts: 7,848
    The frequency will vary depending on the temperature, chip processing parameters, and RC component variations. Typically it will be in the ballpark of 1/(R*C*.5), but it can vary quite a bit depending on the threshold levels of the OSC1 input. In your case that would be about 20KHz, which is close to what your scope image shows.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.

  • Thank you.

    Table show that combination should result in 71.56khz. Plus or minus 25%.

    You may have already given the reason but why is it @20khz?


  • Why 20KHz? Depends on how it's hooked up and what's on the inside of the PIC. The RC formula gives the time needed to charge or discharge the capacitor, but that depends also on how much current is available from the oscillator and at what threshold it switches. What's the table you're referencing? Does the scope affect the reading?

  • 'Why 20KHz? '

    That is the reading using 100 pf cap and 100 K ohm resistor.

    ' Does the scope affect the reading? '

    First time that has come up.

    How do we find that out?


  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 21,929
    edited May 10 Vote Up0Vote Down
    ' Does the scope affect the reading? '
    It certainly could. And since it's a one-pin oscillator circuit, there's not an alternative low-impedance driver pin to connect the scope to.
    How do we find that out?
    Write an assembly program that toggles an output pin as fast as possible. Then measure the frequency of the pin. Using execution clocks data for each operator in your loop, you can compute what the actual clock frequency is.

    -Phil
    “Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away. -Antoine de Saint-Exupery

  • Phil Here is delay from lesson.

    PIC16F84%20Header%20Delay%205%2010%2018.png
    1366 x 768 - 213K



  • Thank you very much Phil!

    STOP! Please don't write a snippet of code for me to run.

    My plate is full working on this header and blink LED then the next lesson.

    I THINK what you are talking about is like this delay. Rearranged though.



  • Next thing is to change the value of the resistor.

    Will look through resistor tackle boxes for 120, 150 and 180 Kohm ones.

    Then we'll see how the measurements come out.

    Want to graph the results also.

    Also do the R/C formula a couple times and see what results SHOULD be.


  • microcontrolleruser,

    Don't forget that when you put resistors in series that their values add.

    So if you need 150K, you could put 15 10K in series or use 3 50K.
Sign In or Register to comment.