venkates2218
Full Member level 6
Hai,
I need to interface multiplexer with PIC18F452 controller with multiplexer.
In this,the data which provide to multiplexer will be like hex number like this
char enoder_data[] = {0xB8, 0xB7, 0xBA, 0xBB, 0xBC};
Have to convert hex value to binary values.
So I tried like this char enoder_data[] = {"B8", "B7", "BA", "BB", "BC"}; to convert into binary value but warning: excess elements in char array initializer error is generated.
How to convert the hex number to binary number.?
I need to interface multiplexer with PIC18F452 controller with multiplexer.
In this,the data which provide to multiplexer will be like hex number like this
char enoder_data[] = {0xB8, 0xB7, 0xBA, 0xBB, 0xBC};
Have to convert hex value to binary values.
So I tried like this char enoder_data[] = {"B8", "B7", "BA", "BB", "BC"}; to convert into binary value but warning: excess elements in char array initializer error is generated.
How to convert the hex number to binary number.?