PE : BitsIo and ByteIo

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PE : BitsIo and ByteIo

跳至解决方案
1,198 次查看
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 解答
464 次查看
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 回复
465 次查看
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 项奖励
回复