4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PSoCでパルスジェネレータ (Divider)を作る。

Last updated at Posted at 2019-12-11

こんにちは

PSoC初心者のやましょうです。

#基板
PSoC 5LP Prototypeing Kitを
http://akizukidenshi.com/catalog/g/gM-09432/
使いました。テスト4出力
選択後の最終出力としては、ポートは1本しか使っていません。

#スケッチ
SnapCrab_NoName_2019-12-11_12-44-50_No-00.png

#ポート配置
SnapCrab_NoName_2019-12-11_12-46-43_No-00.png

#コード

#include "project.h"
int main(void)
{
    CyGlobalIntEnable; /* Enable global interrupts. */

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */

    for(;;)
    {
        Control_Reg_1_Write(0X00);
        CyDelay(1000);
        Control_Reg_1_Write(0X01);
        CyDelay(1000);
        Control_Reg_1_Write(0X02);
        CyDelay(1000);
        Control_Reg_1_Write(0X03);
        CyDelay(1000);
    }
}

超絶手抜きなので1秒毎に出力のパルス変更していますが、
ボタン等で選択する様にした方が良いと思います。

#感想
ソフトが介在すると、パルスにジッタが出るので、PSOCでやればハードがやってくれるので
ジッタもなくなるのでとてもPSoC便利ですね。

以上
PSoC アドベントカレンダー2019 11日目
やましょうでした。

4
2
4

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
4
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?