Census

An I2C bus with unknown devices is wired to I2C1. Your job: scan every valid 7-bit address (1 through 127), determine which addresses ACK, and report the results over UART.

For each address that responds, print its 7-bit address in hex on its own line (uppercase, with 0x prefix). After the scan, print "DONE:" followed by the total number of devices found.

Example output if addresses 0x20 and 0x3F respond: 0x20 0x3F DONE:2

The starter code provides UART helpers and I2C register definitions. You need to enable the I2C1 clock, configure the peripheral, and implement the scan loop.

Loading the interactive arena.