semiconductor
Full Member level 4
I need your help!
I'm writing a program to decode a 8 bit number (from 0 to 255) to 3 BCD-number for AT89C51 (3 BCD-numbers is put out at P1 and 4 high bits of P2.
For example: 122 (xxxxxxxx - 8-bit number) <--> 0001 0010 0010
But I haven't finished it yet. Can someone help me? The algorithm or some recommends to help me!
Thank you beforehand!
I'm writing a program to decode a 8 bit number (from 0 to 255) to 3 BCD-number for AT89C51 (3 BCD-numbers is put out at P1 and 4 high bits of P2.
For example: 122 (xxxxxxxx - 8-bit number) <--> 0001 0010 0010
But I haven't finished it yet. Can someone help me? The algorithm or some recommends to help me!
Thank you beforehand!