Timing on 24EP


+ Reply to Thread
Results 1 to 7 of 7

Thread: Timing on 24EP1983 days old

  1. #1
    Junior Member Handyman's Avatar
    Join Date
    Sep 2007
    Posts
    49
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    10.79 GB

    0 Not allowed!

    Default Timing on 24EP

    I am just getting my feet wet with the 16 bit processors and have a couple of questions about this code:

    Code:
        Device = 24EP128MC202
        Declare Xtal = 140.03
    
        PLL_Setup(76, 2, 2, $0300)              ' Configure the Oscillator To operate the Device At 140.03MHz
          
    '---------------[DECLARES]--------------------------------------
    '--------------------------------------------------------------- 
    
        Declare Dead_Code_Remove = On
        Declare Optimiser_Level = 2    
        
    '---------------[VARIABLES]-------------------------------------
    '--------------------------------------------------------------- 
        Dim TempByte As Byte
    
    '---------------[PIN ASSIGNMENTS]-------------------------------
    '---------------------------------------------------------------
        Symbol LED = PORTB.5
        
    '---------------[MAIN PROGRAM]----------------------------------
    '---------------------------------------------------------------
        While 1=1
            High LED
            DelayMS 200
            Low LED
            DelayMS 800
        Wend
    
    '---------------[CONFIGS]---------------------------------------
    '---------------------------------------------------------------
    ' Configure for internal 7.37MHz oscillator with PLL
    ' OSC pins are general purpose I/O
    '
        Config FGS = GWRP_OFF
        Config FOSCSEL = FNOSC_FRCPLL, IESO_ON, PWMLOCK_OFF
        Config FOSC = POSCMD_NONE, OSCIOFNC_ON, IOL1WAY_OFF, FCKSM_CSECME
        Config FWDT = WDTPOST_PS256, WINDIS_OFF, PLLKEN_ON, FWDTEN_OFF
        Config FPOR = ALTI2C1_ON, ALTI2C2_OFF
        Config FICD = ICS_PGD3, JTAGEN_OFF
    End
    Although the duty cycle is correct, the LED blinks about once every 3 seconds, not once per second. What am I missing?

    As a matter of curiosity, when I compile this code, I get a warning:

    "Declare 'DEAD_CODE_REMOVE' Has already been used in the program. This declaration will be ignored."

    Does the compilier automatically add this?

    Any help is greatly appreciated.

    COMPILIER VER. 3.5.7.0
    IDE VER. 2.0.3.3
    Programmed through PICkit 3 via Microchip IPE VER. 2.20
    WIN 7 32 bit

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Timing on 24EP

    The above code has just been tested and the LED does indeed flash every second.

    I can give no answer as to why you are seeing a 3 second flash. What device programmer are you using?

    The Dead_Code_Remove and Optimiser declares are not used with Proton24 because it does these things automatically, and their funtions are ignored by the compiler. I've now trapped the declare giving the warning for the next release.

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Junior Member Handyman's Avatar
    Join Date
    Sep 2007
    Posts
    49
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    10.79 GB

    0 Not allowed!

    Default Re: Timing on 24EP

    Thank you very much for the quick response. I'm using as Chinese knock-off of a PICkit3 fed by Microchip's IPE.

    I am a bit dazed and confused, as it is working on my system now also. I was working on this all morning, using slight variations, with the same results. As I say, I'm new to the 24's and PK3 and IPE, so maybe I goofed up there. (?) Or maybe it's just FM.

    Thanks again for your help and thanks a million for the new compilier!

    Happy New Year!

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  7. #4
    tadd
    Guest tadd's Avatar

    0 Not allowed!

    Default Re: Timing on 24EP

    Is this program working 140mhz ? can you please check

    Device = 24EP256GU810

    Config FGS = GSS_OFF, GSSK_OFF, GWRP_OFF
    Config FOSCSEL = FNOSC_FRCPLL, IESO_ON
    Config FOSC = FCKSM_CSDCMD, IOL1WAY_ON, OSCIOFNC_OFF, POSCMD_NONE
    Config FWDT = FWDTEN_OFF, PLLKEN_ON, WDTPOST_PS32768, WDTPRE_PR128, WINDIS_OFF
    Config FPOR = ALTI2C1_OFF, ALTI2C2_OFF, BOREN_ON, FPWRT_PWR128
    Config FICD = ICS_PGD1, JTAGEN_ON, RSTPRI_PF
    Config FAS = APL_OFF, APLK_OFF, AWRP_OFF


    ;**** End of Fuse Configurator Settings ****;-------------------------------------------------------------------------------

    Dim TempByte As Byte
    '---------------[PIN ASSIGNMENTS]-------------------------------'---------------------------------------------------------------

    Symbol LED = PORTC.14

    '---------------[MAIN PROGRAM]----------------------------------

    While 1=1
    High LED
    DelayMS 500
    Low LED
    DelayMS 800
    Wend

  8. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  9. #5
    Fanatical Contributor top204's Avatar
    Join Date
    Feb 2002
    Posts
    3,599
    Thumbs Up
    Received: 341
    Given: 162
    Total Downloaded
    1.99 GB

    0 Not allowed!

    Default Re: Timing on 24EP

    It won't be running at 140MHz because the PLL has not been setup with the PLL_Setup macro.

  10. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  11. #6
    tadd
    Guest tadd's Avatar

    0 Not allowed!

    Default Re: Timing on 24EP

    How can i write this macro for 24ep256gu810 ? is there any macro program?

  12. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  13. #7
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,136
    Thumbs Up
    Received: 66
    Given: 26
    Total Downloaded
    3.61 GB

    0 Not allowed!

    Default Re: Timing on 24EP

    It's already there.
    Just look either in the manual or else in the first post of this thread.

  14. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Timing not correct
    By Dave-S in forum Proton Plus Compiler v3
    Replies: 10
    Last Post: 9th February 2011, 22:21
  2. Interrupt timing help
    By nigelb in forum Proton Plus Compiler v3
    Replies: 8
    Last Post: 10th November 2010, 20:54
  3. 18f2620 not timing right
    By spyder0069 in forum Proton Plus Compiler v3
    Replies: 3
    Last Post: 15th October 2009, 16:50
  4. accuracy timing
    By Yoepieyoep in forum Proton Plus Compiler v3
    Replies: 0
    Last Post: 24th February 2009, 22:19
  5. Timing Issues
    By yetinme in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 5th April 2005, 19:28

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts