Guys,
I need to do a C code (using CCS compiler) in my PIC (16F877A) send to a 7 segment display a number from 0 to 9. I'm using the command output_A(x) (x is the number to send to the display) but this command is for 8 bits. So, this number has until 4 bits (9d=1001b) and the PORTA of the PIC has 8 bits. The bits 0 to 3 I'm using to send the data to the 7 sements display and the bits 4 to 7 I want to use as independent discrete outputs.
Some guys told me that I need to do a mask in the command "output_A(x)" to run correctly. How can I do this mask?
Thanks!