ICCV7 using INA register
s1s
Posts: 4
I'm trying to learn how to program the Propeller and have a simple question.
I want to read bit 15 of INA register and would like to know how to access a specific bit. I can do it in assembly but think there has to be a different way with C.
Thanks,
Steve
I want to read bit 15 of INA register and would like to know how to access a specific bit. I can do it in assembly but think there has to be a different way with C.
Thanks,
Steve
Comments
or
#define BIT(x) (1 << (x))
if (INA & BIT(15)) ...
The best ive seen was
#define pinState(pin) ((INA>>pin)&1) 'A return of 1 is a high, 0 is low state. Quick easy way to get a pin state
TJ
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I owe everyone here a bunch, So thanks again for answering my dumb questions.
Projects. RG500 ECU system. PropCopter. Prop CanSat. Prop Paste Gun.
Suzuki RG500 in a RGV 250 frame.
Bimota V-Due (Running on the fuel injection system)
Aprilia RS250