LoginSignup
0
0

More than 1 year has passed since last update.

STM32L010のI2Cの速度を変える

Last updated at Posted at 2022-05-09

x Mbed2リビジョン125

目的
低速または、高速のI2Cが使いたい

o_con415.jpg

o_con414.jpg

o_con416.jpg

資料



//i2c_frequency_010

#include "mbed.h"

I2C i2c(PA_10, PA_9); //010

char data_read[8];    //i2cバッファー

int main() {

    i2c.frequency(400000);

    while(1){

        data_read[0]='0';
        i2c.write(0x80, data_read, 1); //wait_ms(1);

    wait_ms(1000);

    } // while

} // main


//容量削減
void error(const char* format, ...){}





0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0