Shop OBEX P1 Docs P2 Docs Learn Events
Using internal Oscillator w/PusbuttonLEDtest — Parallax Forums

Using internal Oscillator w/PusbuttonLEDtest

Apies16Apies16 Posts: 1
edited 2012-05-16 19:15 in Propeller 1
Hello,

I am new to working with the Propeller kits, I don't have the 5MHz crystal and was wondering what I would need to change in the PushbuttonLEDtest code to have the chip use its internal oscillator? I am ordering another crystal but until it gets here I would love to know if there is another way to go!

Thanks bunches,

April

Ok, so it took me a second to realize the code below set the chip to use the external crystal. Got it working with the internal, yay!!!! The Propeller Education Kit Labs: Fundamentals book states that up to a certain point before talking about clock and frequency that the programs used before this point (pg 53) were using the internal clock. I deleted the code below and it works.

_clkmode = xtal1 + pll16x ' Feedback and PLL multiplier
_xinfreq = 5_000_000 ' External oscillator = 5 MHz

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-05-16 19:11
    I think the Prop uses RCSLOW if there isn't a clock mode statement. Edit: See Tracy's post below.

    You can use RCFAST by including this in the beginning of your code.
    _Clkmode = RCFAST
    

    RCSLOW uses less power than RCFAST (but is slower of course).
    _Clkmode = RCSLOW
    

    I don't recall the what the clock rates are at these settings but I'm sure the information is in the Propeller Manual.

    As you may know the internal oscillator isn't very precise.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-05-16 19:15
    Actually, the opposite. It comes up by default in RCfast at about 12 MHz. The RCslow instruction takes it down to 20kHz.
Sign In or Register to comment.