• #define statements on variable declarations
    Hello. I am trying to find new and exciting ways to optimize (read: shrink down) my current code and want to include an eeprom autorefresh option to cut down on variables. Basically, when I have the...
  • 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); }
  • declaration after function call
    I just started using kile c51 compiler with µVision. My problem is only a stylistic issue. While initializing my controler: <dir> unsigned char dummy1 = 0xFF; /* call openADC0 */ openADC0(...
  • Define act as function?
    I've been using defines as fucntions like this: sbit DRIVE_PIN05 = P1^3; #define DRIVE_PIN05_HIGH (P1MDOUT |= 0x08);(DRIVE_PIN05 = 0) #define DRIVE_PIN05_LOW (P1MDOUT |= 0x08);(DRIVE_PIN05 ...
  • Keil, Instrinis function defination
    I am using AT89C55WD, 40 pin DIP, in one of my project. I have connected 12Mhz crystal. It is 8051 variant. So inst time is 1us. Using Keil v4.72.9.0 & C compiler V9.50.0.0 I am programming in...