I2C detection code for the e54 and d21. I may expand on this later and make it something cooler. For now its just like the i2c-detect example arduino offers but written with asf code.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Penguin f2d3aa5fb2 e54 i2c detect working 2 years ago
d21/asf3 init 2 years ago
e54/asf4 e54 i2c detect working 2 years ago
README.md fixed readme 2 years ago

README.md

I2C Detect

I pretty much always need a i2c bus scanner whenever I start a new project. I figured I'd just formalize the code and stick it here.

The d21 project will compile and run on the samd21 xplained pro. The e54 project will compile and run on the same54 xplained pro. The code is extremely portable though. Just replace your i2c read and write functions with your hardware specific functions.

Right now I have no pullups enabled so you'll need to provide your own. Eventually I'll add the option to turn pullups on easily.

SAME54 XPLAINED PRO

The Virtual Com port via EDBG is used for the com port. You can change this at e54/asf4/config/conf_board.h.

USART

  • RX: PB24
  • TX: PB25

Baud Rate: 115200

I2C

  • SDA: PA22
  • SCL: PA23

Clock frequency: 400khz

SAMD21 XPLAINED PRO

The Virtual Com port via EDBG is used for the com port. You can change this at d21/asf3/d21_i2c_detect/src/config/conf_board.h.

USART

  • RX: PA23
  • TX: PA22

Baud Rate: 115200

I2C

  • SCL: PA09
  • SDA: PA08

Clock frequency: 400khz