Saturday, September 15, 2007

Asynchronous -The Past- Week2 DataCommunications

Every computer was made asynchronous, but all the computers in Canada has been modified to send data with synchronization involved, asynchronous transmission is characterized, its most essential feature it sends data at one byte, one character at a time, each character is a separate transmission event,
How does a compute/transmit?
you can write your own commands, what’s an interrupt, do something and pass control to the Central Processing Unit, there are a lot of interrupts….sending a character to one machine to the next,
01000010A
01000001B
Lets say we want to send the B to Belgium what you do you do, have software, INT14 it does one thing it stops the CPU looks at a specific address in the computer memory it will take the data and send it to a special chip on you mother board, every mother board has one of theses a UART, take your computer apart u will find one of these, Universal Asynchronous Receiver Transmitter, every mother board has one, weather you have one, sadly you don’t use ur UART, it does three incredible things, it moves in parallel bus, but you cant send data 8 bits at the same time, because to send 8 bits at the same time you would need 8 leads in it and you don’t find it, theirs essentially two, one for sending and one for receiving, you got to send data 1 bit at a time, in a serial manner, when you send stuff to ur printer you send it parallel, the UART takes ur data and sends it through the serial port, 1 INT and all it send was 1 Char, a million char it’s a million INT, imagine that you want to send a huge file to your buddy the CPU gets interrupted every time, you cant just send eight bits out of your serial port the UART has to prepare each character, it prepare 8 bits, how does it do that?
Here are our 8 bits B 01000010, its ready to get sent out but first, the UART put some extra info in the a start bit and a stop bit , it will add something called a parity bit, the start bit can be zero or one,
The start bit is always 0’s
Why is that?
Back in the day when ur grand-mama was taking datacom their was a teletype device, some one can type to one typewriter and go to the other one down the line, if no one was sending data, the type writer would send a constant stream of 1 bits, this tradition exist today for the 70% of people using modems, two modems are not sending data but a constant stream of 1 bits, imagine constant stream of 1 bits then it gets a 0, it sees the char coming it reads the whole character and at the end it discovers a stop bit, which is a 1, which faithfully it puts the line in an idle condition waiting for the next character to arrive, UART puts a start bit and end bit, and the parity bit, the parity bit is an error checking mechanism, in the old days, when you were settings up your Operating Software, you set it up odd or even parity, what does this mean ODD parity, odd parity means the number of 1 bits in the character has to be odd, lets look at the B
0100010 we want to send it somewhere the ur is going to put the party bit which would be a 1
101000010
Because the number between the start and stop has to be a number, it’s a even number it will use the parity bit to be odd, imagine a bit error has happened, and a character has changed, it arrives at the destination and it starts to count the 1 bits, and it counts 4 and four is not an odd number, so theirs an error, this is prob the most dangerous idea someone has had, what if the bolt of lighting hit it and it changed two characters and it found the odd the number so its correct, but its NOT correct, still this is efficient enough to work ,

Why do 70% of the world do this? Cause its cheap, cause its virtually free. Telephones network exist to send asynchronous data. The reason it works asynchronous is dealing with 8 bits at a time…

A UART gets a 0 it will sample the first bit then it will sample the remain ding bit, and it will tell if its off, if it had a constant string sooner or later it will tell it cant tell the difference between a zero or a one, it only has to sample the voltage level 8 times, it can still tell a 1 from a 0, then comes the 1 bit and re-idles the start position, every char interrupts the CPU, sends the data, same with receiving, INT14 sends the char to computer memory if you send a million byes you are sending a million int, each int with a start bit and parity, asynchronous is identified sending one character at a time, cheap easy, bad slow and error prone so error prone, Christianson, though parity bit checking is the pits, he will write a computer program that will improve the bits, X-MODEM just a program first of the great Asynchronous protocols, it transmits asynchronous data, with an improvement, its very simple,
How is this!?
Lets say you have a file, foo.txt. and you want to send it to your buddy, all you do is run x-modem, call your body, buddy stats x-modem, as soon as they know they are both running it will see each char and store it in memory in fact x-modem reads in 128 char and stores them in memory then it does parity checking
01000010
01000001
10111100 <-- parity bite, a BLOCK CHECK CHARACTER, then x modem starts sending 128 characters, then it sends an x char locks and checks char, x character running on the other machine will save it and when it receives 129 it will block check carrier, it compares by doings its own block character check, if its both the same and 90% guaranteed, so this has improved error checking, if their different x-char will send a char to the other machine asking for a re-transmission, how does it do it sends a NACK, negative acknowledgement, special 8 bit code means their has been a error, if there is no errors the machine sends an ACK, acknowledgement char, when you log into the cisco routers through the console char, HYPER TERMINAL is crappy or x-modem, x-modem, y-modem, z-modem, file transfer protocols, the original intent was improving error detections, we evolved to file transfer programs. That’s it for asynchronous.  This is Test 1,

No comments: