Need advise on copying waveform


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Need advise on copying waveform

    I want to copy a waveform I have with a starting pulse of appx 3.3mS high and then 1s and 0s follow it with their own high/low timings.
    I have a PIC 16f676 and I wrote some code by measuring the high/low times on the waveform and then writing it as High Output_Pin : Pauseus 3300 : Low Output_Pin : Pauseus 130 ....and so on.

    I then checked the waveform on an Osc.. and it does not match with what I wrote it as. For example Pauseus 130 while output pin is low is giving me 240uS low, I hope you get the idea of what I mean by timings don't match with the original waveform I am trying to copy.

    Can anyone advise what is going wrong here? Thanks
    ___________________
    WHY things get boring when they work just fine?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: Need advise on copying waveform

    Hi,
    Is the PIC actually running at the DEFINEd OSC frequency?
    If you tell the compiler that it's supposed to be running at 20MHz but then only run it at 12MHz (or whatever) then all timings will be off by the ratio between actual and DEFINEd frequency.

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Need advise on copying waveform

    Hi Henrik, it is running on internal 4MHz Oscillator and it is mentioned as 4MHz as define as well.
    ___________________
    WHY things get boring when they work just fine?

Similar Threads

  1. Need this waveform. How to generate it?
    By Megahertz in forum Schematics
    Replies: 6
    Last Post: - 29th July 2012, 18:53
  2. Output delayed square waveform
    By netstranger.nz in forum General
    Replies: 0
    Last Post: - 29th May 2012, 08:58
  3. Copying one array to another
    By cc1984 in forum General
    Replies: 4
    Last Post: - 23rd September 2010, 14:16
  4. Code Copying/Transfer
    By Anthony in forum General
    Replies: 2
    Last Post: - 27th April 2009, 18:25
  5. Need help in writing program to read a waveform. Thanks.
    By steng in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th December 2008, 06:24

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