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 CCS Technical Support

Can't output on PIN_B3 ===> CCP problem

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



Joined: 08 Jul 2005
Posts: 91

View user's profile Send private message

Can't output on PIN_B3 ===> CCP problem
PostPosted: Tue Mar 21, 2006 12:55 pm     Reply with quote

Hi all,

I am using a PIC16F87 which has an option to use either PIN_B0 or PIN_B3 for the CCP interrupt. I am not using PIN_B3 for CCP, but do need to use it as an output pin. All I am trying to do is output_high on PIN_B3 and it's not working. I tried using the #fuses CCPB0 declaration, but that doesn't seem to be working either. I can successfully output on all other pins (I haven't tried B0) except for B3. My code is attached below. Thanks in advance!

Code:

#include <16F87.H>
#include <stdlib.h>

#fuses HS,NOWDT,NOPROTECT,PUT,CCPB0
#use delay(clock=10000000)

main()
{
      SET_TRIS_B(00010011);

      output_high(PIN_A2); delay_ms(1500);
      output_low(PIN_A2);

      while(1)
      {
            output_high(PIN_B2);
            output_high(PIN_B3);
            output_high(PIN_B5);
            output_high(PIN_B6);
            output_high(PIN_B7);
       }
} // end of main
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 21, 2006 12:58 pm     Reply with quote

This is a FAQ question. Look in the CCS FAQ, here:
http://www.ccsinfo.com/faq.php

In the Input/Output section, read the question on:

Why isn't PortB, pin 3, working?
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