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

ˇ Please help ! I'm becoming crazy

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Apr 29, 2006 12:08 pm     Reply with quote

Also, add the changes shown in bold below:
Quote:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)
void main()
{
output_low (PIN_A5);
printf("ATD639xxxxxx;\r\n");
delay_ms(15000);
output_high (PIN_A5);
printf("ATH\r\n");

while(1);
}

The most important change for your current program is the "while(1);"
at the end. It prevents the PIC from going to sleep at the end of
the program. If the PIC goes to sleep, it will not send the last two
characters from the hardware UART. In your program, these characters
are "\r\n".
smxabi



Joined: 29 Apr 2006
Posts: 14
Location: Spain

View user's profile Send private message

PostPosted: Sat Apr 29, 2006 2:44 pm     Reply with quote

To rbereck:
Null modem. Is the first thing I had made. Everything looks the same.
To PCM Programmer:
I have made the changes that you suggest. Unfortunately I can hear my phone receiving a call.
I had suspected to the max232 if it only transmit but don´t receive but I make a little programm and works fine

#include <16F877A.h>
#fuses hs,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20000000)
#use rs232(baud=9600, xmit=pin_C6, rcv=pin_C7)

void main() {


while(true)
{
putc(getc());

}

}
I can receive by siow all I type
I have testing the voltage from pin 2 and 3 of the serial port. I have -9.2 volts at pin 2 and aproximatly the same at pin 3
Any suggestion, please ?
And a lot of thank´s by the quick answer
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sat Apr 29, 2006 3:23 pm     Reply with quote

I suspect your null-modem cable is wired different from your modem requirements. A simple null-modem cable only uses Tx, Rx and Gnd. Many modems also need a signal on their DTR input and sometimes also on the CTS input.

Is your null-modem cable wired like this one? http://www.lammertbies.nl/comm/info/RS-232_null_modem.html#loop
smxabi



Joined: 29 Apr 2006
Posts: 14
Location: Spain

View user's profile Send private message

PostPosted: Mon May 01, 2006 4:02 pm     Reply with quote

I`m very glad for helpul information from Rbereck and Ckielstra. Something I was making bad and finally a NULL MODEM has resolve my problemm. ˇ Rbereck your are right when you say that and 9/10 troubles could be resolve with null modem. !
The null modem I make has the following configuration and works fine:

2 3
3 2
5 5
1 + 4 + 6 (shorcut in connecto one)
1 + 4 + 6(shorcut in connecto two)
7 + 8 (shorcut in connecto one)
7 + 8 (shorcut in connecto two)

Thank´s a lot for all people of the foro who help me
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