PDA

View Full Version : Siemens TC35



savnik
- 4th December 2010, 09:22
I have a Siemens TC35. I can send message with hyper terminal. Also i have a easypic4 and i can connect with hyper terminal.
If i can connect the easypic4 with Siemens TC35 and use the bellow coce never the led on portb.6 go on

DEFINE OSC 8
DEFINE HSER_TXSTA 20h
DEFINE HSER_RCSTA 90h
DEFINE HSER_BAUD 9600
DEFINE HSER_CLROERR 1

SMS:

HSEROUT ["AT" ,13,10] ' send AT to modem followed by a CR and line feed

HSERIN 5000, SMS, [WAIT("OK")] ' now wait for 5secs until OK is received however
' if it is not then goto the SMS routine again

HIGH PORTB.6 ' don't go on
pause 1000
LOW PORTB.6

end

pedja089
- 4th December 2010, 12:44
Try to connect easypic to serial port, and hyper terminal. Then you can see does pic send "AT", and will receive OK.

aratti
- 4th December 2010, 13:27
Does your easypic4 have a RS232 level converter (Max232) prior connecting it to the Siemens TC35 ? If not then you will need one.

Cheers

Al.

savnik
- 4th December 2010, 13:35
Yes, have max232.

pedja089
- 4th December 2010, 13:46
Check the configuration switches and jumpers

aratti
- 4th December 2010, 13:51
In this case, check your connection Tx from your pic should go to pin 3 of your TC35 while your pic Rx should go to pin 2 of TC35 and pin 5 of TC35 should be connected to ground of your pic board.

Cheers

Al.

Edited: HSEROUT ["AT" ,13] use only CR, remove LF from your code.

savnik
- 4th December 2010, 17:30
I have use this circuit.
If i connect to hyper terminal all works fine, but if i connect to pic don't work.

savnik
- 4th December 2010, 17:30
Check the configuration switches and jumpers
I have check many times.

ScaleRobotics
- 4th December 2010, 17:39
I don't know if it will make a difference, but you could try:



DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 20h ' Enable transmit, BRGH = 0
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
DEFINE HSER_SPBRG 51 ' 9600 Baud @ 8MHz, 0.16%
SPBRGH = 0
BAUDCON.3 = 1 ' Enable 16 bit baudrate generator

aratti
- 4th December 2010, 17:59
You have to change connections from max to DB9 connector.

Max pin 14 to DB9 pin 3 and Max pin 13 to DB9 pin 2 or cross the connecting cable.

Alberto

savnik
- 4th December 2010, 18:09
You have to change connections from max to DB9 connector.

Max pin 14 to DB9 pin 3 and Max pin 13 to DB9 pin 2 or cross the connecting cable.

Alberto
I try and not work

savnik
- 4th December 2010, 18:14
I have use this circuit.
If i connect to hyper terminal all works fine, but if i connect to pic don't work.
Why if i connect the DB9 connector to pc (hyper terminal) with rs232 cable all work?

aratti
- 4th December 2010, 18:36
If you have modified the Max232 to DB9 as per my previous post then you pic board now is a DTE device, and to connect to the PC, which is a DTE device you need to cross pin 2 with pin 3 in the connecting cable. Once you have a crossed cable you can check your board and program functionality using hyperterminal to send the "OK" once you receive the "AT" from the board. If this works and the TC35 works with hyperterminal it should work also with your pic board.

Remember that your TC35 is a DCE device and a DCE device is connected to DTE device with a cable pin to pin. Since you are very likely working without handshaking then you need only three connections on the DB9 (pin 2; pin 3 and pin 5)

Al.

Edited:
I looked once again to the picture you have posted and I noted on the left side a note "TO THE TC35". This is wrong. Pin 11 and pin 12 of Max232 must be connected to the pic, while Max pin 14 goes to DB9 pin 3 and max pin 13 goes to DB9 pin 2. This DB9 connector is the one you will use to connect your TC35

aratti
- 4th December 2010, 19:05
The attached picture will explain better how the connection have to done.

Cheers

Al.

savnik
- 4th December 2010, 19:13
I attach all the circuit wich is assembly in one pc board

aratti
- 4th December 2010, 19:27
Check that pic pin 18 is connected to Max pin 12 and pic pin 19 is connected to max pin 11.

Since it seems you have a wired PCB then very likely you are unable to change the DB9 connection, so cross the serial cable

Al.

savnik
- 4th December 2010, 20:04
Check that pic pin 18 is connected to Max pin 12 and pic pin 19 is connected to max pin 11.

Since it seems you have a wired PCB then very likely you are unable to change the DB9 connection, so cross the serial cable

Al.
The pin 18 is connected to Max pin 11 and pic pin 19 is connected to max pin 12.
When connect the DB9 connection with hyperterminal and with those :
at
OK
at+creg?
+CREG: 0,1

OK
at+cmgf=1
OK
at+cmgs=xxxxxxxxxx
> hello my friend
+CMGS: 4

work very well.
When i connect to DB9 connection the pic don't work. I connect the pin 2,3,5 with pic pin 25,26 and ground (normal and cross)

savnik
- 4th December 2010, 20:09
I have code for AVR and for C8051 , but i don't know c language.

aratti
- 4th December 2010, 20:20
I connect the pin 2,3,5 with pic pin 25,26 and ground (normal and cross)

Post which pic you are using. You must have a Max 232 in between your pic and your TC35.

The max232 you have internally the TC35 is for converting the internal TTL to rs232. You will need an additional Max232 for reconverting the RS232 to TTL for your pic. See my last schematic for connection from your pic to TC35 DB9

Al.

savnik
- 4th December 2010, 20:29
Post which pic you are using. You must have a Max 232 in between your pic and your TC35.

The max232 you have internally the TC35 is for converting the internal TTL to rs232. You will need an additional Max232 for reconverting the RS232 to TTL for your pic. See my last schematic for connection from your pic to TC35 DB9

Al.
I use a pic16f877a.
I will try again the max232 on easypic4 (i have test already with no success).
Thank you for the help.

savnik
- 4th December 2010, 22:27
The attached picture will explain better how the connection have to done.

Cheers

Al.
I reverse the pin 2 with pin 3 and now work.
Thank you.