So you want to check at run-time, not compile-time. Perhaps you can use some of the simulator limitations (such as AD, SSP or w= eak=20 pull-up not working) which makes some registers behave different on the=20 simulator or perhaps a stimulus setting on a free IO to identify the simula= tor. /Ruben > I have done everything you mentioned--except switching to MPLAB-X :) Th= e > difference is, I want it to be automatic. Right now, what happens is th= at > I build it with SIM selected, run the thing, and when I halt it I am stuc= k > in some infinite loop or another. I immediately realize that's a side > effect of the simulator, so I do a quick search of my code to see if it > looks at the value of SIMULATING. And it does, so I go to the build > configuration and put that in, only to have it collide with the symbol I > put in a config file--see, there's more than one way to do it, and I of > course, chose the other way. So, I take the label out of the build, then > go to the file and change the value from 0 to 1, and then I have to > recompile the whole thing all over again before I can use it. >=20 > Later, when I go back to the real hardware, I will forget the label is se= t > to 1, and the above story pretty much repeats. >=20 > By the way, most of you will be thinking, "It's just one thing, how > difficult can it be?" Well, consider that I can build for my demo board > with the PIC32MX360 or the real hardware with the PIC32MX440, and so > there's another label...that would be four possible combinations to get > right, and one more thing to change would make it eight...soon you would = go > crazy. Happily, there is a way to identify the processor, so I current= ly > have just that one problem. But I would really like zero problems :) > --=20 > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124 200 39 Malm=F6 Sweden www.liros.se Tel +46 40142078 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .