CX51 not support strtoul library routine ! unsigned long x; unsigned char c[]="12345678" x = strtoul (c,NULL,10); returned zero ?