• 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 define vs var data type
    Hi, I'm just curios on how this work. Is this a general C/C++ process or C51? In main.h, I have a: #define MAX_TIME_OUT 3000 //This is beyond U8 In Worker.c, I have Timer 2 ISR: #include...