Telegesis (UK) Limited
TG-ETRXn-UG-01-103
20
User Guide
1.04
ETRX1 and ETRX2
©2008 Telegesis (UK) Ltd
ETRXn User Guide (Rev 1.04)
Pin
Default direction Default level Devboard functionality
Default
I/O0
I
0
Button4
connected
I/O1
I
0
Button3
connected
I/O2
I
0
Button2
connected
I/O3
O
0
Button1 or Beeper
Beeper connected
I/O4
O
1
LED4
connected
I/O5
O
1
LED3
connected
I/O6
O
1
LED2
connected
I/O7
O
1
LED1
connected
I/O8
1
I
0
None
n/a
I/O9
1
I
0
None
n/a
I/O10
1
I
0
None
n/a
I/O11
1
I
0
None
n/a
A/D1
-
-
A/D1
connected
A/D2
-
-
A/D2
connected
Table 1. Development board pins
S0F defines the output level which is driven by the pin. On the ETRX1, if a pin is defined to be an
input and the output buffer is set to logic 1 then an internal pull-up is activated, given that bit D of
S2E has been set to enable internal pull-ups globally. For current-sensitive applications it is
recommended not to use these internal pull-ups.
S11 reflects the digital reading at the inputs of the I/O ports.
Example for a Development kit board:
The four LEDs on the devkit are by default all switched off (the I/Os sink current through the LEDs).
If we now wanted to switch on LED1 locally we need to take the following steps:
Make sure the Data direction in S0D is set correctly (it is by default)
Optionally, read output register S0F
Set bit 7 of S0F to 0 (note we can access each bit individually)
The described operations can be executed using the ATS command as shown in Figure 13 below:
1 Only available on the ETRX2