Hello,
I have a v.3 development board and I'm using PIC16F88 chip. For some reason, I just simply can't use port RA5-RA7. They somehow always act as if they are inputs but they don't really do anything. Even if I set the port direction to output, they still wouldn't output anything; in fact, they still act as inputs (whenever I push the SB5-SB7 buttons, the corresponding LEDs light up). The other bits, RA0-RA4, work fine without any issue.
Any idea what might have caused this? Your help is greatly appreciated! Thanks.
Can't get port A bit 5-7 to work
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
This is a common misconception. On the 16F88 chip, outputs A5 to A7 are multiplexed with the MCLR reset and the OSC1/2 external oscillator inputs. On our dev board, these pins are wired directly to the reset button and the oscillator circuitry, and not to the LEDs and switches (SA5-7 and LA5-7).
We included these LEDs and switches on the dev board for future expansion possibilities via the 2 40-way headers.
If you want to have access to these pins, you need to program the chip with certain configuration word settings (internal MCLR and internal RC clock) and then use the chip in your own circuitry.
Incidentally, the LEDs light when the switch is pressed because of the way the electronics are wired. If you take the PICmicro out of the socket, then all switches will light the corresponding LED.
I hope this explains things.
We included these LEDs and switches on the dev board for future expansion possibilities via the 2 40-way headers.
If you want to have access to these pins, you need to program the chip with certain configuration word settings (internal MCLR and internal RC clock) and then use the chip in your own circuitry.
Incidentally, the LEDs light when the switch is pressed because of the way the electronics are wired. If you take the PICmicro out of the socket, then all switches will light the corresponding LED.
I hope this explains things.