hpwm more than 2 ch possible in pbp?????????


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    oscar's Avatar
    oscar Guest


    Did you find this post helpful? Yes | No

    Angry ccp3 dont exist????

    hi bruce, thanx for your reply.

    i have tryed in vain to get your code working cos when i try to compile it it says the following..

    error hwpm.asm 'ie name of project


    undefined symbol ccp3con


    it wont recognise the ccp3con setup for some reason.....

    hence it wont compile.!!

    i had another look at the pbp manual and its very misleading re hpwm as it makes referance to hpwm3 etc yet it does not state that a max of 2 x hpwm are available in pbp!!!! so one would assume that the ref to hpwm3 etc would mean it could use any available hpwm port on a particular chip !!!!!! arrrgggggggggggggggg

    oscar

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    A few things to look for;

    Never save your basic code file with the exact same name as a PBP
    command, or the same name as the PIC target.

    Try saving it with a name like PWM_F767.bas or something. It compiles
    fine for me with PM or MPASM assemblers with PBP v2.46.

    Be sure you're selecting the 16F767 before compiling, you have a version
    of PBP that supports this device (at least v2.45), and if you're using MPASM
    make sure you have a version of MPASM that supports this PIC.

    Some of the older 17C7xx PIC's had channel 3 which could use timer1. The
    PBP define in the manual shows how to assign timer1 to this channel instead
    of timer2. There are also defines to assign different pins to CCP outputs, but
    I don't see anything in the PBPPIC14.LIB file for the HPWM command that will
    support more than CCP1 & CCP2.

    I don't have one of the 16F767's to mess with, but that code example should
    work assuming you have a version that supports this PIC, you're saving your
    basic file with a name that doesn't clash with a PBP command, and you have
    all the device header files required for this target.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    oscar's Avatar
    oscar Guest


    Did you find this post helpful? Yes | No

    Red face oops my mistake...........

    im so duhhhhhhhhhh.. lol the no ccp3 mystery is sloved... i somehow had another chip type selected!!!!!

    question.... would their be any reason with the code u gave me bruce as to why ch2 hpwm2 that is flickers when at a low value?


    thanx

    oscar

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    What exactly do you mean by flicker?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default

    is this LED flickering happen only with channel2 ? what about if you change the frequency?
    Steve

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

  6. #6
    oscar's Avatar
    oscar Guest


    Did you find this post helpful? Yes | No

    Default re flicker

    hiya lads...

    hmmmmm ch3 ie the one i couldnt get to work in the firsr place works 100% nice smooth dimming etc.. ch2 flickers like mad !! the code is the exact same for all 3 ch's with the exception of register names etc.

    me thinks this is not possible...................... i have gone through everything here 10 times over.!!!

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    What happens if you enable only 1 channel at a time?

    I.E. CCP1CON=0 : CCP3CON=0

    Does channel 2 still flicker?

    Are you sure it's not the circuit channel 2 is connected
    to that's causing the flicker?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  8. #8
    oscar's Avatar
    oscar Guest


    Did you find this post helpful? Yes | No

    Default found the problem

    yet again tis me thats at fault.... many thanx to bruce for his code example. the mistake i was making was that i was calling the hpwm routine which seemed to be causing a conflict. instead i just wrote the duty val directly to the port ie portb.5=duty5 ... simple! lol this took many hours of hair loss and alcohol !!!!!!. only 1 teeny weeny prob left lol... i cant get the ch's to go to full off . they get to say 9% and stay there. so a faint glow is visible but apart from that everything is aok. dimming is as smooth as a babys ass and im a happy bunny.( irish saying).. many many thanks to bruce n the rest of u guys.. slainte...

    thanx
    oscar.

Similar Threads

  1. HPWM of the port of two HPWM
    By ja2rqk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 16:05
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27
  3. Replies: 2
    Last Post: - 10th July 2006, 02:05
  4. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 15:14
  5. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 03: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