View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sat Apr 29, 2006 12:08 pm |
|
|
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
|
|
Posted: Sat Apr 29, 2006 2:44 pm |
|
|
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
|
|
Posted: Sat Apr 29, 2006 3:23 pm |
|
|
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
|
|
Posted: Mon May 01, 2006 4:02 pm |
|
|
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 |
|
|
|