Discussion in "Embedded GSM Development" started by    abbas1707    Apr 29, 2007.
Wed Aug 01 2007, 06:04 pm
#21
but yar to say that thers sumthin wrong wid the cable mayb wrong...becuz logomanager and nokia phone connect nicely thru the cable..only whn i try the other way round thers some goofup...and the serial-monitor u gave is very good...I was using PORTMON(from Systernals...Microsoft site)....good s/w too..
Wed Aug 01 2007, 07:30 pm
#22
well.. yes.. its a good software.. and u get everything in so well mannered. Data sent received etc... so i think you must try using datacable instead of using some un-known FBUS cable...
what do u say?
 abicash like this.
Thu Aug 02 2007, 01:27 pm
#23
hey ther again..thx for being wid me on this :-)
Now I m having a new prblm :mad
I have 2 pieces of code.First one(for test purpose) transmits a char c=c+1; on hyperterm in a cont loop.whn i burn it on my micro and connect it to serial port and hyperterm,it runs fine with chars abc...etcshowing on hperterm @2400 bauds
but whn i replace the statemnt by c='U'; hyperterm wont show anything.
am i doin anythin wrong?
Thu Aug 02 2007, 01:36 pm
#24
heres the code in keil

#include <REG52.H>

#include <stdio.h>

#define SER_INT 4

unsigned char c,xmt_flag ;
void main (void) {

/*------------------------------------------------
Setup the serial port for 2400 baud at 11.0592MHz.
------------------------------------------------*/
SCON = 0x42; /* SCON: mode 1, 8-bit UART, enable rcvr */
TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */

TH1 = 243; /* TH1: reload value for 2400 baud 11.0592MHz */
ES =1;
TR1 = 1; /* TR1: timer 1 run */
TI = 1; /* TI: set TI to send first char of UART */
EA=1;



while (1)
{
c=c+1; //it will keep printing ascii's in ascending order
{
xmt_flag=0;
SBUF=c;
while(xmt_flag==0);
}
}
}
void x1(void) interrupt SER_INT
{
if(TI==1)
{
TI=0;
xmt_flag=1;
}
}
//in above pgm if i replace the statement c=c+1; by c='U'; the hyperterm wont show anything


[ Edited Thu Aug 02 2007, 01:42 pm ]
Thu Aug 02 2007, 03:41 pm
#25
well just a small mistake the reload value is 244 not 243
Thu Aug 02 2007, 04:39 pm
#26
yes ajay..i hv figured that out around 1 hour ago :blush ....but gr8 that u solved it...i had caculated the values before loading,but practically they wer sumthin else and had to do a bit of trial n error(i was goin for either lesser values so as to make it slower) before it showd up on my hyperterm..jus wantd to knw how u figured out it was 244?did u try on h/w?
but now my bigger pgm of sending 'U' 128 times etc and waiting for fone to send back etc is runnnig fine on hyperterm.
I m about to connct fone now...and as u suggested,i am cutting off the electronics wala part from tht cable and putting my plain DB9 conn,so its just a plain data cable now
Thu Aug 02 2007, 06:25 pm
#27
hey.... and FBUS works on 115.2Kbps 2400bps wont work
you have to change that too he he..
and i did not understand what electronics wala part you cut out..
it will be better if you connect using a datacable and use two extra pins of MAX232 to control the DTR, RTS signals..
Fri Aug 03 2007, 12:21 pm
#28
hey :-)
my FBUS cable which I got from a local shop here connects to the nokia 3310 below the battery(since that fone does not hv a std connection anywhr )
The other side,which connects to PC RS232(thru DB9) houses some elctronics,which whn i dismantled,had some diodes connctd to DTR n RTS,which work as rectifiers converting the +dc and -dc v/gs on both pins.This dc v/g i.e.+3V is to power up the buffers and/or max232 ON THE CONNECTOR(not on my board).
Now this phone side connector(which is quite unik) has 4 pins.which r MBUS,Tx,Rx,GND.of which MBUS is disabled.and Tx is shorted to gnd.
Now wat i m planning to do is:remove the PC side electronics wala DB9 and put a plain conn instead,using Tx,Rx,GND..to respective pins on fone side.
Now coming to ur post "it will be better if you connect using a datacable and use two extra pins of MAX232 to control the DTR, RTS signals."
what do u mean by this?...since I m not using DTR RTS,y do i cntl these?
the MAX232 on my board now is just to monitor the hyperterm/serial monitor..and the micro communication!
I m connectin the micro Tx thru a v/g divider(to convert 5v to 3v) to Rx on fone.While Tx on fone connects direct to Rx on micro thru a currnt limiting R.
and since I dont knw much bout 115kbps,i m searching..mayb u will help...
phewwwwww....lonnnnggggg post
Fri Aug 03 2007, 02:01 pm
#29
man i figured that out...using timer2 i got comm on hperterminal..i m not able to receive any chars...lets see!

but with 52 its possible to receive 115kbauds na?(i m defining i/p buffer len as 50)
Fri Aug 03 2007, 03:49 pm
#30
long but a nice post..
with 89C52 you can get 115.2Kbps baud rate you need these values to setup..
RCLK = 1;
TCLK = 1;
RCAP2H = 255;
RCAP2L = 253;

after loading these values the serial communication will be done using Timer 2 at a baud of 115200 bps.

ok regarding what i said in my previous post.. i just wanted u to use a datacable instead of just some cable. anyways as you have decided now.. to connect to TX and RX directly... so i want to recommend you one thing.. its better to use a 3V zener diode across the circuit when converting from 5 to 3V. that will ensure the phone will not burn

as now you know how to get 115200 bps you must program your controller to talk to your phone at this speed so FBUS communication can be possible... because...

FBUS runs at 115.2Kbps

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am