
9
revolution
Revolution Education Ltd. Web: www.picaxe.co.uk
Version 1.3 04/11
AXE401.PMD
AXE401 PICAXE-28X2 Shield Base
5.0 Clock Speed
The PICAXE-28X2 can use a clock frequency between 32kHz and 64MHz. The clock
speed can be changed at any point within the BASIC program via the ‘setfreq’
command. The PICAXE-28X2 uses an internal resonator for frequencies up to
16MHz, and then an external resonator for either 32, 40 or 64MHz.
A higher frequency means a faster operating speed, but the power use of the
microcontroller also considerably increases. Therefore the default PICAXE-28X2
power up frequency is 8MHz (internal resonator), which is a good compromise
between speed and power consumption, and quite suitable for the majority of
shield based projects. However very complex projects (e.g. using an ethernet shield)
may benefit from selecting a faster operating speed via the setfreq command.
To use speeds greater than 16MHz a 3 pin ceramic resonator (not supplied, e.g. part
RES037) must be soldered onto the board in position X1. As the PICAXE-28X2
contains an internal 4x PLL multiplier, an external 16MHz resonator provides a
64MHz operating frequency. An external 8 MHz resonator would provide a 32MHz
operating frequency, an external 10MHz resonator gives 40MHz.
Note that each PICAXE command requires a number of ‘operating instructions’ to
process. Different commands require different numbers of operating instructions,
as some BASIC commands (e.g. readtemp) are much more complex to decode and
process than other commands (e.g. high). Therefore processing speed is not the
same as one ‘BASIC command per operating instruction’. However the default
8MHz operating speed is still quite sufficient for the majority of shield based
projects.
5.1 Why is the LED on pin S.13 connected via jumper H4?
Many shield bases have an LED permanently connected to output S.13. However
this can adversely affect using this pin for another purpose e.g. as a touch sensor
input or for i2c communication. Therefore jumper H4 gives the best of both worlds
- you can have the LED connected if you want to, or remove the jumper link and
hence completely disconnect the LED from this pin.
L1
R1
330
H4
GND
S.13