AS5048A magnetic rotary encoder connection guide
AS5048A magnetic rotary encoder (TSSOP-14) connection guide. Four-wire SPI · 3.3 V supply. Four-wire SPI · 5 V supply.
TSSOP-14
14 contacts Current packageFour-wire SPI · 3.3 V supply
RequiredTie VDD5V and VDD3V together on the 3.3 V rail. Fit both bypass capacitors and ground test pin 5. Center a diametrically magnetized magnet over the sensor.
- +3.3 V
- Host 3.3 V
- C1.1
- C2.1
- Ground
- Host ground
- C1.2
- C2.2
- Chip select
- →
- Host CS
- Serial clock
- →
- Host SCK
- Encoder to host
- →
- Host MISO
- Host to encoder
- →
- Host MOSI
Bench checks
- Start at 1 MHz in SPI mode 1, most significant bit first. Raise CSn after each 16-clock frame and keep it high for at least 350 ns before the next frame.
- Send 0xFFFF to read address 0x3FFF and clock the reply in the next frame. Check response parity and the error flag, then rotate the magnet and verify that the code wraps once per turn.
ams DS000298 v1-11, Figures 11 and 14–16.
Connection scenarios
Three-wire SPI · read angle only
This example uses the 3.3 V supply configuration. Tie the encoder MOSI pin to the common 3.3 V rail. With MOSI held high, each 16-clock frame sends 0xFFFF. Connect the host over CSn, CLK and MISO.
- +3.3 V
- Host 3.3 V
- C1.1
- C2.1
- Ground
- Host ground
- C1.2
- C2.2
- Chip select
- →
- Host CS
- Serial clock
- →
- Host SCK
- Encoder to host
- →
- Host MISO
Bench checks
- Start at 1 MHz in SPI mode 1, most significant bit first. Raise CSn after each 16-clock frame and keep it high for at least 350 ns before the next frame.
- Begin checking angle data on the second frame. Each reply corresponds to the preceding frame. Check parity and the error flag while rotating the magnet.
ams DS000298 v1-11, Figures 11 and 14–16.
TSSOP-14 wiring map
2 · CLK
SPI mode 1 clock. The encoder updates MISO on rising edges and samples MOSI on falling edges.
Wiring requirements
Each SPI frame. Wait at least 350 ns after CSn falls before the first rising clock edge. Raise CSn at least 50 ns after the final falling edge and keep it high for at least 350 ns between frames.
Three-wire angle reads. Hold MOSI high locally. The host uses CSn, CLK and MISO, and receives the angle reply in the following frame.
- Serial clock
- →
- Host SCK
Models and documents
This map covers the SPI AS5048A. The I²C AS5048B has different functions on pins 1–4.
- AS5048A
- SPI and PWM version.
- AS5048A manufacturer documentation· ams DS000298 v1-11, Figures 4–5 and 8–9, 11, 14–16 and 23.
