i wanted to control something through 8051 by interfacing it to my pc through hyperterminal. a simple diagram is shown:
PC(hyperterminal) <----> 8051 <----> [something to be controlled]
actually what i am after is the interface between PC & 8051. the interface to the something to be controlled is not a problem since it would vary on the application
here are some of my thoughts:
- i will use 8051 serial port since it is interfaced w/ pc serial
- i will only use 2 lines, tx & rx
from these thoughts, these questions rose:
- is it possible not to use AT commands?
- as a support to the previous question, can i develop my own commands such that what i can see in the hyperterminal window is a prompt that waits for a command?
- are the tx/rx lines from the serial port enough for the operation previously described? or do i still need to use the other control lines of the pc serial port?
Sure. The AT commands are only needed if you're connecting to a modem.
Launch a hyperterminal. In setting up a new connection, select the desired COM port, baud rate, ...., and "none" for flow control.
- as a support to the previous question, can i develop my own commands such that what i can see in the hyperterminal window is a prompt that waits for a command?
Done that on a PIC. The PIC sends out a "carriage return" and "line feed" code plus the command prompt and waits for your command. However, the limited memory of a microcontroller limits how long the command line is.
A simple command to control an output port would look like "O5A" for example. The microcontroller would parse the command and output the value of "5A" to the port. You should have the controller echo the characters as they are received back to the PC.
- are the tx/rx lines from the serial port enough for the operation previously described? or do i still need to use the other control lines of the pc serial port?
-how would proper synchronization go about? are equal baud rates enough for proper synchronization?
-please correct me if i am wrong... hyperterminal simply sends out the character once it has been type on the screen right? i mean it does not wait for the <enter> key to be pressed for the characters to be sent... right?
- how would character translation go about in hyperterm? what i mean is if i send data to my pc, how would hyperterm interpret it such that this will be displayed (including the carriage return):
stating it in a clearer form, how would i be able to display the letter "W" in hyperterm? does it use ascii, or something else?
if there are additional information/url/books/downloadable files, i would gladly appreciate it... (i hope its not too much) i am just interested in doing this during spare time :roll: in other words its just something to play with and at the same time learn :roll:
Hyper terminal does use ascii. You just send the ascii codes for all the letter you want. For the cariage return you need to send the carriage return character and the line feed character.
Try just having the 8051 echo the characters you type in hyper terminal; the contrroller just sends back the same character that it receives. This is a good way to get you r communication up and running before you do anything more complicated. www.8052.com probably has some examples for this sort of stuff.
Yes, to send and receive correctly, both ends should have the same baud rate, number of bits, and parity bit type.
example: "9600, 8N1" means 9600baud, 8 data bits + 1 stop bit, no parity bit.
-please correct me if i am wrong... hyperterminal simply sends out the character once it has been type on the screen right? i mean it does not wait for the <enter> key to be pressed for the characters to be sent... right?
Yes, any terminal program normally sends out characters as they are typed.
- how would character translation go about in hyperterm? what i mean is if i send data to my pc, how would hyperterm interpret it such that this will be displayed (including the carriage return):
If it is encoded in ASCII, hyperterminal would know what to do with it. That is the purpose of ASCII or american standard code for information interchange, a common code that all computers can understand.
Software people usually refer decimal, hex as different thing. However, from the view of hardware, they are all the same. The data are transfered in the form of 'bits'. Decimal, hex, or ascii, is only the way we interprete the raw data. For example, the register store valu of 0100 0001.
You could say it is 65, or 0x41, or a character 'A'.
Software people usually refer decimal, hex as different thing. However, from the view of hardware, they are all the same. The data are transfered in the form of 'bits'. Decimal, hex, or ascii, is only the way we interprete the raw data. For example, the register store valu of 0100 0001.
You could say it is 65, or 0x41, or a character 'A'.
hello i actually need to log the data at the hyper terminal but the data at hyper terminal is shon in hexa but i need it in desimal system can this be possible if yes tell me how to do that
and also tell me it the data at the hyper terminal and the data at the serial port are same
pleas helpe me know how to interface quadrature encoder to 8051 microcontroller and how to over com the noise that affect the perfomance of the encoder