resonator for 28X

John Chris

Senior Member
Note that this refers to the 28X proper, not the X1 or X2 if applicable

I have a few questions regarding the 3-pin resonator that must be used with the 28X.

1) Can a simple 2-pin oscilator with separate load capacitors on the input and output be used?

2) What value of load capacitance must either the caps in the prescribed approach, or the 3-pin resonator possess.

3) How sensitive is the Oscilator or the PIC to variation in this load capacitance ?

4) If N.A. distributor part numbers for suitable devices are known, I would be interested in learning what they are.

I appreciate any assistance,

John Chris
 
Last edited by a moderator:

BeanieBots

Moderator
All those paramenters depend on the type of resonator or crystal used and NOT the PICAXE. The datasheet for your chosen part will answer the questions. I don't have the 28X basic PIC datasheet to hand but would guess the PICAXE load to be around 10pF which needs to be taken into account when specifying loading for your oscillator.

If you use the Rev-Ed supplied resonator, you don't need any caps.
Yes, you can use an alternative oscillator but not JUST a crystal. You will also need to drive it and load according the datasheet for that crystal.
Load capacitance DOES effect frequency and so does series resistance.
Both need to be correct but capacitance can be varied slightly to trim the frequency.
 

John Chris

Senior Member
Thanks for the reply.

If I could be directed to a datasheet for a resonator that is equivalent with the suggested Rev-ed 4MHz part, I believe I would understand a little more.

BB, you mention that the crystal must also be driven ? I am assuming that this entails a step beyond simply placing loading capacitors on the input and output of the crystal to GND ?

For the record I have tested (by trying to clear the memory of the 28X, Options: 28X, 4 MHz, 16x GoSub) the part Vishay XT9S 32pF CL 4MHz loaded with 18pF 50V ceramic caps (RPE5C1H180J2K1Z03B). I have not had success with this. I get an error message: 'Incorrect hardware for this software mode'.

- First of all, If the crystal also has to 'driven' (again, I'm ignorant as to what this means), then I'm not doing this - this is a problem.
- another problem is that I expect that 18 pF caps for a 32 pF load capacitance crystal is far too great a difference to expect reliable operation.

Thanks,

John Chris
 
Last edited by a moderator:

John Chris

Senior Member
It is the XO pin that drives the crystal or resonator, by simply applying a steady input voltage , the crystal then oscillates, producing an oscillating output signal of consistent frequency ?
 
Last edited by a moderator:

hippy

Ex-Staff (retired)
I don't have the spec of the Rev-Ed resonator but most generic parts I've found work with the PICmicro so should with a PICAXE, same too with crystals and I've not found the capacitance to be too much of a problem, something around 33pF usually works for me.

Either three pin resonator, or two pin crystal with caps on both legs to 0V should work, nothing more needed.

Re the "Incorrect hardware for this software mode" error; what does it say about "the software is currently..." and "the hardware connected..." further down the message box ?
 

Dippy

Moderator
Don't worry, the PIC drives the Xtal.
All you have to provide is loading i.e. 2 tiddly ceramic capacitors.

For a PIC you usually use either:-
1. A resonator - commonly 3 legs and the load capacitors are built-in.
e.g.http://www.farnell.com/datasheets/95544.pdf
There are mny makes, ZTT is common.

2. If using a standard crystal you have to include the load capacitors.
e.g. http://www.abracon.com/Resonators/ABL.pdf

There are dozens of makes of crystal so check out the Data Sheet - the above is a typical example.

I use crystals for all my stuff in the range of 4.0 to 20 MHz.
I usually use 15pf to 22pf ceramics - but CHECK the Data Sheet first.
I have never had a problem.

Connection.
Crystal goes btween Osc1 and Osc2 (I.c. Pins 9 & 10)
Then 18pF from Pin 9 to gound and 18pF from pin 10 to ground (0V).

Look in big places like Farnell or Digi-Key.
Search on crystal, select your frequency and download the Data Sheet and then have a look.

Here are a couple of pages from a PIC Data Sheet re: Resonators and crystals.
In this table, Microchip refer to 2 pin resonators. The 3 pin ones have the caps built-in.
 

Attachments

John Chris

Senior Member
The software is currently in the mode for: 28X 4MHz
The hardware connected to the computer is: Unknown

I note that upon scoping the serial out pin, a digital signal is output at a frequency of roughly 0.4 Hz

I also note that the neither of the resonator pins are held above ground, how then does the crystal oscillate?
________
 
Last edited by a moderator:

Dippy

Moderator
If you wish to drive a PIC from an xternal (active) clock source then connect to Osc1.

Osc2 does the driving I believe for the normal (passive) resonator and crystal.
 

Technical

Technical Support
Staff member
Is your Programming Editor version up to date? The error message you get is actually proving the chip is talking (hence working ok), but the software does not recognise the chip firmware. Normally due to out of date software!
 

John Chris

Senior Member
'It turns out ...'

My software was not up to date, and the PIC that I have is a 28X1.

For general interest, I have a couple questions:

1) The 28X for instance, requires an oscillator and drives it by holding the OSCI pin high?

2) In what type of application is it advantageous to leave the oscillator input unconnected and drive the device with an external clock source ? When synchronizing multiple processors ?

3) I am assuming the a command such as pause(100) elicits a 1/10 s pause regardless of the oscillator frequency ? The device, however, will 'check to see if 100 ms has passed yet' twice as many times when operating at 8MHz, than at 4MHz ?

Again, greatly appreciative for all comments / remarks

John Chris
 
Last edited by a moderator:

hippy

Ex-Staff (retired)
1) OSCIN and OSCOUT form an oscillator circuit for a resonator or crystal. An oscillator module can be used to drive OSCIN with OSCOUT left disconnected.

2) I think you mean OSCOUT unconnected. OSCIN must be connected to the external source. Advantages for doing this are to synchronise processors, where an oscillator module is prefered over a crystal or resonator, where a clock signal can be taken from elsewhere in a circuit, where a peculiar operating frequency is desired. I'm sure there may be other reasons.

3) PAUSE and similar depend on the operating speed. Double the clock speed and it halves the pause etc.
 
Top