On 3/4/2014 3:26 AM, alan.b.pearce@stfc.ac.uk wrote: > And I don't follow your logic on how a timing loop causes a divide by 0 e= rror. It just doesn't make sense. The MDD (firmware) reads a variable 'N' from the SD card and then does x=20 =3D y/N. If it reads N=3D=3Dzero then I've got a divide by zero error. This= is=20 fundamentally bad programming to do a divide without checking the=20 denominator or having a way of nicely handling exceptions. It's an issue with the SD card not being initialized properly. I really like the fact that SD cards are so cheap, but they sure are=20 pretty terrible for embedded systems using them in SPI mode. - Martin K --=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 .