Skip to content

Expand register map to 32 bytes #16

Description

@awickert

Expand the firmware I2C register map from 16 to 32 bytes (one WireS transaction; fits comfortably in ATTiny1634 SRAM). Organized as 4 × 8-byte blocks:

Block 0 (0x00–0x07) — Identification & status

  • 0x00 Status flags (bit 0 = ready, bits 1–7 reserved for failure modes)
  • 0x01–0x04 ASCII device name (Apis)
  • 0x05 HW version major
  • 0x06 HW version minor
  • 0x07 FW patch version

Block 1 (0x08–0x0F) — Range & config

  • 0x08–0x09 Range [int16, little-endian, cm]
  • 0x0A Signal strength (from LiDAR Lite reg 0x0E)
  • 0x0B Config (sensitivity [1:0], writable)
  • 0x0C I2C address (writable, saved to EEPROM byte 6, takes effect on next boot)
  • 0x0D–0x0F Reserved

Block 2 (0x10–0x17) — Accelerometer raw

  • 0x10–0x11 Accel X [int16, little-endian]
  • 0x12–0x13 Accel Y [int16, little-endian]
  • 0x14–0x15 Accel Z [int16, little-endian]
  • 0x16–0x17 Reserved

Block 3 (0x18–0x1F) — Accelerometer offsets

  • 0x18–0x19 Offset X [int16, little-endian]
  • 0x1A–0x1B Offset Y [int16, little-endian]
  • 0x1C–0x1D Offset Z [int16, little-endian]
  • 0x1E–0x1F Reserved

Note: sensitivity config moves from 0x010x0B; ready flag check changes from == 1 to & 0x01. Both are breaking changes. Requires coordinated update in Apis_Library — see NorthernWidget/Apis_Library#1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions