Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Interface PIC to Phone

Status
Not open for further replies.

Zhane

Member level 5
Joined
Feb 2, 2008
Messages
89
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,876
8n1 pic

I'm intending to use a phone as the sms server for my project.

I've tested the commands out using a datacable and my PC.

I've coded the commands and programmed into my PIC chip and setup my phone as follows:

Phone --Datacable [DB9]--MAX3232--RX/TX/GND of PIC

but apparently nothing happens on my phone side.
Is there anything that i'm missing here?
 

power max232 from dtr/rts

Hi,
Whatever you have done appears to be correct, have you checked if your PIC program is running, connect an LED + Resistor to the TX output of PIC and see if it glows. Have you taken care of the baud rate (9600) and dataformat (8N1) on the PIC side. First connect the PIC output to PC and write a small test program to Receive and Send a few characters from/ to PC and check if it works ok. And, last, but not least, check if you have made the right connection of RX to TX, TX to RX and Ground to Ground between the two devices.
Regards,
Laktronics
 
interfac pic and mobile

I've connected the PIC to my PC...and my PIC is able to send data over to the PC. The TX pin of PIC glows...as well as its RX too

I crossed TX-RX and RX-TX, but nothing seems to be happening

what else can I do??
 

phone - pic interface

Hi,
So far so good. I forgot to ask you about this point earlier, that is, does your cable contain a regulator and MAX 232 or equivalet chip on it, that uses DTR/RTS signals from the serial port ? If so, you have to connect equivalent signals or connect to a DC source of 9V to 12V supply to these pins from your microcontroller board to make it work. If you have schematic of your cable please give a block diagram of the interface pins connected from your micro board.
Regards,
Laktronics
 

pcb133lbe pinout

I dont have the schematic for it...but the cable im using is PCB133LBE

connect to DTR? CTS? RTS? DSR?
 

max232 powered from dtr 115200

Hi,
Can you check the cable and see if it contains a regulator and RS232 IC, whose power is connected to DTR and RTS pins of the RS232 connector, possibly through a diode, if so, you have to connect to a voltage source or to DTR/RTS pins of your board. I have not advised you to connect to DTR/RTS pins since your MAX232 itself is generating these signals using capacitor switching and may not have enough power to drive another MAX232. A better option I thought was to use a power supply itself.
Regards,
Laktronics
 

pic phone interface

erm how to check?

the screws are too damaged to allow me to unscrew them.

mobilefun-image.gif


there's that small box thing to extend to another phone connector..

DTR and DSR, the pin 4 and 6 of the RS232 output of the cable is shorted

as for RTS and CTS i have no idea about them

http://pinouts.ru/CellularPhonesCables/samsung_x100cable_pinout.shtml
http://www.disswap.narod.ru/kabel/kabel_01.html

is either of them the schematics?
 

telephone data cable tx rx

Hi,
Do not spoil your cable. Pinouts.ru is a good site for many cables and depending up on your phone model you can probably get the diagram there.
1. In any case, you can short pin 4 and pin 7 (DTR/RTS) of the connector on the controller board and connect it to a voltage of 9 to 12V, may be you can use the unreg voltage of your 5V supply and connect it through a 220 ohms and 9V zener to these pins. Raising DTR /RTS to 12V will not any how harm the circuit. If the cable uses these signals to get 5V, or for enabling RX input to phone,then it should work.
Regards,
Laktronics
 

max232 ic diagram

ive supplied 9+v to both of the pin 4 and 7 of my datacable's serial connector. but it still doesnt work .. >.< what else can i try?

Added after 5 hours 33 minutes:

other than trying the 9v directly to pin 4 and 7,
I tried this also...

**broken link removed**

I connected my serial cable to power my datacable, but using the RX TX from the PIC...but still... nothing's happening.

On my PIC's side, I set it to 115200 baudrate, 8N1, with SPBRG=10 and BRGH=1 (high speed). This was the setting that work when I connected the PIC to my PC.

:cry:[/img]
 

how to interface pic with mobile in html

Hi,
And you confirm, that the same cable works when connected between Mobile and PC. If it is so. the problem is above my head.
When you connected 9V and ground did any LED ,if any, glow on the cable? Try if you can get some details of the cable from the above site or google and look for the cable diagram for your mobile.
By the way I note that your PIC works with PC only for 115k baud. At what rate did PC work with Mobile. It is essential to test PIC at the same baud rate as the rate at which the mobile worked with PC. When you connect mobile to PIC then also you should use the same baud.
Do not connect ground to any pin other than pin 5 of your PIC side connector. By the way you have not shown ground connections to Max 232, I hope they are all there.Can you send a final diagram of the RS232 connector wiring of your PIC side including full connectons of Max 232?
Regards,
Laktronics
 

max232 dtr rts

hmm

I tried the following...

a) PIC to PC
PIC: 115200 Baudrate, SPBRG=10, BRGH=1, 8N1 ; PC: 115200 baudrate, 8N1, no flowcontrol
b) Phone to PC
PC: same setting as above

yep, i used the same datacable to connect between mobile-pc and attempt to connect between PIC and mobile (with max3232)

I connected LEDs to pin10 and pin 9 ,pin7 and pin 8 of MAX3232....
my pin 10 and 9 always lights up, my pin 7's blink when data is sent, pin8 nv lights up.. all the LEDs are connected with the +ve end tied to the pin, and the -ve end to a resistor, then to gnd

**broken link removed**

I tried finding the schematic for my exact datacable model, but wasnt able to find it. PCB133LBE.

Im desperate >.<
 
pic telephone schematic

Hi,
Your wiring appears to be ok.
But you have not shown RTS/DTR connections to 9V supply, they should be there.
Again, I did not understand why you have taken direct connections from the pins of Mobile cable connector to MAX232 IC, you could have routed them through the connector on the board to avoid any loose contacts, or have you shown it like that in schematic only for the sake of clarity ?
Are you sending AT command at regular intervals from PIC or only once?
Did you do any special setup to hyper terminal while receiving on PC?
Let me also think more, do not worry, you would find a solution soon.
Regards,
Laktronics

Added after 26 minutes:

Hi,
I want an urgent reply, how did you connect the mobile cable to PC, did you directly connect the 9 pin connector of the cable to PC' back panel, in that case the pins of the mobile connector are all reverse wired and you have to connect accordingly while connecting to PIC. All pins TX/RX, DTR/DSR and RTS/CTS may be wired to complement PC connections, we might have already misinterpreted DTR/RTS lines.
Give me a fast reply, trace exactly to which pin of mobile connector the pin3 (TX)of the PC cnnector was connected?
Regards,
Laktronics
 

max rs232 ic,pic

That was my 2nd attempt. The initial 9v was connected to the datacable end with the common ground. Had the similar setting except that the Com1's RS232 is not there.

Initially I tried sending the commands at regular interval, but nothing happens. Now, I used a switch to trigger a set of command to be sent over as and when is necessary.

Connections wise, I used a Male-DB9 connector to plug into the datacable's Female-DB8 end. I used the other wire-ends of the male-connector to connect to my PIC chip (male-connector+female-datacable) . Instead of connecting directly frm datacable to chip.

**broken link removed**

As show on the pix, the blue line is connected to PIN7 of the MAX3232 chip and the orange line(pin3, TX of datacable) is connected to PIN8 of the chip.

---------------

When I tested the datacable+mobile to the PC, I connected directly to the back of the PC without the male-DB9 connector.
 

pictophone

Hi,
Yes, here is the mistake, just infront of your eyes!!!
You should connect pin 3 (pink wire)of your male connector to TX out of your board, that is pin 7 of MAX and pin 8 RX pin of MAX should go to the blue wire. You should also connect pins 4 and 7 ONLY of the male connector to 9V if required. Pin 5 of the connector to ground.
You could have avoided all these problems, if in the first place, you mounted a male connector on your board and wired as per PC's connector.
Regards,
Laktronics
 

pictophone help

i connected the female-DB9 of the datacable to the male-DB9 that i used to connect with the max.

**broken link removed**
Going by the above, my pin3 of the male connector is actually my TX...


RS232(Male) MAX PIC
[ pins as per my diagram]

RX (Pin2)---------------------[ Pin7---<<<<---- Pin10 ]---------------TX (Pin25)
TX (Pin3)---------------------[ Pin8----->>>-----Pin9 ]--------------- RX(Pin26)


MAX3232
Pin 7 a RS232 output
Pin 10 a TTL input
Pin 8 a RS232 input
Pin 9 a TTL output
 

Hi,
You are trapped into the designer's Mental Mental Block. Pin 2 is not RX of your phone cable, Pin 3 is its RX, I am saying this because when you connected the phone cable to PC, it worked. On PC pin3 is TX and when you connect directly pin 3 of your cable connects to pin 3 of PC, so, on your data cable pin 3 is RX. On the same basis, pin2 is TX on the datacable.
Regards,
Laktronics
 

    Zhane

    Points: 2
    Helpful Answer Positive Rating
i think i get you. will try it soon and get back to you regarding how it is
 

how can I decode the incoming messages?

normally when sms come in, my phone will send out a +CMT xxxxx xxxxx to my PC.

what kind of flags are raise upon complete transmission?

cause for normal char data, it's quite easy...with the RCIF, but for a incoming sms..what kind of format is it in?

Added after 26 minutes:

erm or rather

how do I extract the relevant data from

+CMT: "+2236784793",,"04/09/16,10:00:58-00" Hello

??
 

Hi,
May be the type of Message format will be specified by the manufacturer ?
Should look into the interfacing specifications of the phone?
On the other hand if the message like the one you have shown is a standard, like the phone number followed by date and time followed by the message, you can always look for the right position of the message in the incoming data stream and store or display them. There may be some control characters at the end of the text which you can see on the PC in Hex mode?
Regards,
Laktronics
 

help~_~

now i cannot send msg out of my phone
thru pc or pic
i get this +CMS Error: 500
what should i do?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top