>> as long as the number is in litte-endian the casting is very simple. Casting of long to char is pretty exactly defined, and should work fine on machines with either endianness. It's the union and pointer dereference schemes that are subject to endianness issues. BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist