|
|
View previous topic :: View next topic |
Author |
Message |
michellelicious
Joined: 15 Apr 2007 Posts: 3
|
To PCM programmer |
Posted: Tue May 08, 2007 8:45 pm |
|
|
PCM programmer wrote: | Try a simple program below, that echoes back the characters that
you type in to the terminal window. It should work.
Code: |
#include <16F876A.h>
#fuses XT,NOWDT,NOPROTECT,BROWNOUT,PUT,NOLVP
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
//============================
void main()
{
char c;
while(1)
{
c = getc();
putc(c);
}
} |
|
This does not work for me!!! But why? The code is simple. I can only receive FROM PIC but the pic itself is not getc()ing anything.
CCS 4.013
PIC16f877 and 16f877a
Max232
Hyperterminal and Serial Port monitor
Thanx for any response |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue May 08, 2007 9:40 pm |
|
|
I don't have 4.013, but I do have 4.014. I tested it just now with that
verison, with a 16F877 and a PicDem2-Plus board. It works. It probably
also works with 4.013, because this type of simple program is likely what
CCS used to do some sort of pass-fail test on the version.
If you built your own board, then buy a pre-made board from some company. If you're using Proteus, then buy a real hardware board.
If you built your own serial cable, then buy a cable. |
|
|
|
|
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
|