free 8051 Microcontroller Projects AVR PIC Microcontroller Projects Tutorials Ebooks Libraries, interfacing tutorials, lcd tutorial, stepper motor, dc motor 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems

 
8051 microcontroller 8051 microcontroller
Forums

Go to page  1 2 [3] 4 ... 12 13 14
Moderators: Ajay, Junied , abbas1707, Arun Kumar V, pdi33, Shailesh NAYAK, ۞ TPS ۞, shyam, sashijoseph
Author Post
abicash
Wed Aug 01 2007, 05:34AM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
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..



I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


Ajay
Wed Aug 01 2007, 07:00AM
Rickey's World Admin

 User Online

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4048
Thanked 753 times in 712 posts
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?

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top



This post has been thanked 1 time
 abicash 
abicash
Thu Aug 02 2007, 12:57AM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
hey ther again..thx for being wid me on this
Now I m having a new prblm
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?

I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


abicash
Thu Aug 02 2007, 01:06AM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
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:12AM ]

I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


Ajay
Thu Aug 02 2007, 03:11AM
Rickey's World Admin

 User Online

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4048
Thanked 753 times in 712 posts
well just a small mistake the reload value is 244 not 243

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


abicash
Thu Aug 02 2007, 04:09AM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
yes ajay..i hv figured that out around 1 hour ago ....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

I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


Ajay
Thu Aug 02 2007, 05:55AM
Rickey's World Admin

 User Online

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4048
Thanked 753 times in 712 posts
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..

www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


abicash
Thu Aug 02 2007, 11:51PM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
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

I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


abicash
Fri Aug 03 2007, 01:31AM
 User Offline
Registered Member #1551
Joined: Fri Jun 15 2007, 12:06AM

Posts: 49
Thanked 3 times in 3 posts
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)

I am Superman!!...sshhh....dont spread it!
www.ucdevelopers.page.tl
Back to top


Ajay
Fri Aug 03 2007, 03:19AM
Rickey's World Admin

 User Online

Registered Member #1
Joined: Fri Feb 24 2006, 04:56AM

Posts: 4048
Thanked 753 times in 712 posts
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


www.rickeyworld.info
If you feel satisfied with the user's forum reply please click on the thank button.

Obey forum rules!
Respect others!
Back to top


Go to page  1 2 [3] 4 ... 12 13 14  

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System

8051 Microcontroller Projects 8051 AVR tutorials PIC microcontroller, 8051 assembly language programming electronics and communication ECE CSE pdf ebooks library BE final year project ideas Embedded systems