Sunday, April 8, 2007

The poke command

Once the lines have been configured (input or output )using
TRIS register ,we can start using port.To output a binary
number at the port,simply write the number using the poke
command.The binary equivalent of the decimal number will
be written to the port.
For example :
Poke 6, 0
will write 00000000 to the portB
poke 6, 255
will write 11111111 to the portB
Where 6 is the address of the portB
In a similar fasion we can output any decimal number between
0 and 256 (excluding 256) to the portB.

No comments: