
6
revolution
Revolution Education Ltd. Web: www.picaxe.co.uk
Version 1.3 04/11
AXE401.PMD
AXE401 PICAXE-28X2 Shield Base
2.2 Modifying incompatible shields
Great care has been taken to align the PICAXE pins with the standard shield format.
Therefore almost all shields will work directly out of the box with the PICAXE
shield base without any modification at all.
However there are some unavoidable very minor differences that may affect a
couple of shields. The hardware differences to an Arduino system are:
- 28X2 has PWM on S.3, S.5, S.9, S.10, but not on S.6 and S.11
- 28X2 has I2C connections on S.12 (instead of S.A4) and S.13 (instead of S.A5)
This is due to unavoidable silicon design differences between the ATmega and PIC
microcontrollers.
The PICAXE-28X2 system has 4, not 6, PWM channels. Therefore if a required PWM
hardware feature is not on an available pin, a very simple modification may be
required. As a real-world example, let us look at the Sparkfun Ardumoto motor
controller shield. This requires PWM signals on pins S.3 and S.11 to operate. On the
PICAXE shield base S.3 already has PWM so is no problem to use, but S.11 does not
have PWM (although S.10 does). So we need to redirect the shield pin from using
S.11 to using S.10 instead.
This is easily achieved by simply soldering a 1k resistor between pins S.11 and S.10
on the shield (either above the shield (as shown) when using normal headers, or
below the shield when using stacking headers). As long as S.11 is maintained as an
input, S.10 can now control the PWM to the motor driver. If desired you can even
completely cut off the S.11 header pin, although this is not essential as the 1k
resistor provides protection against accidentally setting both pins as outputs.