View previous topic :: View next topic |
Author |
Message |
bcs99
Joined: 22 Nov 2003 Posts: 32
|
Using RA3 (MCLR) as an output on 16F688 |
Posted: Tue Aug 23, 2005 3:09 pm |
|
|
I'm trying to use the MCLR pin (RA3) as an output. I have it tied to 5V through a 47k resistor. I'm not sure the options are setup correctly.
Here is my test program.
Code: |
#include <16F688.h>
#FUSES NOWDT, INTRC_IO, BROWNOUT, NOMCLR, NOCPD, PUT, NOIESO, NOFCMEN
#USE delay( clock=8000000 )
void main()
{
set_tris_a( 0b00110011 );
set_tris_c( 0b00000110 );
port_a_pullups( 0b00110011 );
setup_oscillator( OSC_8MHZ );
setup_adc_ports( NO_ANALOGS );
setup_adc( ADC_OFF );
setup_comparator( NC_NC_NC_NC );
while( TRUE )
{
delay_ms( 1 );
output_toggle( PIN_A3 );
}
}
|
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Aug 23, 2005 3:22 pm |
|
|
Look at the 16F688 data sheet in the I/O Ports section at Figure 4-4,
which is a block diagram of RA3. It has no output driver. It's an
input only pin. |
|
|
bcs99
Joined: 22 Nov 2003 Posts: 32
|
|
Posted: Tue Aug 23, 2005 3:25 pm |
|
|
Oops! You are right. I missed that.
Thanks for the quick reply. |
|
|
|