We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
I'm having a problem using unsigned long. Im using the LARGE memory model.
unsigned long largeWait; largeWait = 10000; while(largeWait--);
when I run this on my chip I never exit the loop. Any Ideas? Are there known bugs concerning unsigned long?
this code for example works: unsigned long data largeWait; largeWait = 10000; while(largeWait--);
this code works as well: unsigned short largeWait; largeWait = 10000; while(largeWait--);
Thanks
In large memory model, everything will be XDATA - have you configured your chip so that it knows how to access XDATA memory? And is there any XDATA memory for the processor to access?
Maybe you are reading/writing "air" instead of having a variable properly stored in RAM.
Thank you!
That was the problem indeed.