CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Using RA3 (MCLR) as an output on 16F688

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
bcs99



Joined: 22 Nov 2003
Posts: 32

View user's profile Send private message

Using RA3 (MCLR) as an output on 16F688
PostPosted: Tue Aug 23, 2005 3:09 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2005 3:22 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Aug 23, 2005 3:25 pm     Reply with quote

Oops! You are right. I missed that.

Thanks for the quick reply.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group