PDA

View Full Version : 5MHz Crystal 20 pF, HC-49/µ



Jeff2
05-23-2010, 05:17 AM
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[X0] and [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 [23] == 1


right



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

Peter Jakacki
05-23-2010, 06:10 AM
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*

Jeff2
05-23-2010, 09:42 AM
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 Jakacki
05-23-2010, 12:39 PM
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*

KPR
05-23-2010, 10:14 PM
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.

bill190
05-23-2010, 10:35 PM
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?

·

Sapieha
05-23-2010, 10:42 PM
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 Green
05-23-2010, 10:50 PM
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).