SM220UF1

SNAPpy Built-Ins

getInfo

All SM220 Series modules will return SM220 as their platform. Expected getInfo() return values:

getInfo(0) # returns 0 meaning "Synapse Wireless"
getInfo(3) # returns 27 meaning SM220

sleep

The SM220 Series includes a 32kHz crystal RTC, so for most efficient sleep() you should use sleep mode 1 or 2, depending on the sleep duration. See the ATMEL ATmega128RFA1 chip section for more information.

NV Parameters

NV11 - Feature Bits

The SM220 Series includes a power amplifier in its processing path, so the Power Amplifier Bit (0x0010) should be set via NV11 - Feature Bits. Clearing the bit to zero will significantly reduce your module’s transmission range.

NV64 - Vendor Specific

The SM220 Series is able to use the Turbo Mode Bit (0x0001) described in the ATmega128RFA1 NV64 - Vendor Specific section.

In addition, the Antenna Path Bit (0x0010) allows the SM220 Series to specify which antenna path should be used:

Value

Antenna Used

0

Compact F antenna (internal)

1

U.FL antenna

Note

Changes to the Antenna Path Bit (0x0010) do not take effect until you reboot the module. The setting persists through reboots and is preserved during a factory default.

Transmission Power Levels

When using either the internal compact F antenna or the U.FL option, channel 15 is not available as a transmitting device in FCC- or IC-regulated areas. You can use an SM220 Series to monitor radio traffic on channel 15 if the traffic is generated by devices other than an SM220 Series, but the SM220 Series will be unable to participate in message forwarding or mesh routing.

When using the U.FL external antenna in FCC- or IC-regulated areas, channel 14 has a reduced maximum transmission power at txPwr >= 6. When using the internal compact F antenna in FCC- or IC-regulated areas, channel 14 has a reduced maximum transmission power at txPwr >= 8.

Transmission power levels (in dB) in the SM220 Series modules are based on the txPwr setting and the channel. The following levels (±3dB) were read from a typical SM220 Series U.FL antenna connection using a Rhode & Schwarz NRP-Z11 Power Sensor:

txPwr Setting

Channel

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

0

2.9

2.9

2.9

9.1

13

15.7

17.6

18.9

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

1

2.9

2.9

2.9

9

12.9

15.6

17.6

18.9

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

19.7

2

2.9

2.9

2.9

9

12.9

15.7

17.6

18.9

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

3

2.9

2.9

2.9

9

12.9

15.6

17.5

18.8

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

19.6

4

3

3

3

9.1

12.9

15.6

17.5

18.8

19.5

19.5

19.5

19.5

19.5

19.5

19.5

19.5

19.5

19.5

5

3

3

3

9.1

13

15.6

17.5

18.7

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

6

3.1

3.1

3.1

9.2

13

15.7

17.5

18.7

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

7

3.1

3.1

3.1

9.2

13

15.7

17.5

18.7

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

19.4

8

3.2

3.2

3.2

9.2

13

15.7

17.5

18.6

19.3

19.3

19.3

19.3

19.3

19.3

19.3

19.3

19.3

19.3

9

3.3

3.3

3.3

9.3

13.1

15.7

17.5

18.6

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

10

3.3

3.3

3.3

9.3

13.1

15.7

17.4

18.5

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

19.2

11

3.4

3.4

3.4

9.4

13.1

15.6

17.4

18.5

19.1

19.1

19.1

19.1

19.1

19.1

19.1

19.1

19.1

19.1

12

3.4

3.4

3.4

9.4

13.1

15.6

17.3

18.4

19

19

19

19

19

19

19

19

19

19

13

3.5

3.5

3.5

9.4

13.1

15.6

17.3

18.3

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

14 1

3.6

3.6

3.6

9.4

13.1

15.6

17.2

17.2

17.2

17.2

17.2

17.2

17.2

17.2

17.2

17.2

17.2

17.2

14 2

3.6

3.6

3.6

9.4

13.1

15.6

17.2

18.2

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

18.9

Footnotes

1

Channel 14 power output values when using the U.FL antenna connection option.

2

Channel 14 power output values when using the compact F antenna built into the module.

Port Mapping

IO Pads

Pad configuration of an SM220 Series surface mount module:

SM220 Series Pad

SNAPpy IO

ATmega128RFA1

Description

A1

-

GND

Power Supply

A2

-

VCC

Power Supply

A3

-

VCC

Power Supply

A4

24

PF0_ADC0

IO24 or Analog0

A5

26

PF2_ADC2_DIG2

IO26 or Analog2 or (software) SPI CLK

A6

28

PF4_ADC4_TCK

IO28 or Analog4 or JTAG Test Clock

A7

30

PF6_ADC6_TDO

IO30 or Analog6 or (software) I2C SDA or JTAG Test Data Out

A8

-

GND

Power Supply

B1

18

PE2 XCK0 AIN0

IO18 or (software) SPI MISO or Analog Comparator or External Clock

B2

19

PE3 OC3A AIN1

IO19 or PWM or Analog Comparator

B3

21

PE5_OC3C_INT5

IO21 or PWM or (software) UART 0 RTS input or Interrupt

B4

25

PF1_ADC1

IO25 or Analog1 or (software) SPI MOSI

B5

33

PG1_DIG1

IO33

B6

29

PF5_ADC5_TMS

IO29 or Analog5 or JTAG Test Mode Select

B7

31

PF7_ADC7_TDI

IO31 or Analog7 or (software) I2C SCL or JTAG Test Data In

B8

-

GND

Power Supply

C1

16

PE0_RXD0_PCINT8

IO16 or UART0 RX or Interrupt

C2

17

PE1_TXD0_PDO

IO17 or UART0 TX

C3

20

PE4_OC3B_INT4

IO20 or PWM or (software) UART0 CTS output or Interrupt

C4

22

PE6_T3_INT6

IO22 or Interrupt

C5

23

PE7_ICP3_INT7_CLKO

IO23 or (software) UART1 RTS input or Interrupt

C6

-

NC

No Connection

C7

-

NC

No Connection

C8

-

GND

Power Supply

D1

5

PB5_OC1A_PCINT5

IO5 or PWM or Interrupt

D2

6

PB6_OC1B_PCINT6

IO6 or PWM or Interrupt

D3

7

PB7_OC0A_OC1C_PCINT7

IO7 or PWM or Interrupt

D4

-

NC

No Connection

D5

-

NC

No Connection

D6

-

NC

No Connection

D7

-

NC

No Connection

D8

-

GND

Power Supply

E1

2

PB2_PCINT2

IO2 or Interrupt

E2

3

PB3_PCINT3

IO3 or Interrupt

E3

4

PB4_OC2A_PCINT4

IO4 or PWM or Interrupt

E4

-

NC

No Connection

E5

-

NC

No Connection

E6

-

NC

No Connection

E7

-

NC

No Connection

E8

-

NC

No Connection

F1

0

PB0_PCINT0

IO0 or Interrupt

F2

1

PB1_PCINT1

IO1 or Interrupt

F3

9

PD1_INT1

IO9 or Interrupt

F4

8

PD0_INT0

IO8 or Interrupt

F5

-

NC

No Connection

F6

-

NC

No Connection

F7

-

NC

No Connection

F8

-

GND

Power Supply

G1

-

CLKI

Clock Input (must be pulled low)

G2

15

PD7_T0

IO15

G3

12

PD4_ICP1

IO12 or (software) UART1 CTS output

G4

10

PD2_RXD1_INT2

IO10 or UART1 RX or Interrupt

G5

37

PG5_OC0B

IO37 or PWM

G6

-

NC

No Connection

G7

-

NC

No Connection

G8

-

GND

Power Supply

H1

-

GND

Power Supply

H2

14

PD6_T1

IO14

H3

13

PD5_XCK1

IO13

H4

11

PD3_TXD1_INT3

IO11 or UART1 TX or Interrupt

H5

-

RESET*

Reset, Active Low

H6

-

TST

Enable chip test mode, Active High

H7

-

NC

No Connection

H8

-

GND

Power Supply

Note

The SPI and I2C locations are different on the SM220 Series than they are on the ATMEL ATmega128RFA1 chip.

Digital IO

The SM220 Series supports 33 digital IO:

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

0

F1

PB0 PCINT0

1

F2

PB1 PCINT1

2

E1

PB2 PCINT2

3

E2

PB3 PCINT3

4

E3

PB4 PCINT4 OC2A

5

D1

PB5 PCINT5 OC1A

6

D2

PB6 PCINT6 OC1B

7

D3

PB7 PCINT7 OC1C OC0A

8

F4

PD0 INT0

9

F3

PD1 INT1

10

G4

PD2 INT2 RXD1

11

H4

PD3 INT3 TXD1

12

G3

PD4 ICP1

13

H3

PD5

14

H2

PD6

15

G2

PD7

16

C1

PE0 PCINT8 RXD0

17

C2

PE1 TXD0 PD0

18

B1

PE2

19

B2

PE3 OC3A AIN0

20

C3

PE4 INT4 OC3B

21

B3

PE5 INT5 OC3C

22

C4

PE6 INT6

23

C5

PE7 INT7 ICP3

24

A4

PF0 ADC0

25

B4

PF1 ADC1

26

A5

PF2 ADC2

28

A6

PF4 ADC4 or JTAG Test Clock

29

B6

PF5 ADC5 or JTAG Test Mode Select

30

A7

PF6 ADC6 or JTAG Test Data Out

31

B7

PF7 ADC7 or JTAG Test Data In

37

G5

PG5 OC0B

Notable SNAPpy omissions (relative to a “bare” ATmega128RFA1 chip) are:
  • IO27 – used within the SM220 Series module for antenna control

  • IO32 – used within the SM220 Series module for LNA control

  • IO33 – used within the SM220 Series as a test point

  • IO34 – used within the SM220 Series module for PA control

  • IO35 and IO36 – used within the SM220 Series module by the “sleep” crystal

Wakeup Pads

Seventeen of the IO pads can be used to wake a sleeping module:

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

0

F1

PCINT0

1

F2

PCINT1

2

E1

PCINT2

3

E2

PCINT3

4

E3

PCINT4

5

D1

PCINT5

6

D2

PCINT6

7

D3

PCINT7

8

F4

INT0

9

F3

INT1

10

G4

INT2

11

H4

INT3

16

C1

PCINT8

20

C3

INT4

21

B3

INT5

22

C4

INT6

23

C5

INT7

Note

Setting the unit to wake from an edge-triggered interrupt on INT4-INT7 (SNAPpy IO 20-23) will work, but it will result in higher power consumption during sleep. If you must have an edge-triggered wake signal, it is recommended you use a different pad.

Analog Input

Seven of the IO pads can be used as ADC inputs:

readAdc() channel

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

0

24

A4

PF0 ADC0

1

25

B4

PF1 ADC1

2

26

A5

PF2 ADC2

4

28

A6

PF4 ADC4

5

29

B6

PF5 ADC5

6

30

A7

PF6 ADC6

7

31

B7

PF7 ADC7

Serial Port 0

Four of the IO pads can function as UART 0:

UART Function

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

RX - Receive Data

16

C1

PE0 RXD0

TX - Transmit Data

17

C2

PE1 TXD0

CTS - Clear To Send(output)

20

C3

PE4

RTS - Request To Send(input)

21

B3

PE5

If you do not need RTS/CTS signals, then IO pads 20 and 21 are available for other usage.

Serial Port 1

Four of the IO pads can function as UART 1:

UART Function

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

RX - Receive Data

10

G4

PD2 RXD1

TX - Transmit Data

11

H4

PD3 TXD1

CTS - Clear To Send(output)

12

G3

PD4

RTS - Request To Send(input)

23

C5

PE7

If you do not need RTS/CTS signals, then IO pads 12 and 23 are available for other usage.

Note

UART 1 is the default UART for serial communications with the node.

Pulse Width Modulation

Eight of the IO pads can optionally be used as Pulse Width Modulation (PWM) outputs:

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

4

E3

PB4 PCINT4 OC2A

5

D1

PB5 PCINT5 OC1A

6

D2

PB6 PCINT6 OC1B

7

D3

PB7 PCINT7 OC0A/OC1C

19

B2

PE3 AIN0 OC3A

20

C3

PE4 INT4 OC3B

21

B3

PE5 INT5 OC3C

37

G5

PG5 OC0B

SPI

Three of the IO pads can optionally function as a SPI bus:

SPI Function

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

MISO

18

B1

PE2

MOSI

25

B4

PF1 ADC1

SCLK

26

A5

PF2 ADC2

These are not the hardware SPI pins. SNAPpy SPI is done via software emulation.

You will also need one “SPI Chip Select” pin per external SPI device. Any available IO pin can be used for this purpose. For example, we often use IO 24 (PF0, pad A4).

I2C

Two of the IO pads can optionally functino as an I2C bus:

I2C Function

SNAPpy IO

SM220 Series Pad

ATmega128RFA1

SDA

30

A7

PF6 ADC6

SCL

31

B7

PF7 ADC7

These are not the hardware I2C pads. SNAPpy I2C is done via software emulation.

Starting with SNAP 2.5, you can also call i2cInit() with three parameters:

i2cInit(enablePullups, SCL_pin, SDA_pin)

The second and third parameters allow you to “move” the I2C pins to another pair of IO pins on the chip.