counter/ internal clock


Results 1 to 11 of 11

Threaded View

  1. #9
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yes it could be 1uSec / clock cycle @4MHZ... but not in Basic code, even in assembler @ 4MHZ, you couldn't do it @ 4MHZ with a software loop, hence why TIMERs are built in.

    NOW, select a 16Bit timer that can be set as counter BY using the internal FOsc (ticks) and read the according register once in a while or in a loop. With some human measurement, you should be able to have a accuracy of few uSec.

    This will also require you configure the Timer prescaler and pre-load value accordingly. To help you to figure out their value, i suggest you download my PicMutiCalc

    http://www.mister-e.org/pages/utilitiespag.html

    EDIT: it's sunday and my brain need to understand better what you need to do... i'm lost in your explanation. Maybe you could translate it to Mister E's poor english level?
    Last edited by mister_e; - 29th April 2007 at 17:38.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. external clock / internal clock
    By grounded in forum General
    Replies: 4
    Last Post: - 31st May 2008, 18:44
  2. Setting up internal clock correctly?
    By JohnM in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th March 2008, 21:29
  3. Replies: 14
    Last Post: - 26th September 2007, 06:41
  4. 16F688 Internal clock and MCLR
    By manxman in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 18th August 2007, 19:38
  5. 16F628 Internal clock
    By srob in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th February 2007, 19:46

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts