Please can someone explain this code to me:
TRISA = 0x000C; //sets pins RA2 and RA3 to inputs, rest of PortA as outputs
TRISC = 0xA000; //sets pins RC13 and RC15 as inputs, all else as outputs
I do not understand how 0x000C represents pins RA2 and RA3 ...and how 0xA000 represents pins RC13 and RC15. I understand binary numbers and a bit of hexadecimal but the above code throws me off.
Help!
TRISA = 0x000C; //sets pins RA2 and RA3 to inputs, rest of PortA as outputs
TRISC = 0xA000; //sets pins RC13 and RC15 as inputs, all else as outputs
I do not understand how 0x000C represents pins RA2 and RA3 ...and how 0xA000 represents pins RC13 and RC15. I understand binary numbers and a bit of hexadecimal but the above code throws me off.
Help!