Pwm


Closed Thread
Results 1 to 3 of 3

Thread: Pwm

  1. #1

    Post Pwm

    Hello. If I have 10 bits resolution in pwm I can write the % this way:

    1111001101

    or it has to be something like this:

    1111111000 or
    1100000000 or
    1111000000

    what I mean is: does 1's mean high and 0´s mean low? or i set the value of the % by a binary number like the first I wrote above? Any help?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Did you mean ADC?

    I am not quite sure what you meant.

    ----------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    PBP only supports 8-Bit PWM through either the PWM or HPWM commands, however, many PICs do support 10-bit Hardware PWM. If you decide to use HPWM you can set the most significant 8-bits through the HPWM command, and the least significant two bits can be set by accessing the PICs registers directly.

    If you need to manipulate your 10-bits, then of course you need a WORD variable, and if you do that in BINARY, DECIMAL or HEX is up to you. But then if you need to set HPWM you'll have to extract the appropriate bits for the HPWM command.

    You won't be able to have 10-bit PWM with the software PWM command.

Similar Threads

  1. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 22:18
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. PWM: Vernacular/Function (Newbee)
    By TerryN in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd July 2008, 16:58
  4. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 07:24
  5. Tidying Up PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st February 2005, 00:26

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