View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 08, 2005 3:19 pm |
|
|
Try a more simple test program, and also include a #fuses statement.
Try sending characters to the PIC by typing in a terminal program.
You should see them echo'ed back to the terminal.
Code: | #include <16F767.h>
#fuses HS, NOWDT, NOPROTECT, BROWNOUT, PUT
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
void main()
{
char c;
while(1)
{
c = getc();
putc(c);
}
}
|
Note that this PIC doesn't support Low Voltage Programming, so the
LVP and NOLVP fuses are not an issue here. |
|
|
chipp
Joined: 08 Mar 2005 Posts: 2
|
It Works! |
Posted: Thu Mar 10, 2005 11:46 am |
|
|
Thank you, simple as it is it works, it seems like setting the TRIS on Port C was somehow interferring, so I commented it out:
Code: |
// set_tris_c(0x10000000); // C7 rx, C6 tx
|
|
|
|
fuzzy
Joined: 26 Feb 2005 Posts: 64
|
|
Posted: Thu Mar 10, 2005 2:54 pm |
|
|
I had a similar problem, my pic received all what he transmitted!!
I solved setting in a correct way TrisC.
in your case 0x10000000 is a hexadecimal number not a binary one.
tri to set 0b10000000 or 0x80 in TRISC |
|
|
|