PE : BitsIo and ByteIo

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

PE : BitsIo and ByteIo

ソリューションへジャンプ
1,058件の閲覧回数
sebikoo
Contributor I
Hi.

I am writing code with PE on CW4.5

When I use bitsIO for Port 8ch, I get warning msg saying that " It is better to use ByteIo instead of BitsIo."

I need to handle each bits used for output, thus I choose BitsIo.



What if I use ByteIo? Still I can handle each IO like BitsIo?

What is difference between BitsIo bean and ByteIo?
ラベル(1)
タグ(1)
0 件の賞賛
1 解決策
324件の閲覧回数
ProcessorExpert
Senior Contributor III
Hello,

ByteIO bean provides the same set of methods like BitsIO bean. You can handle each IO pin by ByteIO bean as well as in BitsIO bean.

Generally if you need to handle a whole port (8-bit input/output) it is recommended to select ByteIO bean instead of BitsIO bean and it is recommended to select the BitsIO bean for utilization as a two- to seven-bit input/output. ByteIO bean has more optimized code of some methods than BitsIO bean when using for whole 8 pin port.

best regards
Vojtech Filip
Processor Expert Support Team
UNIS

元の投稿で解決策を見る

0 件の賞賛
1 返信
325件の閲覧回数
ProcessorExpert
Senior Contributor III
Hello,

ByteIO bean provides the same set of methods like BitsIO bean. You can handle each IO pin by ByteIO bean as well as in BitsIO bean.

Generally if you need to handle a whole port (8-bit input/output) it is recommended to select ByteIO bean instead of BitsIO bean and it is recommended to select the BitsIO bean for utilization as a two- to seven-bit input/output. ByteIO bean has more optimized code of some methods than BitsIO bean when using for whole 8 pin port.

best regards
Vojtech Filip
Processor Expert Support Team
UNIS
0 件の賞賛