My first foray into PWM


Results 1 to 14 of 14

Threaded View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Default My first foray into PWM

    Before I get too deep in this, can I blink an LED ON for 500uS, OFF for 500uS using standard PWM module?

    Or am I trying to use a Ferrari as a baby stroller?

    I know I can use DT_INT but I know how to do that and want to avoid using cycles. The PWM hardware is there doing nothing and I was hoping I could use it as a heartbeat during my tests.

    I've printed pages 186-189 of the 18F44K22 datasheet and it doesn't seem overwhelming at first glance. The only part I can't determine by reading that is if I can use it as slow as I want. I know this is meant to drive motors so it's entirely possible that it can't physically go this slow.

    Robert


    EDIT: I'm running at 64MHz so I can guarantee persistence of vision while blinking at least 50 LEDs, manage a keypad and handle USART comms (at the very least). But I'm getting a feeling by looking at that PWM PERIOD formula at 14-1 that I could only do this if I slow to a crawl.
    Last edited by Demon; - 16th December 2014 at 21:09.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Replies: 1
    Last Post: - 4th March 2013, 21:57
  2. PWM to 0-5V
    By tallen in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 30th April 2010, 08:03
  3. help with pwm
    By babatundeawe in forum Schematics
    Replies: 6
    Last Post: - 30th October 2008, 12:35
  4. Pwm
    By xobx in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 11th February 2008, 06:33
  5. Pwm
    By JARI NETWORKS in forum mel PIC BASIC
    Replies: 4
    Last Post: - 1st September 2006, 06:03

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