1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

hyperterminal communication w/ 8051

Discussion in '8051/8951' started by spyghost, May 10, 2004.

  1. spyghost

    spyghost New Member

    Joined:
    Apr 8, 2004
    Messages:
    69
    Likes:
    0
    hi,

    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?
     
  2. motion

    motion New Member

    Joined:
    Jul 14, 2003
    Messages:
    560
    Likes:
    0
    Location:
    Quezon City.PH
    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.

    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.

    Select "NONE" for flow control and RX/TX would be enough.
     
  3. spyghost

    spyghost New Member

    Joined:
    Apr 8, 2004
    Messages:
    69
    Likes:
    0
    ok... further quetions, if you won't mind... :oops:

    -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:
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. bmcculla

    bmcculla New Member

    Joined:
    Sep 5, 2003
    Messages:
    898
    Likes:
    0
    Location:
    California, USA

    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.

    Brent
     
  6. motion

    motion New Member

    Joined:
    Jul 14, 2003
    Messages:
    560
    Likes:
    0
    Location:
    Quezon City.PH
    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.

    Yes, any terminal program normally sends out characters as they are typed.

    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.
     
  7. spyghost

    spyghost New Member

    Joined:
    Apr 8, 2004
    Messages:
    69
    Likes:
    0
    another question.... :oops:

    how does hyperterm send the characters? decimal or hex?

    what are the other terminal softwares for windows xp?
     
  8. StupidDum

    StupidDum New Member

    Joined:
    Nov 3, 2003
    Messages:
    242
    Likes:
    0
    Location:
    Malaysia
    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'.
     
  9. vls0086

    vls0086 New Member

    Joined:
    Mar 21, 2008
    Messages:
    1
    Likes:
    0
    hyper terminal

    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

    Plzzzzzz reply me as soon as possible
     
  10. ashoush78

    ashoush78 New Member

    Joined:
    May 22, 2008
    Messages:
    1
    Likes:
    0
    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
     

Share This Page