1 / 34

Lecture 3

Lecture 3. PC structure and embedded devices. Lecturer : Lyulicheva I .А. 1. Content. PC structure System devices Parallel and serial ports System timer Interrupt controllers. 2. Personal computer structure.

gaston
Download Presentation

Lecture 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture3 PC structure and embedded devices Lecturer: LyulichevaI.А. 1

  2. Content • PC structure • System devices • Parallel and serial ports • System timer • Interrupt controllers 2

  3. Personal computer structure • The heart of PC is System block. Other parts are Monitor, mouse, keyboard etc. • In notebooks all these parts are inside one body, but still are present The most important component of the system block is the system board or mother-board (MB), Also system block contains hard disc, CD-ROM-driver, card-reader, power-supply, maybe Wi-Fi-modem. Video-card, sound-card, LAN-adapter etc. may be standalone or embedded in motherboard. 3

  4. Memory of modern MPS Inside (MotherBoard) memory Registers of MP L1 cash L2 cash… etc. System RAM BIOS Outside memory: HDD CD/DVD Flash-memory FDD (old) or strimmers • Hierarhy of memory in modern PC is very complicated

  5. Personal computer structure System (mother) board components Various components are built in a modern system board, such as slots or sockets for processors, sockets for memory and additional device and chipsets. The advanced system boards contain following components: • Slot or socket for the main processor; • Chipset of system logic; • the Basic input-output system (BIOS); • Nests for the modules of system memory; • Sockets for system buses; • Low-voltage power-supply etc. 5

  6. PC Structure A progress in modification of system boards was connected with the development of new chipsets, new sockets for processors and the other parts. On the right figure - a view of the out-of-date PC-card. 6

  7. Progress in MB: • New types of System buses • Growing of capacity and occurrence of new types of memory sockets for the different RAM. • Improving of BIOS – system ROM 7

  8. Современный ПК с PCI-express

  9. First Components of system boards These all of the tools was made directly by firm Intel or on its license, except for a microcircuit CMOS with a clock, which was supplied a firm Motorola. In all on a pay to hundred, and place logical microcircuits took a place for placing of microcircuits, executing user facilities, on them did not remain. 9 9

  10. Structure of theMP system • So for MP system work several secondary devices are in need,which may be build in the to special chipset on MB or may be put in additional slots. Nonprogrammable LIS -Ladge integrated shemes (clock pulse generator, bus-control devices etc.) are not very difficult and we left them for your individual study. But we must study more deeply three programmable LIS - system timer, parlallel interface(PPI) and serial port.

  11. 8255 parallel port diagram

  12. 8255 parallel port diagram

  13. PPI lines

  14. PPI control word

  15. Example of PPI programming Initialization of PPI needs only 2 instructions Mov AL, 1001 0010b Out 83h, AL Then you may read from ports A (80h) and B (81h) or output data to port C (82h) as usual In AL, 80h Mov ES:[DI], AL

  16. 8253 timer block-diagram

  17. Control words of timer

  18. The example of the timer’s programming ;Example 1 lineup of one register(the labels of the timer-80h,81h,82h,83h) mov al,1eh; CT0,1 million of bytes, mode 3, code 2 out 83h,al; the delivery control ofbyteinto the port ofthe УС timer. mov al,5 ; the coefficient of division Kf=F1/F2=5 out 80h,al; recording Kfinto 0 register.

  19. Serial ports In computing, a serial port is a serial communication physical interface through which information transfers in or out one bit at a time (in contrast to a parallel port). A serial port is a general-purpose interface that can be used for almost any type of device, including modems, mice, and printers. While such interfaces as Ethernet, FireWire, SATA and USB all send data as a serial stream, the term "serial port" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device.

  20. Serial ports Modern computers without serial ports may require serial-to-USB converters to allow compatibility with RS 232 serial devices. Serial ports are still used in applications such as industrial automation systems, scientific instruments, shop till systems and some industrial and consumer products. Servers may use a serial port as a control console for diagnostics.

  21. Serial ports Data bits The number of data bits in each character can be 5 (for Baudot code), 6 (rarely used), 7 (for true ASCII), 8 (for any kind of data, as this matches the size of a byte), or 9. 8 data bits are almost universally used in newer applications. 5 or 7 bits generally only make sense with older equipment.

  22. Serial ports Parity check Parity is a method of detecting errors in transmission. When parity is used with a serial port, an extra data bit is sent with each data character, arranged so that the number of 1 bits in each character, including the parity bit, is always odd or always even. If a byte is received with the wrong number of 1s, then it must have been corrupted. However, an even number of errors can pass the parity check.

  23. Serial ports Stop bits Stop bits sent at the end of every character allow the receiving signal hardware to detect the end of a character and to resynchronise with the character stream. Flow control A serial port may use signals in the interface to pause and resume the transmission of data. For example, a slow printer might need to handshake with the serial port to indicate that data should be paused while the mechanism advances a line.

  24. 8251 serial port block-diagram

  25. The example of the setting of serial port ; Example2:theUART setting (label 9С – dataand9D -controlling) mov al,40h; programmedupset out 9Dh,al; mov al,0CFh; mode instruction: 2 stop-bits, out 9Dh,al ; no control,8 bits, fTxC/ 64 mov al,01h; command instruction out 9Dh,al; authorization of the reconnaissanceTxEN =1

  26. The example of UART work with a timer and a port ; Example3: sending of the array of bites into UART. mov cх, 20; number of digit mov BX,1000h; location’s of beginning of the array М1: mov al,[BX]; to move a bytefromarray into AL out 9Ch,al; and move it intoUART wt: in al,9dh; reading the condition byte shr al,1; is the dev ready? (TxRDY = 1?), jnc wt;if not, then wait, inc bx; if „yes”, then goto to the next byte dec cх; are all the bytes transferred ? jnz М1; if „not”, then to repeat

  27. Intel 8259 The Intel8259 is a family of Programmable Interrupt Controllers (PICs) designed and developed for use with the Intel 8086 16-bit microprocessors. The family originally consisted of the 8259, 8259A, and 8259B PICs, though a number of manufacturers make a wide range of compatible chips today. The 8259 acts as a multiplexer, combining multiple interrupt input sources into a single interrupt output to interrupt a single device.The 8259, though originally a separate chip, is now part of the Southbridge chipset on modern x86 motherboards.

  28. . The main lines of an 8259 are follows: eight interrupt input request lines named IRQ0 through IRQ7, an interrupt request output line named INTR, interrupt acknowledgment line named INTA, D0 through D7 for communicating the interrupt level or vector offset. Other connectors include CAS0 through CAS2 for cascading between 8259s. Up to eight slave 8259s may be cascaded to a master 8259 to provide up to 64 IRQs. 8259s are cascaded by connecting the INT line of one slave 8259 to the IRQ line of one master 8259. There are three registers, an Interrupt Mask Register (IMR), an Interrupt Request Register (IRR), and an In-Service Register (ISR). The IRR maintains a mask of the current interrupts that are pending acknowledgement, the ISR maintains a mask of the interrupts that are pending an EOI, and the IMR maintains a mask of interrupts that should not be sent an acknowledgement.

  29. The controller of interrupts BUS Master Cl address control data CS CPU CAS0 WR CAS1 RD CAS2 AO INTA INT SP IR7 IR6 IR5 IR4 IR3 D7-D0 IR2 IR1 IR0 Slave IC CS CPU CAS0 WR CAS1 RD CAS2 AO INTA INT SP IR7 IR6 IR5 IR4 IR3 DC D7-D0 IR2 IR1 IR0 There is possible a cascadingconnection up to 9 LIS. One of the controllers is a master, and others 8 are slaves.

  30. The controller of interrupts We won’t describe the instructionsof initialization in details, and nither operations of the 8259 controller. I refer to complementary literature about 8259 LIS. In personal computers BIOS is responsible for the initialization of the modes work of 8259 chips. Not experienced programmer won’t need to reprogram a controller – it’s dangerous, because wrong reprogram will cause the logic blackout of the whole system. At the next slide you can see the list of interrupts in standard PC,

  31. . Master 8259 IRQ0 – Intel 8253 or Intel 8254 Programmable Interval Timer, aka the system timer IRQ1 – Intel 8042keyboard controller IRQ2 – cascaded to slave 8259 INT line IRQ3 – 8250 UARTserial portCOM2 and COM4 IRQ4 – 8250 UARTserial portCOM1 and COM3 IRQ5 – Intel 8255parallel portLPT2 IRQ6 – Intel 82072Afloppy disk controller IRQ7 – Intel 8255parallel port LPT1 Slave 8259 IRQ8 – real-time clock (RTC) IRQ9 – no common assignment IRQ10 – no common assignment IRQ11 – no common assignment IRQ12 – Intel 8042 PS/2 mouse controller IRQ13 – math coprocessor IRQ14 – hard disk controller 1 IRQ15 – hard disk controller 2

  32. DMAcontroller (function) The function of DMA is to make СPU free from routineinput-output operations. DMA-direct memory accses is the only of LIS, which can change address bus! Working in the mode of master all the cycles of communication are executed on-line DMA. At that momentMP is disconnected out of buses and it’s in the condition of «bus mastering» executing programm from cash-memory.

  33. Home task ( instead of a test ) 1. What kind of equipments work in interrupts in PC ? 2. What kind of equipments in PC use a DMA controller ?

  34. Control questions • Structure of Motherboard of modern PC • Give an example of block-diagrams of moderm MB • Explain block ov timer ( pparallel or serial port) • Explain a function and a principle of work of an interrupt controller • Make a program using 3 interrupts. • Progress in system busses 34

More Related