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

pic16f88 PIN_B4 problem

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



Joined: 02 Apr 2008
Posts: 2

View user's profile Send private message

pic16f88 PIN_B4 problem
PostPosted: Sun Dec 07, 2008 1:40 pm     Reply with quote

I use pic16f88 for addressing. I use 4bit switch but PIN_B4 doesn't work.

When PIN_B4 equal to 1 then A2 goes 1.
When PIN_B4 equal to 0 then A2 goes 1.

State of A2 doesn't change.
Code:

   while(1){
       if(input(PIN_B4))
      {
      output_high(PIN_A2);
      }
      else
      {
        output_low(PIN_A2);
      }

   }
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Dec 07, 2008 2:21 pm     Reply with quote

1. Post a complete test program, which shows the #include, #fuses, #use
delay(), and main(). But keep it short. Here is an example of a short
test program:
http://www.ccsinfo.com/forum/viewtopic.php?t=30109&start=1
Don't put any unnecessary code in the test program.

2. Post your compiler version. It's a 4-digit number in this format:
x.xxx
You can find it at the top of the .LST file, which will be in your project
directory.

3. Post a description of the external circuits connected to pins B4 and A2.
Include the component values.

4. Post if you are testing this program with real hardware, or is this a
Proteus project ?
digifuzyon



Joined: 02 Apr 2008
Posts: 2

View user's profile Send private message

PostPosted: Mon Dec 08, 2008 8:08 am     Reply with quote

Thanks for your interest.

I found mistake . solder of resistor which between PINb4 and ground is very thin.
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