How to set external clock source in PBP


Closed Thread
Results 1 to 29 of 29

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    DEFINE ADC_CLOCK 4 ' i know 3 means internal RC, but i want to use the external resonator, is that 4?
    you can't use directly the full speed of external clock. in fact you'll have the external clock divided by n. Refer to section 10 of your datasheet in the ADCON0 table.


    DEFINE OSC 20 ' i know 20 means 20mhz, but does that also work for resonators as well as oscillators?
    20 is the speed of the external oscillator, can be crystal, ceramic resonator, pins on a motor....

    DEFINE SAMPLEUS 50 'i eventually want to sample in the megahertz range if possible,

    I'm also going to eventually put in a trigger to start the A/D process and end it after a certain number of samples. Well, off I go into the pic basic manual. Thanks again for the help.
    The fastest way is to don't use this ADCIN statement and do your sample with FOSC/2 and read/write the internal registers yourself.

    Download and look this code

    with some few modification you'll do it as fast as the PIC can do for you
    Last edited by mister_e; - 18th February 2005 at 21:42.
    Steve

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

Similar Threads

  1. HW PWM not working
    By comwarrior in forum General
    Replies: 5
    Last Post: - 31st July 2009, 17:16
  2. Microcode studio - PIC16F877A Interrupts
    By mcbeasleyjr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th January 2009, 06:10
  3. Data Out From External Clock
    By Quin in forum Serial
    Replies: 2
    Last Post: - 25th October 2008, 09:11
  4. Wierd sleep issue
    By orca in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 14th March 2006, 22:06
  5. error on compiling
    By parker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th June 2005, 14:31

Members who have read this thread : 1

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