signal integrity


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 5 of 10
  1. #1
    Join Date
    Jul 2004
    Location
    CA
    Posts
    78

    Default signal integrity

    Hi, I was wondering if anyone cna help me with this piece of code that I am trying to generate, I am trying to do this in software but not getting the output that I really want. I am using the PIC16F777 as the pic of choice. and trying to generate a constant 120Hz PWM but it seems to not work. any help with this would be greatly appreciated. Thank you....

    '========================'
    here is the code that I have :

    LOOP1:
    duty = duty + 1
    A = duty * 79
    PortC.5 = 0
    Pauseus 10033 - A
    PortC.5 = 1
    Pauseus A
    if(duty < 127) then goto LOOP1
    if(duty >= 127) then return
    '======================='

  2. #2
    Join Date
    Jul 2004
    Location
    CA
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    Ohh I forgot.. the code that I have above only lasts for like 1 or 2 seconds. how do I make it so that it will lasts for like 4-5 seconds. thankss

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


    Did you find this post helpful? Yes | No

    Default

    PAUSEUS 10033 is an invalid task IMO

    As i understand you want to generate a constant PWM and change duty while it's running?!? Like a 5 sec fade-in or fade-out ??

    There's certainely more than one method to do it. Can you provide the crystal frequency you're using ???
    Last edited by mister_e; - 21st January 2005 at 17:42.
    Steve

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

  4. #4
    Join Date
    Jul 2004
    Location
    CA
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    I am using 20 MHz ... for the crystal.


    I have included
    DEFINE OSC 20 on top of my code.

  5. #5
    Join Date
    Jul 2004
    Location
    CA
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    the PwM should go from 0 to 100% duty with 120Hz constant frequency ... in lets say it takes 5 seconds to ramp up ...

Similar Threads

  1. Replies: 24
    Last Post: - 1st December 2009, 08:01
  2. Measuring p-p of a 1.5v to 12v ac signal?
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th October 2009, 16:22
  3. Decoding an incoming infrared signal: need advice
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th May 2008, 16:28
  4. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  5. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36

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