
Originally Posted by
sbobowski
would someone please teach me how to read this so i know what to type in PBP
alot of people say "TRISB = %00000000"
TRIS = TRI STATE REGISTER so TrisA is tri state register of port A each port has 3 states,
input, output, unimplemented. Youset tris register by the bit so TrisA = %00000001 means bit zero is an input and the other 7 are outputs. You can address them individually just as easily like this TrisA.0 = 1 making PortA.0 an input. Port latches are done the same way,
example PortA = 0 all outputs low or PortA = %00000000 all portA outputs low, or PortA.1 = 1 ' portA 1 is high

Originally Posted by
sbobowski
and if so how do you read it, whats with the %, seems to me I'm setting individual values with that line (which is fine by me the more i learn now the better)
the % tells the compiler you are using binary. You could use decimal or hex just as well, I find binary easier because it gives a direct readout of the setting, ones are inputs zeros are outputs.

Originally Posted by
sbobowski
I'm so confused
Thanks in advance
Welcome to MY world, and the forum
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks