Hi DiGGi,
What has been said to you in the last few replies has been correct. If you want to get real basic here you can read porta like this:
Peek PortA, B0 Read PortA and put results in Variable B0
If Bit0 = 1 then task 1 'Reads PortA pin 0, if 1 then goto task 1
If Bit1 = 1 then task 2 'Reads PortA pin 1, if 1 then goto task 2
If Bit2 = 0 then task 3 'Reads PortA pin 2, if 1 then goto task 3
This is really the basic way I started. You can do the BITWISE operations like Paul was showing you also. Whatever you are comfortable with.
Variable B0 now represents a reading of the pins on PortA. you can now look at each pin individually.
Do you have a copy of the PBC manual? If not goto www.melabs.com and download a copy. There is a 2 page explanation on PEEK and a small explanation of POKE.
BobK
Bookmarks