
Thread: Crystal-less operation – 414 days old
-
2nd January 2018, 16:09 #1
- Join Date
- Mar 2012
- Posts
- 1,947
- Total Downloaded
- 3.30 GB
Thumbs Up Received: 183
Given: 166
0Crystal-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.
-
2nd January 2018, 17:07 #2
- Join Date
- Mar 2012
- Posts
- 1,947
- Total Downloaded
- 3.30 GB
Thumbs Up Received: 183
Given: 166
0Re: 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.
-
2nd January 2018, 21:02 #3
- Join Date
- Sep 2009
- Posts
- 1,090
- Total Downloaded
- 1.58 GB
Thumbs Up Received: 102
Given: 24
0Re: 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.
-
3rd January 2018, 05:20 #4
- Join Date
- Mar 2012
- Posts
- 1,947
- Total Downloaded
- 3.30 GB
Thumbs Up Received: 183
Given: 166
0Re: 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.
-
3rd January 2018, 12:10 #5
- Join Date
- Sep 2009
- Posts
- 1,090
- Total Downloaded
- 1.58 GB
Thumbs Up Received: 102
Given: 24
0Re: Crystal-less operation
Low speed USB only (24 MHz)
-
3rd January 2018, 12:56 #6
- Join Date
- May 2011
- Posts
- 407
- Total Downloaded
- 205.07 MB
Thumbs Up Received: 79
Given: 0
0Re: 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
AFAIK, the only 18F series w/an int osc accurate enough for FS are the K50 and J94 devices.
-
3rd January 2018, 13:11 #7
- Join Date
- Mar 2012
- Posts
- 1,947
- Total Downloaded
- 3.30 GB
Thumbs Up Received: 183
Given: 166
0Re: 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.
-
3rd January 2018, 17:33 #8
- Join Date
- Feb 2004
- Posts
- 1,228
- Total Downloaded
- 615.70 MB
Thumbs Up Received: 30
Given: 0
0Re: 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
-
5th January 2018, 17:47 #9
- Join Date
- Mar 2012
- Posts
- 1,947
- Total Downloaded
- 3.30 GB
Thumbs Up Received: 183
Given: 166
0Re: 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
George.
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.
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.
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.
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.
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.
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.
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.
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.
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
-
explaining Hser operation
By Mr Anderson in forum Absolute Beginners SectionReplies: 8Last Post: 15th February 2017, 23:05 -
Boolean Operation
By johngb in forum Proton 24Replies: 6Last Post: 14th February 2017, 22:24 -
[SOLVED !] String Operation
By mazlan in forum Proton Plus Compiler v3Replies: 2Last Post: 27th November 2007, 02:16 -
Timer operation? (and FSK operation)
By shunt010 in forum Proton Plus Compiler v3Replies: 1Last 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.
Proton Compiler Updates
Full install of 8-bit Proton and Proton24 Download the full compiler...
1st January 1970, 01:00