You might try using the timeout function with the serin command.There's a good possibility that when the compass is triggered for data,the pic program has moved on before the data arrives.Also you could set the trigger low for continous data until troubleshooting is complete.If you only want to read data once,use the pulsout command for the trigger.