First resonator try

@lowa

New Member
I all.

Just ordered a 16mhz resonator to be used on a 28x1 picaxe and it brings the following questions.

1-Does the 28X1 detect the external resonator and disconect automatiquely the internal resonator and clocks the picaxe at 16 mhz?

2-Can the setfreq m4 and setfreq m8 still be used and would they use the external resonator or frequency division?

3-What will be the effect on the following commands, serin 1,n4800,b1 and serout 1,n4800,b1 compared with the same commands used with the internal resonator at 4 mhz?
 

Technical

Technical Support
Staff member
1) No. You need to use a 'setfreq em16' command to activate.
2) Yes - internal resonator still used, just use 'setfreq m4' (or m8)
3) Baud rates are multiplied by 4, so 4800 = 19200
 

westaust55

Moderator
3-What will be the effect on the following commands, serin 1,n4800,b1 and serout 1,n4800,b1 compared with the same commands used with the internal resonator at 4 mhz?
If you still want 4800 baud at a clock speed of 16MHz then use the N4800_16 keyword in place of n4800.

So serin 1,n4800,b1

becomes serin 1,n4800_16,b1
 

russbow

Senior Member
Could someone confirm that the centre pin of the resonator is grounded, and it matters not how the outsde ones are orientated.

Thanks, Russ
 

tiscando

Senior Member
Hi,
I would like to know why a value has to be specified for the external resonator keyword e.g. 'setfreq em??'. I don't really see the point of the value when I did an experiment connecting an RC schmitt-trigger oscillator set around 4MHz but variable, to OSC1, and it worked OK, when a program of flashing lights changed speed when I varied the oscillator setting (the variable resistor setting).
 

hippy

Ex-Staff (retired)
It isn't strictly necessary at present to require specification of the frequency, a "SETFREQ EM" could have been allowed, however, providing the frequency information ...

* Helps makes the program self documenting.

* Indicates to a potential user of the program what speed the PICAXE should be operating at.

* Let's a potential user of the program know what resonator to connect.

* Allows programming errors related to speed inconsistencies to be more easily identified; SETFREQ EM8 : SEROUT 7, N4800_16 etc.

* Allows Simulation to know what speed the PICAXE is operating at.

* Allows future PICAXE firmware to know the speed it is operating at.

* It is only one or two extra characters to type in every program.

It is possible to connect any frequency resonator or suitable clock source regardless of what "SETFREQ EMxx" setting is used and the PICAXE will usually run at the provided clock rate, however this may not be the case with future PICAXE hardware.
 
Last edited:
Top