how to generate triangular wave.....


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Posts
    22

    Default how to generate triangular wave.....

    Hi,

    Can anyone help me to built a triangular wave using counter(in 16f877).

    I am using asm code.Plz guide me.



    Regards,
    Raja.

  2. #2
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    use pwm, just ramp up and down with a counter and put a filter on the pin (RC).

  3. #3
    Join Date
    Aug 2008
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Thanks for ur quick response,

    i want fixed amplitude triangle wave of 2.5v,so how can i set a counter to generate the wave.

    Plz give me the required steps to do this.


    Regards,
    Raja.

  4. #4
    Join Date
    Oct 2007
    Location
    The Netherlands
    Posts
    45


    Did you find this post helpful? Yes | No

    Default

    how about this as an example of a low frequency triangular wave:

    loop:

    for counter = 0 to 127
    hpwm 1,counter,10000
    pause 1
    next counter

    for counter = 127 to 0 step -1
    hpwm 1,counter,10000
    pause 1
    next counter

    goto loop

    Of course all in PBP, not assembly, but this is a PBP forum as you may have observed.

  5. #5
    Join Date
    Aug 2008
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Thanks,but i am using assembly language.

  6. #6
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    Than you'v got the wrong forum.
    You will need the PIC_assembly forum and not one of the picbasic forum's.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mat janssen View Post
    Than you'v got the wrong forum.
    You will need the PIC_assembly forum and not one of the picbasic forum's.
    That's been said before...
    But somebody doesn't heed advice well...
    Not that assembly isn't spoken here obviously, but it's spoken so much more elsewhere.

Similar Threads

  1. To Generate Sine Wave Using PCPWM of PIC18F4331 (Issue)
    By Cyborg in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 22nd March 2014, 13:39
  2. Sine wave
    By Darrenmac in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 18th May 2009, 03:31
  3. Generating 3-phase sine wave..
    By sirvo in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 6th November 2008, 14:07
  4. "Function Generator" Triangular Wave disturb
    By precision in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 2nd June 2008, 17:38
  5. Data --> Modulated squre wave ???
    By kevj in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th August 2007, 03:18

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