Oscillation maximum


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default Oscillation maximum

    Hello,

    I would like toknow if the follwoing is possible in picbasic .
    I have a sensor that needs to be clocked at 2Mhz. I would like the Pic to read the amount of clockings, and sends out a pulse at the 129th clock. the pulse should have similar rise , hold and fall time as the clock.
    I found this link:
    http://www.fh-aalen.de/dti/o_mess/Pixcntr.txt
    which the person seems to have programmed a chip to do so.
    the picbasic manual basically tells me it is impossible beause it is too high speed.
    Any suggestion,? even is it not pic based
    thank you

    ken

  2. #2
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    Ideally I would like to have the following output
    a 25khz frequency, with 1.2% duty cycle

    I am clocking a sensor chip at 2Mhz, I want to send a high on every 130th cycle wich will not be longer then a cycle of the 2Mhz.

    k
    Last edited by lerameur; - 21st January 2007 at 00:10.

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default

    even more basically,
    I want to send a 0.5us pulse every 40us.

    I have this program below, nothing is coming out of it, althou if i remove the line EFINE OSC 20, it works. How do i set my 20mhz ?
    Below without the define 20, it gves me an oscillation of 125Khz
    @ DEVICE PIC16F88, MCLR_ON,HS_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_OFF, CCPMX_ON

    INCLUDE "modedefs.bas"
    DEFINE OSC 20 'use external 20mhz crystal
    CMCON = 7 : ANSEL = 0 : ADCON1 = 7
    DEFINE CCP1_REG PORTB 'Hpwm 1 pin port, RIGHT
    DEFINE CCP1_BIT 3 'Hpwm 1 pin bit
    TRISB = %00000000
    PAUSE 1000 ' start-up delay
    HPWM 1,3,25000
    loop:
    goto loop
    end

    oddly enough even if I change to lower values like:
    HPWM 1,3,15000
    it do not work
    Last edited by lerameur; - 21st January 2007 at 15:43.

Similar Threads

  1. Maximum HPWM freq. 12F683
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th August 2008, 15:55
  2. Maximum Distance Without Driver
    By CocaColaKid in forum Serial
    Replies: 5
    Last Post: - 5th December 2007, 20:34
  3. Maximum Baud Rate error tolerance
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2007, 11:10
  4. maximum oscillator trace length
    By woodygjw in forum Off Topic
    Replies: 8
    Last Post: - 20th May 2005, 03:16
  5. Maximum variable array ?
    By Keith55555 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 7th May 2004, 14:29

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