LoginSignup
0
0

More than 1 year has passed since last update.

LPC812MAXでタイマーで遊ぶ

Last updated at Posted at 2022-09-04

目的
タイマーのテスト

o_con721.jpg




//Timer_test1_812_1

#include "mbed.h"

//         TX    RX
Serial pc(P0_4, P0_0); //812

//タイマーの設定
Timer t;

//メイン関数
int main()
{

    int sd;

    //タイマーの開始
    t.start();

    //無限ループ
    while(1) {


        sd = t.read_us();//測定開始

        //マイクロ秒の表示
        pc.printf("[%d]\r\n",sd);

        wait_ms(1000);//1秒待つ

    }//while


}//main





o_con833.jpg

-8-

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