View previous topic :: View next topic |
Author |
Message |
sraiderk
Joined: 09 Feb 2005 Posts: 48
|
tc35i |
Posted: Wed May 06, 2009 3:39 am |
|
|
I am using 18f4620 and TC35i. Turn on TC35i using IGT pin. Then TC35i produce 2.904V at VDD pin. But, I sent data using AT comments. I never take anything. I am using Hardware uart.
Code: | #use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8,errors) |
in main block
Code: |
printf("AT+CGMI");
putc(cr); //where cr is defined as 0x0d
z=getch(); // program waiting here. |
pic C7 pin connected to tc35i pin 18
pic C6 pin connected to tc35i pin 19
I used scope, then I saw the sended bytes. But I don't see any coming data on scope like pic. Do you need to use invert definition with rs232 and SW uart? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed May 06, 2009 12:54 pm |
|
|
To allow the autobaud feature detect the baudrate, the characters 'A' and 'T' must be sent with surrounding delay first.
UART signals with high (3.3V) idle level are fine. The handshake signals must also be active (low), I guess that's the default state without connecting the pins. |
|
|
sraiderk
Joined: 09 Feb 2005 Posts: 48
|
|
Posted: Thu May 07, 2009 1:10 am |
|
|
PCM Programmer, you can find the hardware connection of the TC35i the following link.
http://www.sendsms.cn/download/tc35i_hd_v0103_1073577.pdf
I made some other test. I disconnected TX and RX pins of TC35i from 18f4620. I put the max232 and then connected the following.
TC35i pin 18 to MAX232 Pin 10 (TTL Level)
MAX232 PİN 7 to PC RS232 port Pin2 (receive)
TC35i pin 19 to MAX232 Pin 9 (TTL Level)
MAX232 Pin 8 to PC RS232 port Pin3 (transmit)
and of course ground connection to PC RS232 port Pin5 with my circuit ground. I opened the PCW C serial Input/Output monitor then I write the AT comments, then every thing was ok. So, invert and SWUART should be use or not. Please help me. What is wrong with MCU? |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Thu May 07, 2009 4:24 am |
|
|
Quote: | So, invert and SWUART should be use or not. |
Your present rs232 setup is O.K., as said.
Did you understand the autobaud problem at all? I don't know, what's the TC35's default baud rate, but I guess it's not 9600, rather 19k2. If a modem or GSM module has a different or unknown initial baud rate, you must start with an AT sequence, that can be recognized by the autobaud algorithm. It's always O.K. with commands entered in Hyperterminal, they have plenty of delay. |
|
|
|