Try: unsigned char bcd[5]; void int2bcd(unsigned int i) { bcd[0]=bcd[1]=bcd[2]=bcd[3]='0'; while (i>=10000) { i-=10000; ++bcd[0]; } while (i>=1000) { i-=1000; ++bcd[1]; } while (i>=100) { i-=100; ++bcd[2]; } bcd[4] = i & 0xFF; while (bcd[3]>=10) { bcd[4]-=10; ++bcd[3]; } bcd[4]+='0'; } regards, Reggie ----- Original Message ----- From: "Steger Stefan Georg" <0014stst@EDU.FH-KAERNTEN.AC.AT> To: Sent: Monday, June 02, 2003 4:20 AM Subject: [PIC]: Integer to char > Hi, > > can someone say me, if there exists a function for the PIC to convert an > integer to a char? > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics