I am looking for a controller that works with Arduino (i.e. there is official or third-party support for the controller in the Arduino IDE and core libs) and has both built-in CAN and I2C buses. I was looking at the ATMega automotive series (16M1, 32M1, 64M1, 32C1, 64C1) but it does not mention I2C/TWI in the datasheet at all.

(I know I can bitbang I2C, I know there is MCP2515 for CAN over SPI.)


EDIT: The application in mind is a bridge between a few I2C sensors and CAN, no complex logic. High performance is not necessary, plus it will drive costs upwards.

  • 1
    the ESP32 comes to mind. you can disable wifi/bt to save power and make it more like a mega
    – dandavis
    Apr 12, 2018 at 5:48
  • Thanks, @dandavis, ESP32 is too much :) I added a note on looking for rather low-performance chips.
    – eudoxos
    Apr 12, 2018 at 8:25
  • Is i2c to CAN conversion possible on microcontroller which has both CAN and I2C.(TM4C123GXL)... Oct 25, 2018 at 11:18

1 Answer 1


Many options come to mind:

A Bluebill board is programmable with mbed, STM32HAL (CubeMX) and Arduino, all of which have either CAN libraries for the CAN peripheral or have it even built-in in the OS (mbedos).

The Bluepill board is extremely low cost ($1.81 with free shipping from aliexpress) and features an STM32F103C8 microcontroller with 128kB Flash and 20kB RAM. Its peripherals include two I2C and one CAN bus.

enter image description here

enter image description here

Infos & Datasheet: http://www.st.com/en/microcontrollers/stm32f103c8.html, http://wiki.stm32duino.com/index.php?title=Blue_Pill

For flashing and debugging the chip you should have one cheap ST-Linkv2 clone (~3$ from china).

For programming environments you can use:

As frameworks you can use:

  • Arduino (see above)
  • ARM mbedos (builds upon STM32HAL, natively supported by PlatformIO)
  • STM32HAL (e.g. with project files for an IDE generated by STM32CubeMX)

Documentation references:

8 Bit microcontrollers from STM8AF series have a few micros with 1 I2C and 1 CAN bus: See http://www.st.com/en/microcontrollers/stm8af-series.html?querycriteria=productId=SS1583

enter image description here

Ready buyable evaluation board: http://www.st.com/en/evaluation-tools/stm8a-discovery.html (you want the STM8AF5288 one)

The toolchain changes then, of course. See https://my.st.com/content/my_st_com/en/extended-query.html?querycriteria=productId=LN1759$$associatedTo=SS1584

  • Good answer. Anything 8bit, though?
    – eudoxos
    Apr 12, 2018 at 18:16
  • @eudoxos sure, updated. Apr 12, 2018 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.