• sbit with macro define
    Hi all, I just want to ask why I cannot use this in C51: ... sbit INPUT1 = P0 ^ 0; sbit INPUT2 = P0 ^ 1; #define CHECK_INPUT ((INPUT1 << 7) | (INPUT2 << 6)) When try using it: while(1...
  • HELP:How to define a complex MACRO?
    I had searched in the Discussion Forum for the whole moring but I couldn't find the right way to solve the problem I met,so I send this message hoping you guys can help me!Thanks in advance:-)My problem...
  • Use MACRO C "#define value" in MACRO ASM
    I use KeilC uVision4 for 89C51 MCU. I use "Inline ASM Code", like this : void main() { #pragma ASM MOV R7, #( 80000/40000 ) #pragma ENDASM } -> When COMPILE, ASM result file give a...
  • Using macros with variables declared on #define
    Any ideas why it's impossible to compile that simple code? #define AB_VALUES 2,3 #define Add(a,b) a+b void main(void) { int c; c = Add (AB_VALUES); }
  • ## Macro
    Hi, I am use the ## as follows #define ADC_SRV_DEV 1 #define ADCCON(dev, chan, reg) AD##dev##CON##chan##reg then when I give ADCCON(ADC_SRV_DEV, 1, bits.FORM) = 3; // this is equavalent...