Tuesday, 31 March 2015

TRIS and PORT setting

Usually, those who study programming will first have this confusion of TRIS and PORT value setting . Here is what it is.

Before doing programming we have to define each port as input or output ports.. A particular pin ONLY can perform one duty at a time.. OUTPUT or INPUT .. So before starting programming we have to specify what pin it is whether input or output..For that we use TRIS command

If a port contains 8 pins.. to set 0th pin as input and rest as output (consider PORT as B)

    "1" shows that particular pin as input and "0" sets that particular pin as output.



No comments:

Post a Comment