Pull Up enabled and PWM question


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

    Exclamation Pull Up enabled and PWM question

    Hi

    Q.1)- I would like to know what help does this "weak pull up enabled" does and what it actually means. I have a receiver and a transmitter which I have made myself using RF Modules. I press one button on transmitter and corresponding code is transmitted and receiver activates the corresponding triac (BT136 through MOC3021). CAN THIS WEAK PULL UP be useful in my code (if yes, will it be useful at receiver end or transmitter end or both)? I am using 12F635. I am holding Tx PIC pins ground so as to avoid unwanted transmission by floating pins.

    Q.2)- I also want to control the speed of my fan, I read the microchips document using 12F508 but as it is in C I can't understand it fully. Does anyone has a PBPro program for it. I want to control speed of fan and two on/off operations with my Rx PIC and use 4 buttons on transmitter ( 2 for high/low and rest of the two for on/off operation.

    Thanks

    P.s: I tried using pwm command using 16F690 to dim a light bulb (Yes, it didn't worked). I am back to 12F635 and try your advice now.
    Last edited by financecatalyst; - 6th September 2009 at 19:29. Reason: Provide more info

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The PWM command in PBP just sits in a loop and does PWM - it doesn't do anything else. If you want to actually *USE* PWM to control something,
    you will either need to get a chip with hardware PWM, or use Darrel Taylor's slow PWM (which uses interrupts to give PWM).
    Charles Linquist

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


    Did you find this post helpful? Yes | No

    Default

    Weak Pull-Up's

    A WEAK PULL-UP is basically a RESISTOR built into the internals of the PIC that can be switched in to sit between an I/O pin and Vdd (+5v usually).

    It's called a WEAK Pull-Up because it can be anything between 20K and 250K... Some Datasheets specify a 'typical' current (eg 200uA on a 16F628A) well that would make the weak pull-up 25K (based on a 5v supply).

    How can you use it? If your Remote's Buttons for example are connected between the PICs pins and 0v, then you probably have an external Resistor connected between the PICs pin and Vdd. The internal weak pull-up's can save you adding that external Reistor by providing one conveniently internal to the PIC.

    Different PICs handle weak pull-up's in different ways. Some WPU's can only be switched in globally across an entire port (like PortB on a 16F628), other PICs allow you to switch WPU's on a pin-by-pin basis. Like I said - not all PICs have them, and those that do might not have them on every Port or every I/O. Refer to your chosen PICs Datasheet for definitive answers.

    PWM

    Now with this question you have provided insufficient information for anyone to help you.

    Are you speed controlling an AC or DC motor? There are different techniques for AC (and different depending on how many supply phases) or DC, and to make life more complicated there are different techniques for different kinds of motors (eg induction motor, etc etc). For some kinds of motors PWM is just unsuitable.

    Likewise with your failed Lamp Dimmer... was it AC or DC or what? PWM is not suitable in all cases.

  4. #4


    Did you find this post helpful? Yes | No

    Exclamation Weak pull up example & PWM info

    Thanks Melanie & Charles for your input. Here are my answers to your questions.

    Quote Originally Posted by Melanie View Post
    Weak Pull-Up's

    If your Remote's Buttons for example are connected between the PICs pins and 0v, then you probably have an external Resistor connected between the PICs pin and Vdd. The internal weak pull-up's can save you adding that external Reistor by providing one conveniently internal to the PIC.
    The way I have set it up is that the whole system gets +Ve supply when the button is pressed & the selected PIC pin gets high as well.

    IF I use internal weak pull ups, I have to connect the button to the -Ve line and pic - Is that correct? Secondly, In the program I have to use the GPIO = 1 instead of GPIO=0 in the begining - Is that correct as well?

    Quote Originally Posted by Melanie View Post
    Weak Pull-Up's


    PWM

    Now with this question you have provided insufficient information for anyone to help you.

    Are you speed controlling an AC or DC motor? There are different techniques for AC (and different depending on how many supply phases) or DC, and to make life more complicated there are different techniques for different kinds of motors (eg induction motor, etc etc). For some kinds of motors PWM is just unsuitable.

    Likewise with your failed Lamp Dimmer... was it AC or DC or what? PWM is not suitable in all cases.
    I tried it with an AC lamp.

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


    Did you find this post helpful? Yes | No

    Default

    Post your schematics. No one can comment on how you've got it wired until we see that.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Talking

    Hi,

    I do think Steve Monfette ( Salut Steve, on pense à toi ... if you read us ( ? )) has posted a PBP dimmer program for MAINS on Melabs site ...

    Google is your ... no ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. using the pwm's in pic18f2431-2331-4331-4431
    By jorge_jaqa in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 17th February 2018, 09:05
  2. 18F4431 - Complementary mode PWM
    By AndrewC in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 15th December 2011, 11:23
  3. Low freq PWM problem
    By ultiblade in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th February 2010, 07:09
  4. PIC16F877A pwm use for IR transmission
    By mcbeasleyjr in forum General
    Replies: 0
    Last Post: - 11th July 2009, 18:51
  5. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03

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