1 / 271

Mohamed Sathak Engg College

DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK Lesson-1: IO port types- Serial and parallel IO ports 2 00 8 C h ap t e r -3 L 0 1 : "E m be dd e d S y st e m s - " , NIRAIMATHI ,. 1. Mohamed Sathak Engg College. 1. IO Port

fosterjohn
Download Presentation

Mohamed Sathak Engg College

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. DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK Lesson-1: IO port types- Serial and parallel IO ports 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 1 Mohamed SathakEngg College

  2. 1. IO Port 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 2 Mohamed SathakEngg College

  3. Port A port is a device •to receive the bytes from external peripheral(s) [or device(s) or processor(s) or controllers] for reading them later using instructions executed on the processor or •to send the bytes to external peripheral or device or processor using instructions executed on processor 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 3 Mohamed SathakEngg College

  4. Port •A Port connects to the processor using address decoder and system buses •The processor uses the addresses of the port-registers forprogramming the port functionsormodes, reading port status and for writing or reading bytes. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 4 Mohamed SathakEngg College

  5. Example • SI serial interface in 8051 • SPI serial peripheral interface in 68HC11 • PPI parallel peripheral interface 8255 •Ports P0, P1, P2 and P3 in 8051 or PA, PB, PC and PD in 68HC11 • COM1 and COM2 ports in an IBM PC 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 5 Mohamed SathakEngg College

  6. 2. IO Port Types 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 6 Mohamed SathakEngg College

  7. Types of Serial ports • Synchronous Serial Input • Synchronous Serial Output • Asynchronous Serial UART input • Asynchronous Serial UART output •Both as input and as output, for example, modem. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 7 Mohamed SathakEngg College

  8. Types of parallel ports • Parallel port one bit Input • Parallel one bit output • Parallel Port multi-bit Input • Parallel Port multi-bit Output 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 8 Mohamed SathakEngg College

  9. Synchronous Serial Input Example •Inter-processor data transfer, reading from CD or hard disk, audio input, video input, dial tone, network input, transceiver input, scanner input, remote controller input, serial I/O bus input, writing to flash memory using SDIO (Secure Data Association IO based card) 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 9 Mohamed SathakEngg College

  10. Synchronous Serial Input Device (Serial Bits and a clock signal used for synchronisation of a port input) 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 10 Mohamed SathakEngg College

  11. Synchronous Serial Input •The sender along with the serial bits also sends the port pin. The port synchronizes the serial data- well as each byte in synchronization •Synchronization means separation by a constant then each byte at the port is received at input in •The bytes are received at constant rates. Each byte for the serial line bits is (1/T) bps. [1bps = 1 bit 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, clock pulses SCLK (serial clock) to the receiver input bits with clock bits. Each bit in each byte as interval or phase difference. If clock period = T, period = 8T. at input port separates by 8T and data transfer rate per s] 11 Mohamed SathakEngg College

  12. Serial data and clock pulse-inputs • On same input line  when clock pulses either Receiver detects the clock pulses and receives data • On separate input line  When a separate SCLK + ve edge or –ve edge of the clock pulses that in an 8-bit shift register. The processing element at register from where the microprocessor reads the 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, encode or modulate serial data input bits suitably. bits after decoding or demodulating. input is sent, the receiver detects at the middle or whether the data-input is 1 or 0 and saves the the port (peripheral) saves the byte at a port byte. bits 12 Mohamed SathakEngg College

  13. Master output slave input (MOSI) and Master input slave output (MISO) • MOSI when the SCLK is sent from the sender to inputs from the master as per the inputs from • MISO when the SCLK is sent to the sender (slave) synchronize for sending the inputs to master as per •Synchronous serial input is used for inter- data inputs. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, the receiver and slave is forced to synchronize sent master clock. from the receiver (master) and slave is forced to the master clock outputs. processor transfers, audio inputs and streaming 13 Mohamed SathakEngg College

  14. Synchronous Serial Output Device (Device Serial Bits and synchronisation clock signal at a port output) 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 14 Mohamed SathakEngg College

  15. Example Synchronous Serial Output •Inter-processor data transfer, multiprocessor communication, writing to CD or hard disk, audio Input/output, video Input/output, dialer output, network device output, remote TV Control, transceiver output, and serial I/O bus output or writing to flash memory using SDIO 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 15 Mohamed SathakEngg College

  16. Synchronous Serial Output •Each bit in each byte sent in synchronization with a clock. • Bytes sent at constant rates. If clock period = T, then data transfer rate is (1/T) bps. •Sender either sends the clock pulses at SCLK pin or sends the serial data output and clock pulse-input through same output line with clock pulses either suitably modulate or encode the serial output bits. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 16 Mohamed SathakEngg College

  17. Synchronous serial output using shift register •The processing element at the port (peripheral) sends the byte through a shift register at the port to where the microprocessor writes the byte. •Synchronous serial output is used for inter- processor transfers, audio outputs and streaming data outputs. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 17 Mohamed SathakEngg College

  18. Synchronous Serial Input/Output 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 18 Mohamed SathakEngg College

  19. Synchronous Serial Input/Output • Each bit in each byte is in synchronization at input output with the master clock output . •The bytes are sent or received at constant rates. input/output clock pulses either suitably modulate clock period = T, then data transfer rate is (1/T) • The processing element at the port (peripheral) from where the microprocessor writes or reads the 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, and each bit in each byte is in synchronization at The I/Os can also be on same I/O line when or encode bps. the serial input/output, respectively. If sends and byte receives the byte at a port register to or 19 Mohamed SathakEngg College

  20. Asynchronous Serial input RxD at UART COM Port 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 20 Mohamed SathakEngg College

  21. Asynchronous Serial port line RxD (receive data). •Does not receive the clock pulses or clock information along with the bits. • Each bit is received in each byte at fixed intervals but each received byte is not in synchronization. •Bytes separate by the variable intervals or phase differences • Asynchronous serial input also called UART input if serial input is according to UART protocol 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 21 Mohamed SathakEngg College

  22. Example Serial Asynchronous Input •Asynchronous serial input is used for keypad inputs and modem inputs in computers •Keypad controller serial data-in, mice, keyboard controller, modem input, character send inputs on serial line [also called UART (universal receiver and transmitter) input when according to UART mode] 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 22 Mohamed SathakEngg College

  23. Format of bits at UART protocol 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 23 Mohamed SathakEngg College

  24. UART protocol serial line format •Starting point of receiving the bits for each byte is indicated by a line transition from 1 to 0 for a period = T. [T1called baud rate.] •If sender’s shift-clock period = T, then a byte at the port is received at input in period = 10.T or 11.T due to use of additional bits at start and end of each byte. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 24 Mohamed SathakEngg College

  25. UART protocol serial line format •Receiver detects n bits at the intervals of T from the middle of the start indicating bit. The n = 0, 1, …, 10 or 11 and finds whether the data-input is 1 or 0 and saves the bits in an 8-bit shift register. •Processing element at the port (peripheral) saves the byte at a port register from where the microprocessor reads the byte. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 25 Mohamed SathakEngg College

  26. Asynchronous Serial Output •Asynchronousoutput serial port line TxD (transmit data). •Each bit in each byte transmit at fixed intervals but each output byte is not in synchronization (separates by a variable interval or phase difference). Minimum separation is 1 stop bit interval 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 26 Mohamed SathakEngg College

  27. TxD •Does not send the clock pulses along with the bits. •Sendertransmits the bytes at the minimum intervals of n.T. Bits receiving starts from the middle of the start indicating bit, •n = 0, 1, …, 10 or 11 and sender sends the bits through a 10 or 11 -bit shift register. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 27 Mohamed SathakEngg College

  28. TxD •The processing element at the port (peripheral) sends the byte at a port register to where the microprocessor is to write the byte. •Synchronous serial output is also called UART output if serial output is according to UART protocol 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 28 Mohamed SathakEngg College

  29. Example Serial Asynchronous Output •Outputfrom modem, outputfor printer, the output on a serial line [also called UART output when according to UART] 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 29 Mohamed SathakEngg College

  30. Half Duplex •Half duplex means as follows: at an instant communication can only be one way (input or output) on a bi-directional line. •An example of half-duplex mode─ telephone communication. On one telephone line, the talk can only in the half- duplex way mode. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 30 Mohamed SathakEngg College

  31. Full Duplex •Full duplex means that at an instant, the communicationcan be both ways. An example of the full duplex asynchronous mode of communication is the communication between the modem and the computer though TxD and RxD lines or communication using SI in modes 1, 2 and 3 in 8051 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 31 Mohamed SathakEngg College

  32. Parallel Port single bit input • Completion of a revolution of a wheel, • Achieving preset pressure in a boiler, •Exceeding the upper limit of permitted weight over the pan of an electronic balance, •Presence of a magnetic piece in the vicinity of or within reach of a robot arm to its end point and • Filling of a liquid up to a fixed level. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 32 Mohamed SathakEngg College

  33. Parallel Port Output- single bit •PWM output fora DAC, which controls liquid level,or temperature,or pressure,or speed or angular position of a rotating shaft or a linear displacement ofan objectora d.c. motor control • Pulses to an external circuit • Control signal to an external circuit 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 33 Mohamed SathakEngg College

  34. Parallel Port Input- multi-bit •ADC input from liquid level measuring sensor or temperature sensor or pressure sensor orspeed sensor or d.c. motorrpm sensor •Encoder inputs for bits for angular position of a rotating shaft or a linear displacement of an object 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 34 Mohamed SathakEngg College

  35. Parallel Port Output- multi-bit •LCD controller for Multilane LCD display matrix unit in a cellular phone to display on the screen the phone number, time, messages, character outputs or pictogram bit-images for display screen or e-mail or web page • Print controller output • Stepper-motor coil driving bits 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 35 Mohamed SathakEngg College

  36. Parallel Port Input-Output • PPI 8255 • Touch screen in mobile phone 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 36 Mohamed SathakEngg College

  37. Summary 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 37 Mohamed SathakEngg College

  38. We learnt • Port definition • Port examples •Ports in embedded system connects to external processors, controllers or devices like keypad, multi-line display unit, printer or modem •A serial or parallel I/O port connects and accessed from and to the system-processor through the system buses and address decoder. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 38 Mohamed SathakEngg College

  39. We learnt • Synchronous serial inputs and outputs • Synchronization Clock, MOSI, MISO •Clock on separate line or encoded or clock signal modulated or encoded with I/O bits. 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 39 Mohamed SathakEngg College

  40. We learnt • Asynchronous serial inputs and outputs •RxD and TxD and UART protocol format asynchronous IOs • full duplex or half-duplex • Examples of serial and parallel IOs • Examples of single bit and multi-bit IOs at parallel ports 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 40 Mohamed SathakEngg College

  41. End of Lesson 1 of Chapter 3 2008 Chapter-3L01:"EmbeddedSystems - " ,NIRAIMATHI, 41 Mohamed SathakEngg College

  42. ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION – Lesson-19 PROCESSOR, MICROCONTROLLER SELECTION 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 1 Mohamed SathakEngg College

  43. 1. PROCESSOR SELECTION 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 2 Mohamed SathakEngg College

  44. Processor Should operate at higher clock speed for processing more instructions per second. High computing performance of computing when there exist (a) Pipeline(s) and superscalar architectures, (b) pre-fetch cache unit, caches, and register-files and MMU and (c) RISC architecture. Register-windows provides fast context switching in a multitasking system. 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 3 Mohamed SathakEngg College

  45. Processor Power-efficient embedded system requires feature for its units and programmability the processing need for a function or execution time. It is also required to have also require special cache design. 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, a processor that has auto-shut down for the disabling these use of these when instruction set does not have constraint of Stop, Sleep and Wait instructions. It may 4 Mohamed SathakEngg College

  46. Processor • Burst mode accesses external memories Atomic operation unit provides hardware designing embedded software, else special made when sharing the variables among the 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, fast, reads fast and writes fast. solution to shared data problem when programming skill multiple tasks and efforts are to be 5 Mohamed SathakEngg College

  47. Processor- specific features • Big endian or little endian • Energy efficient 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 6 Mohamed SathakEngg College

  48. 2. Microcontroller Version Selection 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 7 Mohamed SathakEngg College

  49. Numerous versions of 8051 •Additional devices and units are provided in different versions. •A version selected for embedded system design asper the application as well as its cost. 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 8 Mohamed SathakEngg College

  50. Examples •An embedded system in automobile for example requires CAN bus─ a version with CAN bus controller is selected. •An 8051 enhancement 8052 ─ an additional timer. • Philips P83C528 ─ I2C serial bus •8051 family member 83C152JA (and its sister JB, JC and JD microcontrollers) have two direct memory access (DMA) channels on-chip. 2008 Chapter-2L18:"EmbeddedSystems - " ,NIRAIMATHI, 9 Mohamed SathakEngg College

More Related