Community Translation - Firmware Control of Hardware Output Pin in PSoC 3/5LP– KBA221509

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I'd like to translate KBA221509 into Japanese

moto

Original KBA: KBA221509

Firmware Control of Hardware Output Pin in PSoC 3/5LP– KBA221509

Translated by: MoTa_728816

==============================

タイトル: PSoC 3/5LP ファームウェアによるハードウェア出力ピンの接続制御 - KBA221509

ヴァージョン: **

質問:

PSoC® 3/5LP でファームウェアからハードウェア出力に接続されている GPIO  を動的に制御するのにはどうしたら良いですか?

回答:

GPIO の出力データは出力レジスタかデジタルグローバルバスのような内部ソースのどちらかでドライブされます。バイパスビットと呼ばれるポート設定レジスタのビット 7 は出力データのソースを選択します。ポートピンのバイパスビットが1 の場合、選択されたデジタルシステムインターコネクト (DSI) が当該ピンをドライブします。そのビットが 0 の場合、対応するポートロジックデータレジスタが当該ピンをドライブします。

1. ピンのバイパスビットが 1 : DSI 信号が GPIO をドライブします。例えば、PWM 出力がそのピンをドライブすることができます。図 1 のように PWM にピンを接続している場合、デフォルトで PSoC Creator の フィッタがこの処理を行います。

図 1. PWM と GPIO の接続

001-pastedImage_0.png

図 2で示されているように、ファームウェアから PWM_Out_Write API を使用してピンの状態を変更しても影響がないことに注意してください。

図 2: ハードウェ制御による出力ピンへの Pin Write

002-pastedImage_15.png

2. このシナリオで、ファームウェアから PWM_Out_Write API を使用して PWM_Out ピンを制御するのには、バイパスビットをクリア (0 に) します。もしピンのバイパスビットがクリア (0 に) されている場合、そのピンはポートデータレジスタ (Port DR) でドライブされます。

図 3: ポートピン設定レジスタのバイパスビットをクリアした後のファームウェアによる制御

003-pastedImage_17.png

制御を以前の PWM に戻すのには、PWM を再起動後に該当するバイパスビットをセット (1 に) してください。この手法は PSoC Creator の回路図でハードウェア接続されているピンをファームウェアから制御するのに使用することが出来ます。

==============================

7-May-2020

moto

0 Likes
1 Reply
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello, Tanaka-san

We receive your translation, it will be published to KBA to Community.

After upload, You will receive the points as the word of KBA.

Due to the current delay of processed work, Please bear with me for the delayed the response.

It could be delayed, but it will be processed soon.

Thanks for your contribution to CDC!

Will keep you update the status.

Thanks,

Jenna Jo

Jenna Jo
0 Likes