EmbeddedRelated.com
Forums

Unable to communicate through serial port

Started by Dibyendu July 10, 2007
On Jul 11, 2:15 am, "TT_Man" <Some...@ntlworld.com> wrote:
> "> The code for the board: > > > > > ;----------------------------------------------------------------------------------------------------------------------------------------- > > org 0 > > mov TMOD, #20H ;timer 1, mode 2 > > mov TH1, #-3 ;9600 boud rate > > mov SCON, #50H ;8-bit, 1 stop bin, REN enabled > > setb TR1 ;start timer 1 > > > again: mov SBUF, #"X" ;letter "X" to be transferred > > > here: jnb TI, here ;wait for the last bit > > clr TI ;clear TI for next char > > sjmp again ; keep sending "X" > > ret > > end > > Where is EI ? enable interrupts...timer won't run....
Hi, I am trying to follow the books of Mazidi, to build this board and code also. At the first glance I has not find the use of EI. I think I have to read more (In depth also). keep in touch. thanks.
On Jul 10, 7:49 pm, cs_post...@hotmail.com wrote:
> On Jul 10, 7:55 am, martin griffith <mart_in_medina@ya___.es> wrote: > > > I would start off by using a terminal program on the PC, say > > terraterm, so that would rule out a problem on the PC side, and it > > would prove the cable is wired correctly > > Yes. And hold something shorting pins 2&3 of the PC cable (transmit > looped back to receive) to verify that when you short them, anything > you type is now displayed, or is being displayed twice if it was > already being displayed once with the pins unshorted. > > Also, if using hyperterminal make sure you set flow control to none.
This is very good idea I am trying it by today evening. thank you
On Jul 10, 8:42 pm, Mark Borgerson <mborger...@comcast.net> wrote:
> In article <1184069731.211909.174...@i13g2000prf.googlegroups.com>, > dib....@gmail.com says... > > > > > Hi, > > > I am new on this field, and taking this as hobby, but the real fact > > is, I can't communicate my 8051 microcontroller board to my PC via > > serial port. can any body help me for that issue?? > > > Specification of my board: > > > 8051 microcontroller: AT89C52 24pc. > > Cristal Oscillator: 11.0592 Mhz. > > Compiler: Keil. > > > The code for the board: > > > ;----------------------------------------------------------------------------------------------------------------------------------------- > > org 0 > > mov TMOD, #20H ;timer 1, mode 2 > > mov TH1, #-3 ;9600 boud rate > > mov SCON, #50H ;8-bit, 1 stop bin, REN enabled > > setb TR1 ;start timer 1 > > > again: mov SBUF, #"X" ;letter "X" to be transferred > > > here: jnb TI, here ;wait for the last bit > > clr TI ;clear TI for next char > > sjmp again ; keep sending "X" > > ret > > end > > You haven't specified whether your board includes an RS-232 driver. If > it does, does it require you to set or clear an enable pin for the > driver? > > I would also program a nice long (perhaps 100 millisecond ) delay loop > between character sends. That will make it much easier to > track down the problems with an oscilloscope. > > Mark Borgerson
I am using MAX 232 chip with 22uF electrolyte capacitor, as it described on the 8051 Books of Mazidi and max 232 data sheets. Waiting for your response.
On Jul 10, 6:49 pm, "mc" <l...@www.ai.uga.edu.for.address> wrote:
> What operating system on the PC? What you describe is the DOS way of doing > it. Under Windows, the ports are controlled by Windows drivers.
Windows XP is my operating system. is it the main problem?? I had tried by hyperterminal program first but failed too. thanks
"TT_Man" <Someone@ntlworld.com> wrote in message
news:yFSki.27136$3j1.19827@newsfe6-gui.ntli.net...
> Where is EI ? enable interrupts...timer won't run....
Of course it will run. It just doesn't produce interrupts... Meindert
On Tue, 10 Jul 2007 10:00:13 -0700, cs_posting@hotmail.com wrote:

>On Jul 10, 10:23 am, Grant Edwards <gra...@visi.com> wrote: >> On 2007-07-10, cs_post...@hotmail.com <cs_post...@hotmail.com> wrote: >> >> > Also, if using hyperterminal make sure you set flow control to none. >> >> Also, if using hyperterminal... don't. Use something reliable >> like teraterm. ;) > >Yeah, but when a tool is so widely distributed, even if it's a very >bad tool, it's worth knowing how to make it perform, because the day >will come when you run into a situation where your preferred tool >isn't available - co-worker's machine, customer on the phone, locked- >down computer, won't let your laptop into the building, whatever. >
I rarely use hyperterm in dev environment but I couldn't count the number of times its saved my arse in the field.. :)
On Tue, 10 Jul 2007 23:07:00 -0700, Dibyendu <dib.mon@gmail.com>
wrote:

>On Jul 10, 6:49 pm, "mc" <l...@www.ai.uga.edu.for.address> wrote: >> What operating system on the PC? What you describe is the DOS way of doing >> it. Under Windows, the ports are controlled by Windows drivers. > >Windows XP is my operating system. is it the main problem?? I had >tried by hyperterminal program first but failed too. >thanks
Find out which end is failing first. Use a loopback on your PC (pin 2 connected to pin 3) and make sure PC is working. Once that is verified you know where to look.
On Jul 10, 10:00 pm, cs_post...@hotmail.com wrote:
> On Jul 10, 10:23 am, Grant Edwards <gra...@visi.com> wrote: > > > On 2007-07-10, cs_post...@hotmail.com <cs_post...@hotmail.com> wrote: > > > > Also, if using hyperterminal make sure you set flow control to none. > > > Also, if using hyperterminal... don't. Use something reliable > > like teraterm. ;) > > Yeah, but when a tool is so widely distributed, even if it's a very > bad tool, it's worth knowing how to make it perform, because the day > will come when you run into a situation where your preferred tool > isn't available - co-worker's machine, customer on the phone, locked- > down computer, won't let your laptop into the building, whatever.
I am fabricate the board for myself.
cs_posting@hotmail.com wrote:
> On Jul 10, 10:23 am, Grant Edwards <gra...@visi.com> wrote: >> On 2007-07-10, cs_post...@hotmail.com <cs_post...@hotmail.com> wrote: >> >>> Also, if using hyperterminal make sure you set flow control to none. >> Also, if using hyperterminal... don't. Use something reliable >> like teraterm. ;) > > Yeah, but when a tool is so widely distributed, even if it's a very > bad tool, it's worth knowing how to make it perform, because the day > will come when you run into a situation where your preferred tool > isn't available - co-worker's machine, customer on the phone, locked- > down computer, won't let your laptop into the building, whatever. >
There are also times when you might have to use a cigarette lighter as a soldering iron. It might be better than nothing, but it's not exactly the tool of choice! So the recommendation is to drop hyperterminal if you possibly can, and use something simple and decent like Tera Term. Hyperterminal *may* work, but why add more uncertainty to your problems?
On Jul 11, 10:47 am, David Brown <d...@westcontrol.removethisbit.com>
wrote:

> There are also times when you might have to use a cigarette lighter as a > soldering iron. It might be better than nothing, but it's not exactly > the tool of choice!
To compare the usability of hyperterminal to the utility of a cigarette lighter as a soldering iron is rediculous. Compare it to some $4 soldering iron from radio shack. Not great, but easy to get a hold of and usually practical... even for SMD if you are really really careful.