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.

How to get serial communication between PIC16F84A and a mobile phone?

Status
Not open for further replies.

djzbor

Junior Member level 2
Joined
Feb 23, 2008
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,557
I am using PIC 16f84A to interface to mobile phone so that i can control devices connected to PIC will be controlled (ON/Off) by sending sms to the mobile phone.To do that i have to read the message form the phone memory and send to the out put port of the PIC to control the devices.But PIC 16f84A do not have UART for serial communication and some suggest that the PIC can be programmed so that it can serially communicate with the cell phone ,i found no hint how to achieve serial communication until now.Can any one help me how to do that ?
 

Re: serial communication

Hi djzbor,

First of all, it's possible, becouse I did it about 8-9 years ago, with 16F84.

I have case with only reading, so I use one PIC pin as input one.

I have serial comm. 9600 8N1, so, in this case for one byte (character) you need 1.04msec of time (start bit + 8 data bits + stop bit).

As remember well, I used one of RB4-RB8 pins with activated interrupt for pin polarity change. After you get interrupt (this is start bit), you must made timer with interrupt time 0.000104 (1/9600).

Then everuthing is easy:
1. you get first timer interrupt, see if your input serial pin is hi/low => save this value in some temp byte (shifting temp byte with logic and "11111110" in case of zero, or logic or "00000001" in case of logic "1" on input pin). Of course you start your timer again.
2. second interrupt, second bit in incomming byte....
.....
8. eight interrupt, last incomming bit, put timer once more.
9. you get stop bit, diable timer interrupts, enable level interrupt on RB4-RB8 pins.

To send byte is similar, but everything is in your hands (more easy). I suggest to copy your data to temp byte, then send start bit, after that with shifting you can see if bit you sending should 0 or 1, and put your Tx pin to be exactly like bit you sending (in temp byte). You use timer with 0.000104 time for every bit, after last bit put stop bit and thats it.

Its look comlicated, but it isn't.

Regards,

Mr.Cube
 

Re: serial communication

if u find answers pls mail me i want to know that info.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top