jsbhalla88
Member level 1
- Joined
- Mar 3, 2015
- Messages
- 41
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Activity points
- 314
hello everyone,
I am writing code to make commands for testing different PCBs.
there have to be all kinds of commands in order to read status of any port, write to any port, any pin..i have made code for 2 pins now, and I think it be a very lengthy code and might eat up all the memory..
I am curious to know if there is a way to change the port and pin using a for loop or while, or any other method.
for example, for accessing pin RD4, I have to write TRISD, ANSELD, PORTD., similar instructions..
is there a way I could pass the port name (A/B/C/D/E)??
OR PASS THE PIN NUMBERS?
I am using PIC18F45K22 with MikroC Pro for PIC.
I am writing code to make commands for testing different PCBs.
there have to be all kinds of commands in order to read status of any port, write to any port, any pin..i have made code for 2 pins now, and I think it be a very lengthy code and might eat up all the memory..
I am curious to know if there is a way to change the port and pin using a for loop or while, or any other method.
for example, for accessing pin RD4, I have to write TRISD, ANSELD, PORTD., similar instructions..
is there a way I could pass the port name (A/B/C/D/E)??
OR PASS THE PIN NUMBERS?
I am using PIC18F45K22 with MikroC Pro for PIC.
Last edited: