Updating HPWM frequently, safe?


Closed Thread
Results 1 to 40 of 79

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Can't tell ya! But as far i remind, the datasheet suggest a maximum impedance of 2.xxx Kohm.

    I tested my code on a EASYPIC 4 board with 10K trim pot... seems to work.

    Post your schematic but make sure your PSU is well filtered and is strong enough for your need first.

    Weird, weird, weird.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Oh Great!

    Thanks for trying it Steve.
    It helps to know not all is lost.

    I think I've got a 683 around here somewhere.

    Maybe there's something I missed for the little guys.
    <br>
    DT

  3. #3
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Im using this schematic:



    Im using a recently charged Li-Ion (3.635v measured under load using a good multimeter) all is mounted in a protoboard

    Using my last posted code the LED flickers, if I press the button it goes steady

    Thanks!
    Last edited by peu; - 7th May 2007 at 02:37.

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    mmm, yeah it works.. but a scope attach to show few glitches... mine too.

    Deeper analysis show that flicker go away if i don't turn off the PWM off before updating the duty cycle. So maybe i have those latest silicon version.. and why the datasheet no longer suggest to turn off the PWM module...

    aarrrggghh
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    let me join your ARGHHH...

    Thanks Steve, at least now I know Im not alone here

    I ordered some 12f683 samples not so long ago, if they changed something I guess I could test it with a rather new IC. But they are at my office, will check tomorrow if time allows.

    Thanks for the continued help guys!

    Pablo

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    in my code just remove the following line
    Code:
    CCP1CON = PWM_OFF
    and also that one
    Code:
    CCP1CON = CCP1CON | PWM_ON
    In darrel's include, comment out line 160
    Code:
    MOVE?CB  0, CCP1CON
    At least, it work here.. thanks to my scope

    Now the history don't tell if this will work with ALL PIC #, and with ALL silicone release. Time will tell.
    Last edited by mister_e; - 7th May 2007 at 03:11.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    T.Jackson's Avatar
    T.Jackson Guest


    Did you find this post helpful? Yes | No

    Smile

    You are a genius Mister_e. Wish I was as smart.

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Don't give up, maybe one day you'll be. Then i could hire you
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    I removed that line from Darrel code and its clearly more stable now, but it still flickers at the lower range of the pot... very strange...

    I just modified the code I posted to write to eeprom the lowest pot setting where its stable, the read value was from $007B to $007C but I recorded a couple of $007F and $0068 after 125 readings/writes, my guess for these oscillations was someting in the write cycle because after I stopped reading the led went to steady again, I wish I had a scope...

    modified code:
    Code:
    if calibrapin=1 then
    if conta < 250 then
     write conta, pote.byte1
     write conta+1, pote.byte0
     conta=conta+2
    endif
    endif

    Pablo

  10. #10
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Strange indeed.

    Well, I've made the changes Steve found and posted it at the same link.

    I won't get my scope back till wednesday. (should have waited)
    But I'll sure have a good look at it then.
    <br>
    DT

Similar Threads

  1. need help on hpwm
    By helmut in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th August 2007, 15:49
  2. HPWM of the port of two HPWM
    By ja2rqk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 15:05
  3. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  4. HPWM and A to D interaction question 18F252
    By tcbcats in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 10th May 2006, 03:50
  5. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43

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