| myturf |
Posted: Tue May 09, 2006 7:01 am Post subject: User Microcontroller to Control Mobile phone |
|
You will use serial port, configured to match parameters with mobile phone.
Usually, it will be setup for MODE-1, 9600bps.
In example, given code will setup serial interface to use Timer1 for
generating baud rate of 9600bps with 11.0952MHz XTAL:
PCON&=0x7f; // clearing SMOD=0
TH1=243; //0xFD;
SCON=0x50; //01010000B // SCON: mode 1, 8-bit UART,
enable rcvr //
TMOD &= 0X0F; // clear Timer 1 //
TMOD|=0x20; // TMOD: timer 1, mode 2, 8-bit reload //
TR1=1; // TR1: timer 1 run //
TI=1;
RI=0;
after that, you could send AT commands to your mobile phone. Example, for
making calls:
printf("ATD_number-to-call_;%c%c",13,10); |
|