Crystal-less operation


Yesterday 21:01
Forum: GPS
Starter: david
Views: 0
Replies: 6
Yesterday 20:40
Forum: GPS
Starter: SimonJA
Views: 0
Replies: 26
Yesterday 16:13
Forum: Proton Plus Compiler v3
Starter: Les
Views: 0
Replies: 17
Go to last post By: towlerg
Yesterday 14:29
Forum: The Lounge
Starter: towlerg
Views: 0
Replies: 4
Yesterday 14:27
Forum: The Lounge
Starter: towlerg
Views: 0
Replies: 13
+ Reply to Thread
Results 1 to 9 of 9

Thread: Crystal-less operation385 days old

  1. #1
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,905
    Thumbs Up
    Received: 175
    Given: 163
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Crystal-less operation

    Has anyone successfully used a 18F2xJ50 to run fs USB without an external crystal? If so could you post the CONFIG?

    I had a google around but nothing jumped out.
    George.

  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
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,905
    Thumbs Up
    Received: 175
    Given: 163
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    This is most confusing. Table 3-5 shows FS on internal clock but the remark in 3.4 seems to disprove it
    bla bla will allow the application to meet low-speed USB signal rate specifications.
    George.

  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
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,090
    Thumbs Up
    Received: 102
    Given: 23
    Total Downloaded
    1.58 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    USB more or less requires a crystal since the internal oscillator is not accurate enough. Though, according to the datasheet, for this device INTOSC is accurate enough, but only for low speed USB.

  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
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,905
    Thumbs Up
    Received: 175
    Given: 163
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    I'm sure you are correct but what about the table 3-5 second from bottom, 8MHz?
    Last edited by towlerg; 3rd January 2018 at 05:22.
    George.

  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
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,090
    Thumbs Up
    Received: 102
    Given: 23
    Total Downloaded
    1.58 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    Low speed USB only (24 MHz)

  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
    Member tumbleweed's Avatar
    Join Date
    May 2011
    Posts
    394
    Thumbs Up
    Received: 77
    Given: 0
    Total Downloaded
    166.95 MB

    0 Not allowed!

    Default Re: Crystal-less operation

    It 'works' for USB FS, but spec-wise it's not guaranteed, esp. across temperature and voltage.
    The int osc typ spec is 0.15% which is good enough, but the max is 1% which is way too large (USB FS requires 0.25%).

    I wouldn't use it in a commercial application, but here's the settings if you want to play around:
    Code:
       OSC = INTOSCPLL,
       PLLDIV = 2,              // 8MHz/2 (need 4MHz -> 96MHz PLL)
       CPUDIV = OSC1,           // no cpu divider... 1:1 (CPU clock=48MHz)
       CFGPLLEN = ON,
       LS48MHZ = SYS48X8
    You may have to adjust the freq using the OSCTUNE register (Set REFOCON = $A0 and you can monitor the clock output on RB2).

    AFAIK, the only 18F series w/an int osc accurate enough for FS are the K50 and J94 devices.

  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 towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,905
    Thumbs Up
    Received: 175
    Given: 163
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    Thanks all, think I'll go with the 25K50. Pity about the J though, it looks so good on paper (dual serial and PPS), I could just use a crystal of course. Will post clock, ACT and TUNE code if I get it working.
    Last edited by towlerg; 3rd January 2018 at 13:29.
    George.

  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.

  15. #8
    Prolific Poster See_Mos's Avatar
    Join Date
    Feb 2004
    Posts
    1,217
    Thumbs Up
    Received: 24
    Given: 0
    Total Downloaded
    615.70 MB

    0 Not allowed!

    Default Re: Crystal-less operation

    Hi George, I am not sure if line 2 comments are correct but this worked for me on an 18F25K50 on intosc


    Code:
      PLLSEL = PLL3X    ;3x clock multiplier 3 x 16 = 48
      CFGPLLEN = On     ;PLL Disabled (firmware controlled)
      CPUDIV = NOCLKDIV    ;CPU uses system clock (no divide)
      LS48MHZ = SYS48X8    ;System clock at 48 MHz, USB clock divider is set to 8
      FOSC = INTOSCIO   ; internal oscillator, no clock out on RA6
    '  FOSC = INTOSCCLKO    ;Internal oscillator, clock output on RA6 OSC2
      PCLKEN = On    ;Primary oscillator enabled
      FCMEN = OFF    ;Fail-Safe Clock Monitor disabled
      IESO = OFF    ;Oscillator Switchover mode disabled
    My RAM is failing

  16. 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.

  17. #9
    Prolific Poster towlerg's Avatar
    Join Date
    Mar 2012
    Posts
    1,905
    Thumbs Up
    Received: 175
    Given: 163
    Total Downloaded
    3.24 GB

    0 Not allowed!

    Default Re: Crystal-less operation

    Following on from See_Mos's post, happy to report fs seems to work quite happy crystal-less. The built-in USB version works out of the box but due to a register change a small mod is needed to new stack, USBSystem.inc, change

    Code:
        IPR2bits_USBIP = 0              ' Yes. So USB Interrupt Priority set to Low
    Code:
        $if _device = _18F25K50 Or _device = _18F24K50 Or _device = _18F45K50
          IPR3bits_USBIP = 0              ' Yes. So USB Interrupt Priority set to Low
        $else
          IPR2bits_USBIP = 0              ' Yes. So USB Interrupt Priority set to Low
        $endif
    I can post CONFIG and clock initialize if anybody needs it.
    George.

  18. 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. explaining Hser operation
    By Mr Anderson in forum Absolute Beginners Section
    Replies: 8
    Last Post: 15th February 2017, 23:05
  2. Boolean Operation
    By johngb in forum Proton 24
    Replies: 6
    Last Post: 14th February 2017, 22:24
  3. String Operation
    By mazlan in forum Proton Plus Compiler v3
    Replies: 2
    Last Post: 27th November 2007, 02:16
  4. Timer operation? (and FSK operation)
    By shunt010 in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 5th November 2005, 16:59

Members who have read this thread : 42

Actions :  (Set Date)

You do not have permission to view the list of names.

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