_CLKMODE and double checking my crystal
Timothy D. Swieter
Posts: 1,613
I have a new design on the bench that I am working through. There are several oddities I am chasing down and at the moment one of them is double checking my crystal and _CLKMODE settings. Unfortunately I am rushed trying to get a few things done before a two week vacation, so deeper investigation of this may have to wait until I return.
Here is what I have in the design:
This is my first time not using a 5MHz. crystal. I chose the 10MHz because I wanted a small compact surface mount crystal. I also had a notion in my mind that at one point there was discussion about this crystal being used on the 4D Systems uOLED-PROP-96. When I started writing some test software at first it didn't occur to me that I should adjust the XTALx parameter in _CLKMODE so I have been using XTAL1. I of course recognized the need to change the PLLx and the _xinfreq. I want to use PLL8X and of course _xinfreq = 10_000_000 to have operation at 80MHz. My code at the moment though is this:
So, I looked at the datasheet and Propeller Manual and it appears that maybe XTALx should be XTAL2 for the crystal I am using. I am saying that because the crystal is 10MHz and based on what it says in Table4-3 on page 180 in the Propeller Manual. Is there another reason to chose one XTALx setting over another? The capacitance perhaps?
Like I said I think I am working through debugging on a new design and one oddity that I have is that I get inconsistent results with the I2C bus when running at 80MHz. but things seem fine at 40MHz. At 80MHz I can see my General Purpose I/O expander IC missing message or updates where at 40MHz Propeller speed it updates as expected. I have used the same code that I am running on the new design on a previous design with a 5MHz. crystal and running at 80MHz so I have confidence that the code works. I am still investigating my pull-up resistors and traces and such to see if the problem could be there as well. I have 10K pullups on both lines.
So this all leads me to my investigation on _CLKMODE settings and the crystal that I used and wondered what other may think or have experience with as far as the crystal. I know I will be doing another board revision of my design, so if other users have suggestions for other crystals they have used or like or are small and SMT, please let me know and I can consider them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Here is what I have in the design:
- Propeller: QFP
- 10 MHz. Crystal, SMD, from Fox Electronics, part number: FQ7050B-10 (Digikey: parts.digikey.com/1/parts/394651-crystal-10-0-mhz-20pf-smd-fq7050b-10.html)
This is my first time not using a 5MHz. crystal. I chose the 10MHz because I wanted a small compact surface mount crystal. I also had a notion in my mind that at one point there was discussion about this crystal being used on the 4D Systems uOLED-PROP-96. When I started writing some test software at first it didn't occur to me that I should adjust the XTALx parameter in _CLKMODE so I have been using XTAL1. I of course recognized the need to change the PLLx and the _xinfreq. I want to use PLL8X and of course _xinfreq = 10_000_000 to have operation at 80MHz. My code at the moment though is this:
'*************************************** ' Processor Settings '*************************************** _clkmode = xtal2 + pll4x 'Use the PLL to multiple the external clock by 4 _xinfreq = 10_000_000 'An external clock of 10MHz. is used (40MHz. operation)
So, I looked at the datasheet and Propeller Manual and it appears that maybe XTALx should be XTAL2 for the crystal I am using. I am saying that because the crystal is 10MHz and based on what it says in Table4-3 on page 180 in the Propeller Manual. Is there another reason to chose one XTALx setting over another? The capacitance perhaps?
Like I said I think I am working through debugging on a new design and one oddity that I have is that I get inconsistent results with the I2C bus when running at 80MHz. but things seem fine at 40MHz. At 80MHz I can see my General Purpose I/O expander IC missing message or updates where at 40MHz Propeller speed it updates as expected. I have used the same code that I am running on the new design on a previous design with a 5MHz. crystal and running at 80MHz so I have confidence that the code works. I am still investigating my pull-up resistors and traces and such to see if the problem could be there as well. I have 10K pullups on both lines.
So this all leads me to my investigation on _CLKMODE settings and the crystal that I used and wondered what other may think or have experience with as far as the crystal. I know I will be doing another board revision of my design, so if other users have suggestions for other crystals they have used or like or are small and SMT, please let me know and I can consider them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
Comments
** It's funny that you mention that now, I've just spend the last 4 hours debugging some i2c code for a serial to i2c interface I'm working on. My bug was timing related :P.
What crystal and system are you using Soshimo?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com
I knew that Eric Moyers' Coyote used a 10 mhz smt, and looked at the settings, which you have correct. Looking at the comment for _xinfreq, it makes you wonder if he also had some issues. Might be worth checking it with a scope to see what it is actually putting out.
**
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
www.tdswieter.com