|
|
View previous topic :: View next topic |
Author |
Message |
mikesters Guest
|
16F88: output_high(pin_a5) stays low - output_a(0x20) works |
Posted: Wed Jul 06, 2005 5:26 am |
|
|
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
|
|
Posted: Wed Jul 06, 2005 7:53 am |
|
|
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
|
|
Posted: Wed Jul 06, 2005 7:56 am |
|
|
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 |
|
|
|
|
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
|