2012年11月26日星期一

Basic Input & Output Interface

After learning a lot about the structure and the function of pins in 8088, we begin to learn how it interface with other input and output. I feel 8088 is like a commander and he controls those sub-devices and coordinates them together to achive the goal.

As for a whole and brief look, the professor shows us the graph below, which describes how 8088 interface with peripheral devices and memory part.


But to write our own program to control it , we have to take a step further and learn more detailed knowledge about every part as well as the connection between them.

Input-output involves the transfer to (or from) peripheral devices from (or to) the data bus of the cpu; eg. data transfer to the CRT display, from the keyboard, to/from a hard-disk drive, to/from a modem to another computer system.

Input-output operations fall into one of the following types:

Programmed I/O - cpu polls peripherals to check if I/O is needed
Interrupt I/O - peripheral sends an interrupt request to cpu for I/O
Direct memory access (DMA) - peripheral writes directly to memory

The more detailed connection among each part is shown as below:

We can see from the graph  data Transfer between the I/O interface and the peripheral ca  involve either parallel or serial data transmission, depending on the peripheral and the actual implementation of the I/O interface.

Parallel data transfer involves using at least 8 separate lines for the 8 data bits in a byte. Normally, other lines are needed for the communications protocol (eg. STB [data strobe] line to indicate when data is valid, ACK line to acknowledge data has been read).

Serial data transfer involves sending the data on a single line, bitby bit. The I/O interface converts the data from parallel to serial or vice-versa using shift registers.

And there are 2 modes as for control the interface:

(1) Synchronous - data are sent in blocks, with start and end-of-block
markers. Individual characters within a block do not need start and stop
bits since the receiver identifies every 8 bits as one character, eg.

(2) Asynchronous - no block synchronization bits. Each character is identified by the start and stop bit(s) (stop bits can be 1, 1.5, 2 bits) inserted at the start and end of each character,eg.


It is really amazing that such a tiny chip can have so many functions, and we can even choose different modes to realize different goals. The graph below is a format for us to refer when we want to set different modes.


My own thinking about this course
As this course has ended in last week, I feel even though I still know little about the function and control of microprocessor, at least I have had a concept of it and known some basic operations.I still believe the best way to learn is to try it yourself. And the corresponding lab session gives us such a good chance.Making it out is really much much more difficult than knowing about it.That's why I spend a lot of time in lab session and I still find it hard.

Apart from the knowledge and experience I get, I begin to know the importance of cooperation and teamwork. Cooperation is important because without agreement and coordination we cannot accomplish what we need to do. Everyone must make sacrifices for the better if needed. To organize important ideas and events, cooperation must be obtained between groups of people to insure the job is done right and well.




2012年11月5日星期一

Data & Address Control in 8088

These weeks, we have learned more detailed knowledge about microprocessor. We focus on how the microprocessors control address and data and how these different microprocessors work together and achieve some purposes.


Actually, we use 8088--the most widely used microprocessor as an example to learn in detail.

The following graph is the picture of 8088 Fully Buffered Buses. We can see it can work in 2 different modes--Minimum mode and Maximum mode(as in the following picture, it works in minimum mode).Some buses are address buses and some are data buses and some are even can be used as both address and data buses, using multiplexing method.Information is transferred in both directions on the data bus - hence the data bus buffer must be bidirectional. A bidirectional buffer has a “direction”, which is controlled by (DIR) input.


We also learned the Basic 8086 System Timing(8086 is similar to 8088). Now, I can understand clearly how different pins work together and activate each other one by one in sequence by referring to the following diagram.

One special thing and difficult part to learn is about READY pin and WAITING. At first, I can't get the point and didn't know why it is needed and how it works. However, after reviewing the notes again and again and discussing with classmates and professor, I begin to get it and find it a really important and innovative design! The creative designer considered the situation that the access time for a memory device is longer than the memory
access time calculated,then we need to give extra clock periods, wait state
Tw, for memory, to guarantee the microprocessor works well. 
And we also see a macro-scope picture about how different microprocessors connect with each others and work together to achieve some purpose. We should not only know how a single microprocessor works, we also need to know the relationship between different microprocessors. Only in that way can we learn it well and use them properly and design our own system. 


Anyway, I feel this course is getting more and more difficult, but more and more interesting as well. There are a lot of scattered and seemingly unrelated knowledge that need to be learned and remembered. But what is more important, we have to be clear about those tedious information and put them in order and find out their relationship and regard it as a whole system. We have to build our own map about those pieces of knowledge. That like: knowledge is like pieces of bricks, what we should do is not only collect them, but using them to build our own houses!


Actually, my partner and I are trying to do a mini-project using the knowledge we have learned. We hope to make a smart car model which can follow the route automatically and even response to the change of the environment and give some information and tips about it. We have written down out proposal and drew the graph, and it is expected to be finished by the end of November.

This our design:
I hope we can make it out and make it even better than we expected!
We will try our best!