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

Is some wrong with my schematic ?

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



Joined: 12 Apr 2011
Posts: 7

View user's profile Send private message

Is some wrong with my schematic ?
PostPosted: Sat Apr 16, 2011 11:26 am     Reply with quote

Hi, I just want to do a simple connection between pc and rs232.

I'm using 2 virtual port RS232 and a terminal.

When I send data to the pic, the pic answer with no data .

http://img821.imageshack.us/i/shema.png/

My code is :
Code:

#include <16F877.h>
#device *=16
#fuses HS, NOWDT, NOLVP, NOBROWNOUT, NOPROTECT, PUT
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7,errors, stream=PC)

//int i=2;

int8 msg[40];
//int8 next_in=0;

void main() {
 
    //set_tris_a(0x00);

while(1) {

msg[0]=fgetc();
fputc(msg[0]);
}

}
temtronic



Joined: 01 Jul 2010
Posts: 9246
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 16, 2011 5:01 pm     Reply with quote

Why not use the examples that CCS supplies in the examples folder ?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Sat Apr 16, 2011 8:07 pm     Reply with quote

I don't think the MAX232 pin #2 should be grounded. That is the voltage doubled +V and grounding it will kill the + and - charge pumps. It should have a cap to ground. See the MAX232 datasheet.
_________________
The search for better is endless. Instead simply find very good and get the job done.
surfer0815



Joined: 10 Sep 2010
Posts: 7
Location: Germany

View user's profile Send private message

PostPosted: Sun Apr 17, 2011 3:16 am     Reply with quote

HI! Ground pin 5 on your com Connector, and change Pin 2 and 3 of Com connector, It looks like your schema is wrong.
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