AnsweredAssumed Answered

#define macros in user defined header file not carried over to source .c files

Question asked by Karthik Sukumar on Nov 25, 2012

Hi guys,


I am trying to interface a 20x4 LCD display with my DZ128 uC and I have written a couple of files for interfacing it, One is a header file (namely LCD.h) and the other is the .c file LCD.c. I have included them both in the source folder of the project and inside have various definitions. I have attached the files here.


The issue here is that when I debug the program the compiler dosent recognise the macro definitions in from the header file! (I dont get any errors from the build process as well) So If you could tell me what I am doing wrong that would be great!





edit: In other words whats the right way to define the macros ? I tried including the header file in the MCUinit.h file but same result. I dont know why but for some reason the macros defined in LCD.h dont take effect until after I have gone into the for loop ! When I am in debug mode all the macros have junk values ! and after going into the main for loop it seems like they have taken the value of the macros!



Original Attachment has been moved to:

Original Attachment has been moved to:

Original Attachment has been moved to: