Unformatted text preview:

mP Based SystemsmP Based SystemsMemory and I/O mappingMemory and I/O mapping (2)Memory and I/O mapping (3)Memory WiringInput (switch) WiringSlide 8Output (LED) WiringI/O: Device ControllersExample of Device Controllers: Parallel I/O PortExample of Device Controllers: UART or Serial I/O PortExample of Device Controllers: TimerSlide 14Slide 15Slide 16Gluing a mP-based systemBuilt-Ins on MicrocontrollersmP Based Systems (Example: Microcontroller Rabbit 2000)Rabbit 2000 CharacteristicsRabbit 2000 Characteristics (2)Rabbit 2000 System ClockSaving Power (By Software)TimersTimers (2)Serial CommunicationP Based SystemsRead Chapter 3(David E. Simon, An Embedded Software Primer)(01/13/19)Embedded Systems Development Introduction Saâd Biaz 2P Based Systems PMemorySystemI/OAddress BusData BusDigital inputs (parallel input)P based systemLEDSwitchTemperatureSensorDigital outputs (parallel port)Serial portAnalog input/outputStorage(01/13/19)Embedded Systems Development Introduction Saâd Biaz 3Memory and I/O mapping•Consider an 8-bit  P (imaginary) with a 6-bit address bus. First instruction to execute (after power on) is at address 48.•We have:–16B ROM components (16 x 1B)–16B RAM components (16 x 1B)•We plan to ¼ of the memory with ROM, ½ of the memory in RAM, and ¼ I/O(01/13/19)Embedded Systems Development Introduction Saâd Biaz 4Memory and I/O mapping (2)•Let us map our address space–What is the address range for the ROM space?–What is the address range for the RAM space?–What is the address range for the I/O space000000 = 0001111 = 15010000 = 16011111 = 31010000 = 32011111 = 47110000 = 48111111 = 63I/ORAM 1RAM 2ROMA5A4A3A2A1A026=64(01/13/19)Embedded Systems Development Introduction Saâd Biaz 5Memory and I/O mapping (3)•1) What is the size of the address space?•2) What is the size of the address bus for the ROM and RAM components?PAddress BusData Bus6816BRAMD0D7A3A016BROMD0D7A3A0(01/13/19)Embedded Systems Development Introduction Saâd Biaz 6Memory WiringRAMA3A0D7-D0R/WCSAddress Bus8A3A0A4A5PData BusD7-D0R/WRAMA3A0D7-D0R/WCSROMA3A0D7-D0R/WCSA5A4 = 01 A5A4 = 10 A5A4 = 11(01/13/19)Embedded Systems Development Introduction Saâd Biaz 7Input (switch) Wiring RAMA3A0D7-D0R/WCSAddress Bus8A3A0A4A5PData BusD7-D0R/WRAMA3A0D7-D0R/WCSROMA3A0D7-D0R/WCSVCCHow to interface a switch?First, choose the address where to map the switchSecond, build a circuit that connects the swich to data busonly when associated address is given by P.(01/13/19)Embedded Systems Development Introduction Saâd Biaz 8Input (switch) Wiring RAMA3A0D7-D0R/WCSAddress Bus8A3A0A4A5PData BusD7-D0R/WRAMA3A0D7-D0R/WCSROMA3A0D7-D0R/WCSVCCLet us choose the address 0 (bit D0) to map the switchA5A4A3A2A1A0D0(01/13/19)Embedded Systems Development Introduction Saâd Biaz 9Output (LED) Wiring RAMA3A0D7-D0R/WCSAddress Bus8A3A0A4A5PData BusD7-D0R/WRAMA3A0D7-D0R/WCSROMA3A0D7-D0R/WCSExercise I : Interface a LED at address 1, data bus line D4A5A4A3A2A1A0D4(01/13/19)Embedded Systems Development Introduction Saâd Biaz 10I/O: Device Controllers•The P communicates with the device controller through registers accessible as if they are memory cells. •Example: a device controller with 2m registersChipAm-1A0D7-D0R/WCSI/OFunction(01/13/19)Embedded Systems Development Introduction Saâd Biaz 11Example of Device Controllers:Parallel I/O Port•Ports A, B, and C can be configured to be inputs or outputs.•Configuration is made by writing in the 8-bit control register•After configuration, ports A,B, or C can be read or written to as if they were memory cells.Intel 8255A1A0D7-D0RDCSABC8888-bit Control Reg.WD(01/13/19)Embedded Systems Development Introduction Saâd Biaz 12Example of Device Controllers:UART or Serial I/O Port•The 8-bit configuration register is used to select the speed (110bps to 19200bps), parity check, number of bits per word, lentgh of stop bits.•The P writes to the data register the data to be sent serially on TX•The P reads from the data register data received serially on RX.Intel 8251A0D7-D0RDCS8-bit Data Reg.WD8-bit Config. Reg.TXRX(01/13/19)Embedded Systems Development Introduction Saâd Biaz 13Example of Device Controllers:Timer•The  P initializes a counter Ci with some value.•All counters are decremented at each tick of the clock input•When the counter Ci reaches 0, an impulse is output on the corresponding output Oi.Intel 8253A0D7-D0RDCS16-bit Counter 0WD8-bit Config. Reg.O0A1O1O216-bit Counter 116-bit Counter 2CLK(01/13/19)Embedded Systems Development Introduction Saâd Biaz 14Direct Memory Access (DMA)•The idea is to transfer directly I/O stream to/from memory without using the CPU (long bus cycles)•Reminder, to transfer a word from I/O to memory. The P must:•Fetch its “reading” instruction (IN AX,DX)•Decode the instruction, execute it•Fetch the “write” instruction•Decode the instruction, execute it•Test if done (involves loops/jumps..etc)(01/13/19)Embedded Systems Development Introduction Saâd Biaz 15Direct Memory Access (DMA) (2)•Transfering CONTIGUOUS data can be made more efficiently:•A counter is needed to generate increasing addresses and proper control signals to the memory.(01/13/19)Embedded Systems Development Introduction Saâd Biaz 16Address/Control BusPData BusDirect Memory Access (DMA)RAMI/ODMAControllerBusReqBusAckDMAReqDMAAck(01/13/19)Embedded Systems Development Introduction Saâd Biaz 17Gluing a P-based system•Decoding functions may require some components (especially if address bus very large 32 to 64 bits).•PALs•FGPAs(01/13/19)Embedded Systems Development Introduction Saâd Biaz 18Built-Ins on Microcontrollers•Address decoding•Timers•I/O•DMA•ADC-DAC (Analog-Digital Converter … )P Based Systems(Example: Microcontroller Rabbit 2000)Read Chapter 1 and 2(Rabbit Semiconductor, Rabbit 2000 Microprocessor User’s Manual)http://www.rabbitsemiconductor.com/docs/(01/13/19)Embedded Systems Development Introduction Saâd Biaz 20Rabbit 2000 Characteristics•8-bit data bus•20-bit address bus (extensible) •Software driven system clock•2 timers•40 bit


View Full Document

AUBURN COMP 3510 - Chapter 3

Documents in this Course
Load more
Download Chapter 3
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Chapter 3 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Chapter 3 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?