• Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Register
  • Login
MakerGram Logo

MakerGram

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups

[Solved] Difference between Hardware and Software PWM.

Arduino
2
3
2.2k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R
    Richu Bini last edited by salmanfaris 20 Mar 2020, 15:02 24 Feb 2020, 12:41

    What is the difference between hardware pwm and software pwm

    1 Reply Last reply Reply Quote 0
    • kowshik1729
      kowshik1729 last edited by 24 Feb 2020, 15:48

      @Richu-Bini thanks for posting the question . just for a brief about pwm, pulse width modulation technique is a method to change the duty cycle of a wave. Which means you can determine how much time a signal must be on or off.

      So, coming to the question, software pwm and hardware pwm is just two different ways of producing same result. In software(referring Arduino here) you'll just write a value between 0 to 255 inorder to determine duty cycle percentage. For example 0 is 0% duty cycle which means the cycle is on for 0% of whole time, similarly 127 means 50% of time cycle will be on and 255 means signal will be on for ever. This is regarding software.

      Coming to hardware, you can generate a pwm signal using very simple passive component, called as potentiometer and 555 timer IC by using 555 timer as bistable multivibrator(The generated output will have two stable states 0 and Vmax, hence the name bistable) and changing the resistance using a potentiometer generates different duty cycles. This is the difference between hardware and software pwm. Please let me know if I haven't explained what you have expected.

      1 Reply Last reply Reply Quote 0
      • R
        Richu Bini last edited by 24 Feb 2020, 17:13

        thank youu

        1 Reply Last reply Reply Quote 1
        1 out of 3
        • First post
          1/3
          Last post

        Recent Posts

        • @codelery Awesome. That's great news. Kudos to @rafitc99 . 🙌

          @codelery Please keep us updated about your project, looking forward to seeing it in action 🤩

          7 Jul 2023, 06:58 • read more
        • C

          @rafitc99 I changed the buffer and that solved the problem. Thanks a lot for coming to my rescue.

          7 Jul 2023, 00:44 • read more
        • C

          @salmanfaris I did change the buffer size and everything is working perfectly. Thanks coming to my rescue.

          7 Jul 2023, 00:41 • read more
        • @codelery said in Help needed: Arduino Wireless Notice Board project:

          I am using the hardware serial (pin 0 and 1 on Arduino Uno)

          As @rafitc99 mentioned, you need to expand the Serila buffer, in the hardware serial also the Arduino board package implements a 64-byte ring buffer for send and receive on the hardware serial messages. So you need to change that to 256 as per your message length.

          6 Jul 2023, 12:22 • read more
        • C

          @rafitc99 The thing is that I am not using the SoftwareSerial library in receiving the message from the first microcontroller. I am using the hardware serial (pin 0 and 1 on Arduino Uno)

          6 Jul 2023, 01:45 • read more
        By MakerGram | A XiStart Initiative | Built with ♥ NodeBB
        Copyright © 2023 MakerGram, All rights reserved.
        Privacy Policy | Terms & Conditions | Disclaimer | Code of Conduct