PE : BitsIo and ByteIo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PE : BitsIo and ByteIo

Jump to solution
1,049 Views
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?
Labels (1)
Tags (1)
0 Kudos
1 Solution
315 Views
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

View solution in original post

0 Kudos
1 Reply
316 Views
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 Kudos