This is odd. I've traced the problem to a2dInit() (I've found out that this is the issue by actually using it explicitly, it just stops the code from working :-P)
All the code SHOULD do is
int forceRead = a2dConvert8bit(0); //yeah, I tried with NUMBER TO CHANNEL macros I just forgot what they actually are :-P it's ADC0 anyway
But this fails. In fact, for some reason, the code doesn't even run, since I have a debug rprintf at the very top of the code that doesn't show up.
Commenting it out makes the code work again (all the print statements give output). Explicitly calling a2dInit() causes the failure.
It's an Axon, using AVRStudio 5.1. I've tried using AVRStudio 4 but it's being stupid and for some reason just won't connect to my device, hence 5.1.
Any thoughts, anyone? This is almost identical code to what has run before, so all of my includes are there...
MIKE