Write a function that accepts an integer as an argument and does the following on lower 1 byte (ignore the higher bytes) 1. Take bits 0,2,4,6 from the passed argument and OR them together to get a 1 bit result 2. Take bits 1,3,5,7 from the passed argument and AND them together to get a 1 bit result 3. Perform an XOR of above 2 results 4. Returns the result of XOR
Example:
1. Input = 0x123456FF Output = 0x00
2. Input = 0x123456AA Output = 0x01
3. Input = 0x123456CC Output = 0x01
4. Input = 0x12345600 Output = 0x00 1
Answers
Answered by
0
Answer:
PIC16F877A has 33-gpio's grouped into five ports namely PORTA-PORTE as shown in the below table. As shown in the above table many I/O pins have 2-3 functions.
Answered by
2
Explanation:
hope the attach helps you...
Attachments:
Similar questions
History,
15 days ago
Accountancy,
9 months ago