|
|
View previous topic :: View next topic |
Author |
Message |
weg22
Joined: 08 Jul 2005 Posts: 91
|
Can't output on PIN_B3 ===> CCP problem |
Posted: Tue Mar 21, 2006 12:55 pm |
|
|
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
|
|
Posted: Tue Mar 21, 2006 12:58 pm |
|
|
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? |
|
|
|
|
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
|