Xilinx Binary To Bcd Conversion

Binary X

pls can can i convert hex values retrived fro counters to ascii decimal values which is sent to the serial buffer of 8952 microcontroller Added after 30 minutes: How can can i convert hex values e.g (0x40,0x12,0x0A) retrived from 89S52 counters to ascii decimal values e.g (64,18,10) which is sent to the serial buffer (SBUF) of 8952 microcontroller. PCB layout from image? hello, i am making a wireless door opening alarm for project inspired from efy august 2014 edition. here is the pcb layout as given in efy: Now since it says "An actual size pcb layout", my. Salam, You didn't mention what is the length of the hex 8 bit, 16 bits .etc Ok here is a simple method to convert hex (8bit) to bcd One restriction that method is vaild fot numbers 0 - 99 only. for example if you want to convert 99 to bcd 1- divide 99 by 10 2- put the result in the high nibble of the result variable3- put the reminder in the low nibble of the result variable This xilinx binary to bcd conversion method is very easy to implement in C like this. /* Prototype */void Hex2Decimal(unsigned long num); /* Hex Variable in any register */unsigned long num = 0x499602D2 ; /* 1234567890 */ int main (void){ Hex2Decimal(num); /* Convert given hex to decimal digits */ return 1; /* Good C!, not required */} /* Function */ /* Converts an unsigned hex number availabe in the micro registers to decimal digits and stores the decimal digits in an array */void Hex2Decimal(unsigned long num){ unsigned char value[10]; unsigned char i = 0; while(num > 0) { value[i] = num % 10; num /= 10; i = i + 1; }}. PCB layout from image? hello, i am making a wireless door opening alarm for project inspired from efy august 2014 edition. here is the pcb layout as given in efy: Now since it says "An actual size pcb layout", my.