Rohit de Sa
Joined: 09 Nov 2007 Posts: 282 Location: India
|
|
Posted: Sun Oct 26, 2008 8:54 pm |
|
|
Brian,
Maybe you could tell us a little more about the circuit. That would help. RA4 happens to be AN3, so maybe if that pin is not being used for a critical function, you could shuffle it about. RB4 and RB5 are AN10 and AN11 respectively.
Quote: | When I write the byte for the number to each digit (c0 thru c7) | I agree that byte-wise writing of data is most efficient; but if it is messing with the other functions of the device, you could create a struct which assigns a pin to each bit across different ports. Keep in mind though, that this approach will be much slower, since the controller will be setting/clearing each pin individually. Preferably use fast IO switching (#use fast_io()) in this case and set the TRIS registers accordingly.
Another option is not to use the decimal point on the 7 segment display at all. Connect the seven 'number segment' pins to PORTC. Set AN9 as an analog input, and then just write bytes to PORTC. Nothing will be output on AN9 since it has been declared as an analog input.
Rohit |
|