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

rs232 problem

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



Joined: 09 Sep 2005
Posts: 36

View user's profile Send private message

rs232 problem
PostPosted: Tue Oct 04, 2005 8:26 am     Reply with quote

i am sending data on rs232, printf("hello") and made all necessary things but i cannot see it on pc. iam using tty terminal program.
for the serial port of pc (6 and 4 short, 7-8 short ). dtr- dsr shorted and rts-cts shorted. the TX pin of microcontroller is held at 3.4 volts and receive pin of PC is held at -2.4 volts. is there a problem ??

and how can i use this serial data on my other c program on PC.
valemike
Guest







PostPosted: Tue Oct 04, 2005 8:33 am     Reply with quote

Look at page 20 (the .pdf's page, not the printed page) and the schematic to hook up to an RS232 chip is shown. This is the PICDEM-2 Plus user's manual. Verify those connections. If it still doesn't work, then post your small program, and specify what is the actual crystal frequency you are using, as well as which PIC.

http://ww1.microchip.com/downloads/en/DeviceDoc/51275b.pdf
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue Oct 04, 2005 10:39 am     Reply with quote

http://www.ccsinfo.com/faq/?4

http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html


Humberto
asunca



Joined: 09 Sep 2005
Posts: 36

View user's profile Send private message

PostPosted: Wed Oct 05, 2005 9:14 pm     Reply with quote

all the connections are verified but still no action though i ve changed the max232 with a new one. how should understand the transmit action of pic with using multi meter because i have no scope.. i ve no time, this is so urgent... pc settings are 9600 baud, 8 data bits, no parity, 1 stop bit.
i dont know which option should i set flow control;
Xon-Xoff or hardware or none??
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Wed Oct 05, 2005 9:34 pm     Reply with quote

I troubleshoot serial problems from the PIC outward.

Make a simple transmission detector: Solder a 220-470 ohm resistor to either the anode or cathode of a LED you know is operational. You will use this to touch on the TX pin (anode) and ground (cathode).

Write a small loop program that that transmits a number of 0x00 characters then a number of 0xFF characters, over and over...

Code:

while (TRUE) {
   for(i = 0; i < 50; i++) putc(0x00);
   for(i = 0; i < 50; i++) putc(0xFF);
}


Ensure that you've got something like this:
Code:

#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors,BRGH1oK,errors)


Run the program and use your LED contraption to see if any thing is being transmitted (it should blink.)

Reply with the results of the first step, and we'll go from there.....

Good luck,

John
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