Shop OBEX P1 Docs P2 Docs Learn Events
CLK — Parallax Forums

CLK

worthyamherstworthyamherst Posts: 46
edited 2011-07-20 09:49 in General Discussion
can anyone tell me the CLK of a basic stamp board or the propeller board
i have the propeller demo board item number 32100
and the stamp microcontroller item code BS2-IC

Comments

  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-07-20 07:00
    The Propeller Demo board has a replaceable 5 MHz external clock, but the "internal" system clock is set by using code.

    From page 22 of the Propeller Manual, v.1.1
    System Clock
    The System Clock (shown as “CLOCK” in Figure 1-2) is the central clock source for nearly every component of the Propeller chip. The System Clock’s signal comes from one of three possible sources: 1) the Internal RC Oscillator, 2) the Clock Phase-Locked Loop (PLL), or 3) the Crystal Oscillator (an internal circuit that is fed by an external crystal or crystal/oscillator pack). The source is determined by the CLK register’s settings, which is selectable at compile time or at run time. The only components that don’t use the System Clock directly are the Hub and Bus; they divide the System Clock by two (2).

    http://www.parallax.com/tabid/768/ProductID/340/Default.aspx

    Also see pp. 28-29 of the manual. And look at the Propeller Education Kit documentation for coding examples.

    As an example, the Propeller Demo code has this near the top, which sets the system clock to 80 MHz:
    CON
    
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
    
    

    Hope that helps.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2011-07-20 09:49
    BasicStamps have a wide array of speeds. Take a look in the BasicStamp Manual - download is free. The BS2-IC is on page 13. The comparison of all the BasicStamps is on pages 8-9.

    While the traditional BS2 is the second slowest of the bunch at 20Mhz and ~4000 instructions/sec, it is also the nearly least power hungry (3ma) and there are times when that is much better than a higher CLK. The BS1 is at 4Mhz and very power frugal (1ma).

    The Propeller can be confusing because the CLK speed can be multiplied 16X in PPL to make the processors run much faster - up to 80Mhz. In some cases, even faster speeds have been achieved with a faster crystal overclocking the processor.
Sign In or Register to comment.