Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 15th October 2007, 01:17 AM   #1
Question New to serial communication, Hyperterminal?

I am learning about interfacing the 8051 with my laptop.

I have a few questions, and as helpful as you all have always been, I hope you will kindly contribute in clarifying the matters for me.

Just reading up on what Hyperterminal is and what is does. I've managed to open up the blank text window where you can type.

Three questions I have at the moment:

1) Whatever I type there, is it sent serially through the TxD pin of my serial port? So if I type letter 'A', the ASCI binary equavalent will be sent serially with start and stop bits?

2) What if my uC sent the letter 'B' to the RxD pin of the serial port. Would the letter 'B' come up on the screen?

3) So its not about a special language on Hyperterminal, it is merely to display what is received, and display what is sent?

3) But who controlls the DTR, DSR, CTS and RTS pin of the serial port?

If any one knows any links to good beginners tutorials on this, please kindly pass it over.

Many thanks.

Last edited by AceOfHearts; 15th October 2007 at 02:09 AM.
AceOfHearts is offline  
Old 15th October 2007, 02:04 AM   #2
Default

1) Whatever I type there, is it sent serially through the TxD pin of my serial port? So if I type letter 'A', the ASCI binary equavalent will sent serially with start and stop bits?

Yes

2) What if my uC sent the letter 'B' to the RxD pin of the serial port. Would the letter 'B' come up on the screen?

Yes

3) So its not about a special language on Hyperterminal, it is merely to display what is received, and display what is sent?

Correct

3) But who controlls the DTR, DSR, CTS and RTS pin of the serial port?

Hyperterm has properties to set up for utilizing or not utilizing control pins. Hyperterm will act as the DTE end so it will output (if configured to use) the DTR and RTS pins and input the DSR and CTS pins.

If any one knows any links to good beginners tutorials on this, please kindly pass it over.

Google on RS232 tutorials will supply more then enough information such as:

http://www.camiresearch.com/Data_Com..._standard.html

Many people Don't care much for Hyperterminal, but is does come free with most windows installations. I use a free serial program called Terminal v1.9b by bray, but can't locate a active download site at the moment. There are tons of free serial terminal programs avalible on the web.

Lefty
__________________
Measurement changes behavior
Leftyretro is offline  
Old 15th October 2007, 02:08 AM   #3
Thumbs up

Quote:
Originally Posted by Leftyretro
1) Whatever I type there, is it sent serially through the TxD pin of my serial port? So if I type letter 'A', the ASCI binary equavalent will sent serially with start and stop bits?

Yes

2) What if my uC sent the letter 'B' to the RxD pin of the serial port. Would the letter 'B' come up on the screen?

Yes

3) So its not about a special language on Hyperterminal, it is merely to display what is received, and display what is sent?

Correct

3) But who controlls the DTR, DSR, CTS and RTS pin of the serial port?

Hyperterm has properties to set up for utilizing or not utilizing control pins. Hyperterm will act as the DTE end so it will output (if configured to use) the DTR and RTS pins and input the DSR and CTS pins.

If any one knows any links to good beginners tutorials on this, please kindly pass it over.

Google on RS232 tutorials will supply more then enough information such as:

http://www.camiresearch.com/Data_Com..._standard.html

Many people Don't care much for Hyperterminal, but is does come free with most windows installations. I use a free serial program called Terminal v1.9b by bray, but can't locate a active download site at the moment. There are tons of free serial terminal programs avalible on the web.

Lefty
Many thanks for your contribution. I appreciate it very much. I will hopefully get something programmed into my 8051 tommorrow and check out if I can get anything communicating with my laptop tommorrow.

AceOfHearts is offline  
Old 15th October 2007, 02:09 AM   #4
Default

Quote:
Originally Posted by AceOfHearts
I am learning about interfacing the 8051 with my laptop.

I have a few questions, and as helpful as you all have always been, I hope you will kindly contribute in clarifying the matters for me.

Just reading up on what Hyperterminal is and what is does. I've managed to open up the blank text window where you can type.

Three questions I have at the moment:

1) Whatever I type there, is it sent serially through the TxD pin of my serial port? So if I type letter 'A', the ASCI binary equavalent will sent serially with start and stop bits?
Yes.
2) What if my uC sent the letter 'B' to the RxD pin of the serial port. Would the letter 'B' come up on the screen?
Yes.
3) So its not about a special language on Hyperterminal, it is merely to display what is received, and display what is sent?
Yes.
3) But who controlls the DTR, DSR, CTS and RTS pin of the serial port?
This depends, on the default setting the 8051 would be required to control them. Most people set flow control to None and just ignore these lines. If you really need flow control then the Xon/Xoff method is easier to implement.
If any one knows any links to good beginners tutorials on this, please kindly pass it over.

Many thanks.
Would you believe it, the above does not count as a message and so I had to type this to be able to post.

Mike.
Pommie is online now  
Old 15th October 2007, 02:09 AM   #5
Default

Well known location for communication protocals http://www.beyondlogic.org/

1. Yes, and No. Yes what ever is typed is sent out. But no on start and stop because user may choose to not use stop bits. As long as you send out each character slowly, each will be transmitted one at a time. There are configuration settings that govern how many characters to send you in a packet. Hyperterminal is just a basic interface. A comport driver allow you to do all sorts of configurations and conditions.

2. Yes. If you send 0x41, decimal 65, or A'B' given your uC supports the A(ascii) macro.

3. Mostly true. Most terminal programs support mutiple types of emulators. The emulator will alter the visual effect of text. Yet still, there is no code like C, basic, or java involved.


And I thought I was the first to respond. Seems as if I need to hit "Post Quick Reply" quicker.
donniedj is offline  
Old 15th October 2007, 02:12 AM   #6
Default

Quote:
Originally Posted by donniedj
Well known location for communication protocals http://www.beyondlogic.org/

1. Yes, and No. Yes what ever is typed is sent out. But no on start and stop because user may choose to not use stop bits. As long as you send out each character slowly, each will be transmitted one at a time. There are configuration settings that govern how many characters to send you in a packet. Hyperterminal is just a basic interface. A comport driver allow you to do all sorts of configurations and conditions.

2. Yes. If you send 0x41, decimal 65, or A'B' given your uC supports the A(ascii) macro.

3. Mostly true. Most terminal programs support mutiple types of emulators. The emulator will alter the visual effect of text. Yet still, there is no code like C, basic, or java involved.


And I thought I was the first to respond. Seems as if I need to hit "Post Quick Reply" quicker.
Ok thanks for that!

I am sure I will have more questions soon, just as soon as I get some hands on experience going!
AceOfHearts is offline  
Old 15th October 2007, 02:29 AM   #7
Default

Quote:
Originally Posted by donniedj
1. Yes, and No. Yes what ever is typed is sent out. But no on start and stop because user may choose to not use stop bits. As long as you send out each character slowly, each will be transmitted one at a time. There are configuration settings that govern how many characters to send you in a packet. Hyperterminal is just a basic interface. A comport driver allow you to do all sorts of configurations and conditions.
This is slightly wrong and could confuse people. In Hyperterminal the number of start bits is always one and the number of stop bits is at least one. Sending out character slowly effectively inserts more stop bits. In RS232 terms there is no such thing as a packet everything is just a byte (sometimes 9 bits). You as a programmer may choose to packetise your data but the hardware just sends bytes. Settings in things like MSComm control are PC specific and nothing to do with the RS232 protocol.

Mike.
Pommie is online now  
Old 15th October 2007, 03:04 AM   #8
Default

Quote:
Originally Posted by Pommie
This is slightly wrong and could confuse people. In Hyperterminal the number of start bits is always one and the number of stop bits is at least one. Sending out character slowly effectively inserts more stop bits. In RS232 terms there is no such thing as a packet everything is just a byte (sometimes 9 bits). You as a programmer may choose to packetise your data but the hardware just sends bytes. Settings in things like MSComm control are PC specific and nothing to do with the RS232 protocol.

Mike.
"Slightly wrong"

You sir are are a gentleman

Lefty
__________________
Measurement changes behavior
Leftyretro is offline  
Old 15th October 2007, 09:09 AM   #9
Default

Quote:
Originally Posted by Pommie
Would you believe it, the above does not count as a message and so I had to type this to be able to post.
Fairly obviously, you're not supposed to type your message inside a quote.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 15th October 2007, 03:12 PM   #10
Default

Quote:
Originally Posted by Nigel Goodwin
Fairly obviously, you're not supposed to type your message inside a quote.
Your right, it is fairly obvious . Next time I'll delete the quote tags.

Mike.
Pommie is online now  
Old 15th October 2007, 07:03 PM   #11
Thumbs up

OK,

I tried to send the letter A continuously from the uC and it worked .

But a little confused.

1) I did not have aything like a MAX232 in between. How did it still work? How did the serial port recognise +5 and 0V when according to the text book RS232 logic levels are completely differet?

2) I tried writing (inadvertantly) a letter to the uC and send it back to the laptop, without a MAX232 and it didnt work. I believe my uC did not recognise the voltage levels?

thanks.
AceOfHearts is offline  
Old 15th October 2007, 11:17 PM   #12
Default

Quote:
Originally Posted by AceOfHearts
OK,

I tried to send the letter A continuously from the uC and it worked .

But a little confused.

1) I did not have aything like a MAX232 in between. How did it still work? How did the serial port recognise +5 and 0V when according to the text book RS232 logic levels are completely differet?

2) I tried writing (inadvertantly) a letter to the uC and send it back to the laptop, without a MAX232 and it didnt work. I believe my uC did not recognise the voltage levels?
RS232 works fine at 0-5V, but you need to be aware that MAX232's etc. invert the signal, so if you're using just TTL levels you have to ensure the signal is the correct polarity. For PIC's this means you can't use the hardware UART, you have to use an inverted software one.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 16th October 2007, 01:13 AM   #13
Default

Quote:
Originally Posted by Nigel Goodwin
RS232 works fine at 0-5V, but you need to be aware that MAX232's etc. invert the signal, so if you're using just TTL levels you have to ensure the signal is the correct polarity. For PIC's this means you can't use the hardware UART, you have to use an inverted software one.
Unless you are using some of the newer pics that have the ability to use inverted signals. A very useful feature. See the 18F2550 data sheet for more details.

Mike.
Pommie is online now  
Old 16th October 2007, 01:21 AM   #14
Default

Thanks for the posts.

Quote:
Originally Posted by Nigel Goodwin
RS232 works fine at 0-5V, but you need to be aware that MAX232's etc. invert the signal, so if you're using just TTL levels you have to ensure the signal is the correct polarity. For PIC's this means you can't use the hardware UART, you have to use an inverted software one.

Sorry, being very new to Serial comms, I am kind of confused now.

Ok let me get this streight! I was able to send letter 'A's, which meant RS232 port CAN READ 0-5V as logic 0 and logic 1 respectively.

HOWEVER,

RS232 port outputs (according to my textbook) -3V to -25V as logic 1 and 3V to 25V as logic 0, which my uC (8051) wont understand.

So the reason why a Maxim chip is necessary is so that my uC can understand the signal from the serial port, and not for my laptop to understand my uC?.........

thanks.
AceOfHearts is offline  
Old 16th October 2007, 01:46 AM   #15
Default

You must be using a software UART that sends and receives inverted signals. I am guessing that the reason it only works from PC to 8051 is because the 8051s outputs cannot drive the line high enough to provide a signal to the PC. Have you got a fairly low pullup on the output of your 8051? I would guess something like 300Ω would be safe.

Mike.
Pommie is online now  
Reply

Tags
communication, hyperterminal, serial

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
serial communication in Atmel 89c51 Peter Nabil Micro Controllers 9 4th August 2008 01:18 PM
hyperterminal communication w/ 8051 spyghost 8051/8951 8 22nd May 2008 11:54 AM
Need help badly on Inchworm and MPLAB thushy Micro Controllers 14 11th March 2007 07:05 PM
serial communication between two pic with RF modules amindzo Micro Controllers 8 16th August 2006 04:59 PM
Serial communication problem tbrown Micro Controllers 12 13th February 2004 11:32 AM



All times are GMT. The time now is 03:09 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker