Hi there,
I am using Hi-Tech C compiler
When I write datas to the driver.data, I want it to appear on the first 6 pins of PORTB without altereing the rest 2 pins. How can I do that?
I am using Hi-Tech C compiler
Code:
struct myvar{
unsigned data: 6;
};
void main(){
.............
myvar driver;
driver.data = 0xFF; // equivalent to driver.data = 0b111111, because 2 MSBs are ignored
.............
When I write datas to the driver.data, I want it to appear on the first 6 pins of PORTB without altereing the rest 2 pins. How can I do that?