Create Pin array in HI TECH C
Posted: Sat Sep 14, 2013 7:02 pm
Hello Friends,
I want to create pin array in HI TECH C for PIC16F like Arduino.
Assume I have PORTB.RB0,RB1....RB7 are my pins now.
I coded like this,
Not Worked...
compiler gives following errors...
bit data type not allowed for array implementation.
How can I implement an array with PORTB pins?
Thank in advance
I want to create pin array in HI TECH C for PIC16F like Arduino.
Code: Select all
int ledPins[] = {2, 7, 4, 6, 5, 3 };
I coded like this,
Code: Select all
#define D0 RB0
#define D1 RB1
#define D2 RB2
#define D3 RB3
#define D4 RB4
#define D5 RB5
#define D6 RB6
#define D7 RB7
bit pins_b[]={D0,D1,D2,D3,D4,D5,D6,D7};
compiler gives following errors...
bit data type not allowed for array implementation.

How can I implement an array with PORTB pins?
Thank in advance