hey guys, thanks for viewing
is it possible to define a port constant like this:
#define stepone PORTC=0b00000001;
#define steptwo PORTC = 0b00000100;
#define stepthree PORTC = 0b00000010;
#define stepfour PORTC = 0b00001000;
i am creating a MikroC program where each of the steps would be used few times in the code and i dont want to go through the hassle of changing the bits in case there would need to be an adjustment.
is it fine like the above? if there are any better suggestions then please share. Thank you (using pic16f877a)
is it possible to define a port constant like this:
#define stepone PORTC=0b00000001;
#define steptwo PORTC = 0b00000100;
#define stepthree PORTC = 0b00000010;
#define stepfour PORTC = 0b00001000;
i am creating a MikroC program where each of the steps would be used few times in the code and i dont want to go through the hassle of changing the bits in case there would need to be an adjustment.
is it fine like the above? if there are any better suggestions then please share. Thank you (using pic16f877a)