Understanding Signals-asynch. question

nqnq Posts: 1
edited 2004-08-01 - 03:03:54 in Learn with BlocklyProp
Hello!smile.gif I am super-new to the microcontroller world and surrounding areas...right now I am going through the Understanding Signals 'class' and am wondering...

Within asynchronous serial communication what are some useful applications for both inverted and·non-inverted data, is one used more often than the other and if so,·why? *ducks*



  • BeanBean Posts: 8,070
    edited 2004-07-30 - 18:33:36
    Inverted data is "standard" RS232 (+12Volts,-12Volts) and normally used to talk to devices (printers, ect).
    Non-inverted data is usually (0volts,+5volts) and normally used for one microcontroller to talk to another microcontroller.

  • Tracy AllenTracy Allen Posts: 6,417
    edited 2004-08-01 - 03:03:54
    The standards for asychronous communications go way back in the history of electronics, to days when people were tapping out messages on telegraph lines. So it is no wonder that there are many strange conventions and terminology that you will come across. For example, you may see "mark" and "space". That comes from the telegraph, when the pen was down making a mark on the paper (which was most of the time, the default resting state), until someone at the other end pressed the key, and that would activate a solenoid and lift the pen off the paper and leave a space. The telegraph operator would look at the tape and decode the marks and spaces into a message for the waiting customer. Today the resting default level on the asychronous line is still called mark, and it is still usually the low level of voltage, and space is the high level, for example, (-12 volts mark & +12 volts space), or (-5 volts mark & +5 volts space), or (0 volts mark & 5 volts space). The mark state is logical 1 and the space state is a logical 0. That is, if you want to transmit a 0, you raise the voltage from its low level up to its high level. Inverted, right?

    Most microcontrollers use non-inverted logic, and a high level (5 volts) corresponds to logical 1 and a low level (0 volts) is logical 0. To interface that to a standard asychronous line, it has to be inverted, so +5 volts input becomes -12 volts, or -5 volts, or 0 volts output. That is done by interface chips like the circuit on p16 on the BASIC Stamp, or external circuits like the MAX232 driver chip that both inverts and increases the voltage levels.

    Some standards, like RS485 transmit both an inverted and a non-inverted signal at the same time over a pair of wires, a differential mode that is more immune to noise interference and ground loops.

    There are a lot of options, and you just have to read carefully and ask questions and be able to use a meter to check what is going on. If you are designing your own system to have two stamps talk to one another, you can do whatever you want to make it work. On the other hand, if you need to send and receive messages to a PC that is located out on a factory floor where they are testing van de graaf generators, you will need to follow lthe rules to be sure the signal is understood and uncorrupted on the other end.

    -- Tracy

    Tracy Allen
Sign In or Register to comment.