|
|
View previous topic :: View next topic |
Author |
Message |
iw2nzm Guest
|
RC7 on PIC16F876(A) |
Posted: Sat Dec 30, 2006 4:36 pm |
|
|
Hi to all,
I can't use the RC7 pin as output. I know it's multiplexed with serial RX but when the SPEN is 0 it should work as output.
Here is the code:
Code: |
#include <16f876a.h>
#fuses HS, NOWDT, PUT,NOPROTECT,BROWNOUT,NOLVP,NOCPD,NOWRT,NODEBUG
#use delay(clock = 16000000, RESTART_WDT)
#use fast_io(c)
#byte rcsta = 0x18
void main() {
set_tris_c(0x00);
rcsta = 0x00;
output_high(PIN_C7);
for (;;) {}
|
There is no hardware connected to the PIC. Other pins works fine and the oscillator runs.
May anyone help me?
Marco / iw2nzm |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Dec 31, 2006 1:47 am |
|
|
Normally the Rx pin on the PIC is connected to the output of a
MAX232-type chip. The output of the MAX232's receive section
may conflict with the using pin C7 as an output.
What external circuit or chip is connected to pin C7 ?
Also, did you post your complete test program ? It's missing the
closing brace of main(). Is there more ? Is there a #use rs232()
statement in your program ?
What is your compiler version ? |
|
|
Guest
|
|
Posted: Sun Dec 31, 2006 2:33 am |
|
|
PCM programmer wrote: | Normally the Rx pin on the PIC is connected to the output of a
MAX232-type chip. The output of the MAX232's receive section
may conflict with the using pin C7 as an output.
What external circuit or chip is connected to pin C7 ?
Also, did you post your complete test program ? It's missing the
closing brace of main(). Is there more ? Is there a #use rs232()
statement in your program ?
What is your compiler version ? |
Hi,
I forgot the closing brace when I did copy&paste. There are no other code and on the board there are only the PIC, the oscillator section (16 MHz crystal and two 22pF capacitor) and a 100 nF bypass capacitor on power supply.
I don't need any serial communication, just digital output on Port C.
My compiler version is: 3.6.0.99
I wish you a happy new year
Marco / iw2nzm |
|
|
iw2nzm Guest
|
|
Posted: Sun Dec 31, 2006 2:49 am |
|
|
I solved! There was a short on the board
I'm sorry for the useless thread
However, thanks for the support
Marco / iw2nzm |
|
|
|
|
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
|