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

16F88: output_high(pin_a5) stays low - output_a(0x20) works

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







16F88: output_high(pin_a5) stays low - output_a(0x20) works
PostPosted: Wed Jul 06, 2005 5:26 am     Reply with quote

hi,

on 16F88 i need pin_a5 to work just like the others.
if i set a5 and a6 to high, only a6 goes high. if only set a5 to high it works just fine. a5 stays low (only) in combination with a6 and a7. what am i doing wrong?


thanx for helping


Code:
#include <16F88.h>

#use delay(clock=4000000)
#fuses NOWDT,INTRC_IO, NOPUT, NOMCLR, NOLVP, NOBROWNOUT, NOCPD, NOWRT, NODEBUG, NOPROTECT, NOFCMEN, NOIESO

void main()
{
   setup_adc(ADC_OFF);

   set_tris_a(0);

   while(1)
   {
      Output_high(PIN_A5);
      Output_high(PIN_A6);
      delay_cycles(100);

      Output_low(PIN_A5);
      Output_low(PIN_A6);
      delay_cycles(100);
   }
}
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Wed Jul 06, 2005 7:53 am     Reply with quote

I'm looking at the datasheet. RA5 is designated as an INPUT only. Unfortunately, you'll have to find another pin; if you're out of pins, then swap RA5 with another pin that you are using as an input.
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Wed Jul 06, 2005 7:56 am     Reply with quote

mikesters wrote:
Quote:

on 16F88 i need pin_a5 to work just like the others.


Read the datasheet. In page 10 you will see that A5 is an INPUT PIN

Best wishes,

Humberto
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