Shop OBEX P1 Docs P2 Docs Learn Events
5MHz Crystal 20 pF, HC-49/µ — Parallax Forums

5MHz Crystal 20 pF, HC-49/µ

Jeff2Jeff2 Posts: 46
edited 2010-05-23 14:50 in Propeller 1
Hi

If I don't use this line in my program. = (con _clkmode = xtal1 + pll16x_xinfreq = 0_500_000)
Could I take out my 5MHz Crystal 20 pF, HC-49/μ (as in not use it, at all).

So if I can take it out and not use it,

Do I need to put pin[noparse][[/noparse]X0] and [noparse][[/noparse]XI] to ground or hook 3v up to them
or just leave them be, that's what I am hoping for.












con 

 _clkmode = xtal1 + pll16x
 _xinfreq = 0_500_000
 
 
pub Kid
          



 repeat


   if ina [noparse][[/noparse]23] == 1
      
        
           right
  
 
          
pub right
        dira[noparse][[/noparse]0..19] := %11111111111111111111
        outa[noparse][[/noparse]0..19] := %00000000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %00000000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %10000000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11000000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11100000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11110000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111000000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111100000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111110000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111000000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111100000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111110000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111000000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111100000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111110000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111000000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111100000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111110000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111111000
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111111100
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111111110
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %11111111111111111111
        waitcnt(clkfreq/4 + cnt)
        outa[noparse][[/noparse]0..19] := %00000000000000000000



Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-22 22:10
    Obviously you are not the type of person who could be bothered to read a datasheet although you do seek advice. One piece of advice always given constantly and without letup is "Read The Manual".

    Many modern microcontrollers have flexible clocking options and even on-board clocks that can be selected but they all need a clock that regulates all sequences within a CPU etc. The Propeller does indeed have an on-board clock but you should RTM before seeking further advice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • Jeff2Jeff2 Posts: 46
    edited 2010-05-23 01:42
    I guess you can find what you are looking for if you "READ THE MANUAL"


    Crystal Output. Provides feedback for an external crystal, or may be ((((left disconnected depending on CLK Register settings))). (((No external resistors or capacitors are required))).


    Thank you for your help Peter Jakacki
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-05-23 04:39
    Why does any processor need a crystal?
    Why do you want to run it without one?

    Some questions I can answer but the best answers are ones that you are helped to find yourself. Your questions indicates you need to do some research and so I have helped you at this stage so that we can be ready to answer IF you still have a question after that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
  • KPRKPR Posts: 189
    edited 2010-05-23 14:14
    Your code is also wrong..

    pll16x_xinfreq = 0_500_000

    it should be

    pll16x_xinfreq = 5_000_000

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I always have someone watching my back.
  • bill190bill190 Posts: 769
    edited 2010-05-23 14:35
    I think I read in the manual or data sheet that those pins could be used as regular inputs/outputs if there is no crystal connected?

    ·
  • SapiehaSapieha Posts: 2,964
    edited 2010-05-23 14:42
    Hi bill190.

    And I think You need reread Data sheet again. It is not possible - But some IC's have XO as Internal XTal output but not Propeller.

    Regards.


    Ps. On Propeller You can only use XI as external frequency input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-23 14:50
    bill190,
    Re-read the manual.

    Jeff2,
    The built-in RC clocks can be used (RCSLOW / RCFAST) instead of an external crystal or resonator. What's not obvious from the manual is that these clocks are not accurate. The actual frequency of both of these vary a lot from chip to chip and also vary somewhat with ambient temperature and a little with chip supply voltage. Since the system clock is the time and frequency standard for everything, you can't use the built-in clocks for serial I/O or video or anything else requiring precise timing. The Propeller's boot loader gets around this by using the RCFAST clock and requiring that the data from the PC be "self-clocking" rather than ordinary asynchronous serial format.

    If you're using RCSLOW or RCFAST, you can just leave Xin and Xout unconnected. As a general rule, it's always best for low power consumption to connect unused input pins through a resistor (like 10K or 47K) to ground (Vss) or the supply voltage (Vdd).
Sign In or Register to comment.