0xDEADBEEF
Joined: 24 Jan 2007 Posts: 8
|
PIC24 PORTB issue. |
Posted: Tue Mar 04, 2008 11:01 am |
|
|
Sample code:
Code: | fprintf(COMCON, "\rA:%2x\tB:%2x\tC:%2x\tD:%2x\tE:%2x\tFB:%2x\tG:%2x\t", input_A(), input_B(), input_C(), input_D(), input_E(), input_F(), input_G()); |
1. The input function only returns an 8-bit number (yes, even if I change the printf formatting to %4x) instead of the full 16-bit value... i can work around that though.
2. All the ports are working except PORTB (well I haven't actually checked PORTC, but I'm not using it so I don't care).
No matter what, PORTB always reads as all zeroes.
Chip is a PIC24HJ256GP610 compilier is version 4.064
Any ideas? |
|