+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Pic25k20 PWM Amicus board incorrect freq

  1. #11
    Licensed User pic-ignorant's Avatar
    Join Date
    Oct 2007
    Location
    Sunny Kent
    Posts
    2,125


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    I used a 12F683 (hardware pwm)to get modulated IR @ 38Khz. Works really well

    Hi, its great to see you visiting our forum. Why not try Proton Compiler for FREE?

    Download the FREE version of Proton Compiler, Its called Amicus18 and its available from HERE

    Already using proton Compiler??? Get rid of these pesky messages... get LICENSED USER STATUS




  2. If you're a Licensed user of PROTON DEVELOPMENT SUITE, apply for Licensed User Status to remove these pesky messages
     and get access to additional forum areas, Beta test downloads and more!

  3. #12
    Licensed User Tim's Avatar
    Join Date
    Jan 2003
    Location
    london
    Posts
    6,950


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    I would have used a 12f683 if I had one here. The issue was I could not wait to order one. I needed to update the client by today which is why I purchased the kit from Maplins as they had it in stock at a local store.
    Tim

  4. #13


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    I've never had a problem with 18F25K20 device and PWM. So just to prove to myself that the chip is not at fault I wrote a simple snippet program to configure the PWM for 36KHz and 38KHz and ran it in the ISIS simulator. The results were as expected:

    Code:
        Device = 18F25K20
        Declare  Xtal  = 4
        Declare Optimiser_Level = 1
        
    ' For Approx 36KHz 50% duty cycle (Actually 35.715KHz) 
    (*
        T2CON = %00000100  
        PR2 = 27          
        CCPR1L = % 00001110        
        CCP1CON = % 00001100 
        Output PORTC.2
    *)  
    ' For Approx 38KHz 50% duty cycle (Actually 38.461KHz) 
    
        T2CON = %00000100  
        PR2 = 25          
        CCPR1L = %00001101         
        CCP1CON = %00001100 
        Output  PORTC .2
    If you were running your tests on the Amicus18 platform, did you remember that Amicus18 uses a 16MHz crystal, but your program is set for a 4MHz crystal.
    Regards
    Les

  5. #14
    Licensed User pic-ignorant's Avatar
    Join Date
    Oct 2007
    Location
    Sunny Kent
    Posts
    2,125


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    Oh OK. If you wanted me to try out some code, I have a some 12f683 boards and loose pics at work if its any help

  6. #15


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    I've also noticed in your configs that you have XINST set to On. This will cause havoc with standard programs.
    Regards
    Les

  7. #16
    Licensed User Tim's Avatar
    Join Date
    Jan 2003
    Location
    london
    Posts
    6,950


    Default Re: Pic25k20 PWM Amicus board incorrect freq

    Since I gave up trying it on the real board it was all done in a sim and the sim had the clock set to 16 Mhz. All the calculations for the PWM were don on a 16mhz clock.

    I tried the code posted in a sim and it did not run with out the proper fuses settings When I added them in it did run but not at 36 or 38 khz with the extal at either 4 or 16mhz.

    I spent a lot of time trying to find out what freq the Amicus board runs at by default. The only reference I could find was a post saying it was 64mhz and a simple delayms test seemed to confirm that. (real hardware) So any further tests I did were programmed via my Pickit2 were I turned of the PLL.

    Anyway now I have given up, I was only using the Amicus to save time as it was powered via USB etc but now I have another dev board I do not need it.
    Tim

+ Reply to Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 8
    Last Post: 15th November 2011, 18:54
  2. HPWM frequency incorrect?
    By hadv215 in forum Proton Plus Compiler v3
    Replies: 14
    Last Post: 22nd February 2011, 16:57
  3. Incorrect calculation in VSM
    By Sparky1039 in forum Labcenter Proteus VSM
    Replies: 8
    Last Post: 25th May 2008, 19:45
  4. freq counter idea
    By digitalis in forum Proton Plus Compiler v3
    Replies: 3
    Last Post: 7th October 2007, 09:44
  5. Possible incorrect USB Key
    By joesaliba in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 23rd June 2006, 16:25

Members who have read this thread since 16th March 2012, 11:57 : 3

Actions :  (Set Date)  (Clear Date)

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