3D2 Project Documentation MC68008 Microprocessor System. Mikhail Volkov, Niall Murphy, Wang Yunfeng Trinity College Dublin

Size: px
Start display at page:

Download "3D2 Project Documentation MC68008 Microprocessor System. Mikhail Volkov, Niall Murphy, Wang Yunfeng Trinity College Dublin"

Transcription

1 3D2 Project Documentation MC68008 Microprocessor System Mikhail Volkov, Niall Murphy, Wang Yunfeng Trinity College Dublin May 08,

2 Contents Part 1 Project Overview and Block Diagram Part 2 Detailed Project Schematics 2.1 Complete Project Schematic 2.2 GAL Pin Diagrams Part 3 Design and Implementation 3.1 Reset Circuitry 3.2 Bus Arbitration, Processor Status and Interrupt Control 3.3 Device Access and Memory Decoding 3.4 EPROM 3.5 RAM 3.6 Read-Modify-Write Cycle and Data Transfer Acknowledgement 3.7 Bus Error Eception 3.8 ACIA 3.9 Control LED 3.10 LED Array 3.11 Hacking the Monitor Part 4 Source Code 4.1 GAL A PALASM 4.2 GAL B PALASM 4.3 GAL C PALASM 4.4 Board Test 4.5 Control LED Test 4.6 LED Array Marquee 4.7 ACIA Test 2

3 The aim of the project is to design, construct and commission a simple MC68008 microprocessor system. The hardware comprises a MC68008 microprocessor, 8K EPROM, 4K RAM, 2 serial interfaces and relevant glue logic. Part 1- Project Overview and Block Diagram A block diagram of the project is shown below (Fig. 1.1). The diagram outlines in the most general sense, key dependencies between the components on the board. It should be noted that this is a purely functional diagram, not necessarily indicative of the actual wiring scheme implemented on the physical project board. For brevity, glue logic herein simply represents some form of interaction between two components, most likely arbitrated by programmable logic components, but possibly a direct connection. Fig. 1.1 Project Block Diagram 3

4 Part 3 Design and Implementation 3.1 Reset Circuitry The reset circuitry was required so that a button could be placed on the board to reset the system. This was especially useful in the initial debugging phase where we used the reset button in combination with the logic analyser to see what the processor was doing during start-up. The aim of the reset circuitry was simple: to provide an on-board button which would drive the reset and halt pins on the MC68008 low when pressed. This simple problem did however provide scope for some interesting design. The main difficulty with the reset circuitry is providing a smooth unambiguous signal, especially when the button is transitioning between its two positions. This is achieved using two Schmitt triggers. The Schmitt trigger is designed to give a high output when the input is above a certain value and a low output when the input is below a certain value. When the input is in between these thresholds, the output will retain its current value. This ensures that the reset signal will not jump back and forth between the high and low states when the button is pressed or released. Fig. 3.1 below provides a layout of the components involved in the reset circuitry. Fig. 3.1 Reset Circuitry 4

5 3.2 Bus Arbitration, Processor Status and Interrupt Control Bus arbitration control bus request and bus grant lines. The bus request (/BR) input enables eternal devices (such as a DMA or I/O controller) to gain access to the MC68008 bus. The CPU would give up the bus when it has completed its current bus cycle. The bus grant (/BG) output indicates that the MC68008 will release the bus at the end of the current bus cycle, resulting in the address bus, data bus, /AS, R/W, FC0, FC1 & FC2 being tri-stated and the CPU eecution being suspended. Fig. 3.2 below broadly illustrates the bus arbitration cycle in a fully functional MC68008 system. Fig. 3.2 Bus Arbitration Cycle Processor status is controlled by the function code lines FC0 FC2. These indicate the type of bus cycle currently being eecuted. Function code signals are valid when /AS is asserted. Interrupt control is provided by interrupt priority levels encoded on interrupt priority lines /IPL0 /IPL2. /IPL0 and /IPL2 are connected together, while /IPL1 remains on a separate line, thus limiting the number of interrupt levels to four: 000, 010, 101 and 111. Interrupt level 000 indicates that no interrupts are pending. Implementation of bus arbitration, processor status lines and interrupts was beyond the scope or timeframe of this project, although potential etensibility of these features was provided for. /BR was tied high to ensure that bus would not be requested. /BG and the interrupt lines were left floating. The GAL was programmed so that /VPA is asserted in the event of FC0, FC1 FC2 and /AS all being asserted. This allows the ACIAs to be etended with interrupt-driven functionality. 5

6 3.3 Device Access and Memory Decoding From the point of view of a programmer operating a complete and functional MC68008 microprocessor system, all memory accesses are encapsulated within a 1MB address space. That is to say the programmer can only refer to numerical memory locations, and has no direct control over individual devices. At the heart of this principle is the memory map, a routing scheme which maps values on the address lines into access requests to individual devices. The memory map is implemented by decoding an address and enabling the appropriate device. All devices must be assigned to unique addresses in the MC68008 memory space and two devices are never selected by the same address. Furthermore, the EPROM has to be located at address $00000 in order for the MC68008 to locate the initial system stack pointer (SSP) and program counter (PC), and to initialize the interrupt vector table. With these being the only requirements of the memory map, further considerations were given only towards simplification of logic and convenience of implementation. The memory map was implemented as follows: $00000 $01FFF: EPROM $02000: CTRL LED $08000: LED ARRAY $10000 $107FF: RAM0 $10800 $10FFF: RAM1 $F0000 $F07FF: ACIA0 $F0800 $F0FFF: ACIA1 Resolving the addressed into pins on the address lines results in the following access table: A19 A16 A15 A13 A11 A ENABLED DEVICE EEPROM 1 1 CTRL LED LED ARRAY RAM0 RAM ACIA0 ACIA1 Only five address pins are actually decoded. Access to devices is thus determined on a principle of elimination, rather than confirmation. That is to say, the address is not decoded fully, but only insofar as to disable all but one device. There is no danger in the event of an invalid address being provided. An invalid address simply means that no device will be enabled and DTACK will remain disasserted. 6

7 The resulting PALASM equations are as follows: /EPROM = /AS * /A19 * /A16 * /A13 /RAM0 = /AS * /A19 * A16 * /A11 /RAM1 = /AS * /A19 * A16 * A11 /ACIA0 = /AS * A19 * /A11 /ACIA1 = /AS * A19 * A11 The control LED and LED array require additional clauses, not related to memory decoding but rather to their specific modes of operation. These equations are eplained in detail in sections 3.6 and 3.7 of the report. 3.4 EPROM The EPROM module used in the project is a TMM2764AD 8192-byte 28-pin chip. The device is erased by eposing it to UV light for minutes and programmed electrically by changing bits from 1 to 0. The device provides 13 address lines and 8 data lines. The EPROM is enabled by asserting the chip enable (CE) pin low. /CE is asserted by the memory decoder provided /AS is asserted and the memory address on the address lines maps onto the EPROM memory space. Output is obtained by asserting the output enable (OE) pin low. /OE is asserted provided /DS is asserted and R/W is asserted (since the microprocessor is in read mode). 3.5 RAM There are two RAM modules used in the project, mapped to contiguous memory addresses between $10000 and $10FFF. The RAM modules are Hitachi HM6116P 2048-byte 24-pin chips. The device provides 11 address lines and 8 data lines. A RAM module is enabled by asserting the chip select (CS) pin low. /CS is asserted by the memory decoder provided /AS is asserted and the memory address on the address lines maps onto RAM memory space. Output is obtained by eactly the same logic as for the EPROM. /OE is asserted provided /DS is asserted and R/W is asserted (since the microprocessor is in read mode). Unlike the EPROM, the RAM can also be written to by the CPU. Data is written to the RAM by asserting the write enable (WE) pin low. /WE is asserted provided /DS is asserted and R/W is disasserted (since the microprocessor is in write mode). 7

8 3.6 Read-Modify-Write Cycle and Data Transfer Acknowledgement The read/write cycle of the MC68008 is outlined as follows. The MC68008 uses a single data strobe (/DS) and a read/write direction line R/W. In write mode, the CPU asserts R/W low, places appropriate values on the address and data lines, and after some setup time asserts /DS. The recipient device (memory or I/O controller) latches the data which is guaranteed to be valid before the leading edge of /DS and acknowledges by asserting /DTACK. The CPU completes the cycle by asserting DS and then (allowing for some hold time, in the event that the recipient is using transparent latches) disasserting the address and data lines. Thus the data is guaranteed to be valid while /DS is asserted. In read mode, the same mechanism applies with the difference being that the CPU holds the R/W line high (indicating a read cycle). The data source must provide valid data before /DS is disasserted. The access time involved in asserting /AS, decoding the memory address, accessing memory and setting up the data totals 212.5ns. Thus if the memory access time is 212.5ns, /DTACK can be generated directly from the memory decoder. The EPROM chip used in the project specifies a memory access time of 350ns, thus requiring 4 wait states before /DTACK can be asserted. For RAM access, no wait states are required and /DTACK is generated directly from the /RAM select signal in the memory decoder. Similarly the memory mapped LED array required no wait states as the device is driven directly by the memory decoder lines. Thus /DTACK is asserted whenever any device is enabled with the eception of EPROM which requires a delay of 4 wait states. The resulting PALASM equation is: /DTACK = (/EPROM * EPROM_ACTIVE) + /RAM0 + /RAM1 + LED_ACCESS The generation of the 4 required wait states for /DTACK is achieved through the emulation of a shift register such as a 74LS164. A shift register operates on the principle of advancing the value in each output to the net register on each rising edge of the clock signal. With AS acting as the clearing input to the shift register the resulting logic is such that once /AS is asserted the shift register will assert EPROM_ACTIVE 4 CPU clock cycles later. /DS is not necessary to include in the delay logic for the EPROM since the EPROM is a read-only device. The required layout is shown below (Fig. 3.3). The operation of the 74LS164 was emulated on the GAL. The resulting PALASM equations are provided below. LSB is an input pin tied to V CC and BSC_3 is the output pin providing EPROM_ACTIVE for the memory decoder. BSC_0 := LSB * /AS BSC_1 := BSC_0 * /AS BSC_2 := BSC_1 * /AS BSC_3 := BSC_2 * /AS 8

9 Fig. 3.3 Delayed /DTACK 9

10 3.7 Bus Error Eception In the event of neither /DTACK (in the case of memory devices) or /VPA (in the case of ACIA devices) not being asserted, an infinite wait state is prevented by asserting the bus error pin (BERR) low. /BERR is asserted if /AS remains asserted for too long (a nominal time period of 16μs was chosen as this corresponds to 128 CPU clock cycles). Two chained 74LS393 binary counters were chosen for this purpose. /AS acts as the clearing input (CLR) into both counters so that while AS is high the counters will remain clear, and as soon as /AS is asserted the counters least significant counter begins to increment. The most significant output digit of the two counters represents BERR so that if /AS is still asserted after 128 consecutive CPU clock cycles, this pin will be driven high. The signal is then put through a 74LS04 inverter and a SN7407 buffer, thus driving the output low and asserting the /BERR input pin of the CPU. A schematic illustrating the logic is show below (Fig. 3.4). Fig. 3.4 Bus Error Eception 10

11 3.8 ACIA The purpose of the ACIA is to provide an interface for the MC68008 to communicate with peripheral devices over a serial connection. In serial communication, data is transmitted sequentially, one bit at a time. The CPU data bus is a parallel connection with eight lines, wherein one byte of data is transmitted at a time. The ACIA is used as an interface between the parallel and serial connections. The ACIA contains a number of 8-bit registers which provide an interface to the MC68008 for transmitting and receiving data. These registers are as follows: Status Register: The status register is used to indicate transmission errors (framing and parity errors), overrun (where data is received before the processor has read previous data), status of transmit and receive registers (full or empty) and interrupt occurrences. Control Register: The control register is set by the programmer during ACIA initialisation. It is used to set the baud rate, the receiver clock source (eternal clock or baud rate), the word length and the number of stop bits. Command Register: The command register is also set by the programmer during initialisation. It is used to set the parity and interrupt modes. Transmitter Register: The programmer writes data here and it is automatically serialised and transmitted by the ACIA. Receiver Register: When the ACIA receives a serial signal it decodes it and places it in the Receiver Register where it can be read by the programmer. The ACIA operates using the E output of the MC68008 which is a special clock signal which is low for si CPU clock cycles and high for four. The ACIA uses the low part of this cycle to read the address lines and the read-write signal and the high part of the cycle to place the appropriate data on the data bus. The CPU reads the data on the end of the cycle (the downward edge of E). The ACIA requires a full cycle of E to function correctly and therefore, when a memory access involving the ACIA begins, we must wait for the start of an E cycle (begins on downward edge of E) before beginning the operation described above. We were able to implement this behaviour using two JK flip-flops. The first flip flop latches on a downward edge of E. If an ACIA memory access occurs, VPA will only be asserted at the point where E goes low. The second flip flop will assert VMA one clock cycle later. This activates the ACIA which will then check the states of the address lines (RS0 and RS1) and RW and either read from the data bus or place data on the data bus. This gives the ACIA a full cycle of E to perform a read or write. The reset pin of the ACIA is connected directly to the reset pin of the MC This means that the ACIA will be automatically reset when the CPU is reset. The ACIA has two pins which it uses to connect to a peripheral device, transmit data (TD) and receive data (RD). However, MOS technology uses 0V to represent '0' and 5V to represent '1' whereas the EIA RS232-C interface which we will be using to connect to the PC uses -25V...-3V to represent '1' and +3V...+25V to represent '0'. 11

12 A MAX232 chip is used for this purpose. The MAX232 will convert our 0V and 5V signals to +9V and -9V signals respectively. Conversely, when we receive data, we pass it through the MAX232 to convert the -12V and +12V signals to 5V and 0V signals respectively. The receiver input and transmitter output of the MAX232 were connected to a pin DIN socket. With the ACIA wired up, all that is left is to provide an interface to the programmer. A memory mapping technique was used to provide an intuitive procedure for communicating with the ACIA. The data registers for the first ACIA could be accessed by reading or writing from $F0000. The status register can be read from $F0001, and the command and control registers can be written to at $F0002 and $F0003 respectively. These equations were used in a GAL 22V10 to decode the address being accessed: /ACIA0 = /AS * A19 * /A11 /ACIA1 = /AS * A19 * A11 Before the ACIA can be used, it must be set to the appropriate mode of operation. This can be done by running an initialisation program. For this project, it was necessary to set the baud rate, set the parity mode and disable interrupts. This could be achieved using these lines of code: move.b #$0B,A0CR ;set command register move.b #$18,A0CTRL ;set control register The command register was set to ' '. This disabled transmitter interrupts, receiver interrupts and parity mode. The control register was set to ' '. This set the baud rate to 1200, the word length to 8 bits, the number of stop bits to 1 and selected the baud rate as the receiver clock source. Once initialised, two subroutines were needed for the programmer: one to read and one to write (see code listing 4.7). RACIA is used to read from the ACIA. It loops until bit 3 of the status register has been set (this will be set when the ACIA receives data) and then copies the receiver register into d0. WACIA is used to write to the ACIA. It loops until bit 4 of the status register has been set (this will be set when the transmitter register is empty) and then copies the least significant byte of d0 into the transmitter register. 12

13 3.9 Control LED A control LED is built into the project board allowing one to program simple glue logic to make the LED reflect arbitrary characteristics of the microprocessor system during operation. The LED was chosen to function as a read-write indicator. This is achieved by mapping it to a discrete memory address ($02000 was chosen, as outlined in section 3.3 on memory decoding) and providing logic to light the LED when R/W is asserted low during a memory access to this address, and turn off the LED when R/W is asserted high during a memory access to this address. In other words, writing $02000 lights the LED and reading from $02000 turns off the LED. This logic is implemented inside the GAL. Furthermore, the GAL output pin is latched onto itself such that it remains in its current state until the state of R/W changes. This means that writing to the control LED memory location will light the LED and keep it lit until the location is read from, and vice versa. This is achieved through the use of a self-referential holding equation in PALASM. The final PALASM equations implementing the control LED are as follows: STRING LED_SET '(/AS * /RW * A13)' LED_RESET = (/AS * RW * A13) LED = LED_SET + LED*/LED_RESET The use of address line A13 corresponds to memory location $ An intermediate LED_RESET output pin was required, rather than a string macro due to PALASM complications with parsing comple Boolean epressions. The following MC68008 program illustrates how the control LED is used. Successful eecution of this program results in the control LED flashing on and off at one-second intervals, thus (to an etent) verifying the correctness of the memory decoder, the readwrite cycle and the control LED implementation itself. LED equ $02000 DELAY equ org $0 dc.l $40800 dc.l main org $400 main move.b d0,led ; turn on LED move.l #DELAY,d1 ; initialise DELAY counter loop1 subq.l #1,d1 ; decrement bne loop1 ; loop until DELAY over move.b LED,d0 ; turn off LED move.l #DELAY,d1 ; initialise DELAY counter loop2 subq.l #1,d1 ; decrement bne loop2 ; loop until DELAY over bra main ; start again end 13

14 3.10 LED Array The LED array (also known as EPIC LED XTRAVAGANZA 9000!) is an etra project feature implemented by our group. The idea was to epand on the control LED principle, this time providing not one but four LEDs which can be independently turned on and off. Moreover, the intention was to provide an intuitive and easy to use interface for the programmer to write imaginative code which manipulates the LED array in different ways. We approached this task in a top down manner designing the code interface first, and the hardware second. The memory address representing the LED array was chosen to be $8000, as no other device in the memory space uses address line A15 so decoding would require only one pin to be checked. The main requirement of the interface specification was that a programmer could write a 4-bit value to the memory location mapped to the LED array, whereby each bit would represent a single LED in the array 1 to turn the LED on and 0 to turn it off. For eample, the following code would turn on LEDs 1 and 3: LEDARR EQU $8000 move.b #%0101,LEDARR This certainly felt more intuitive than using read and write instructions to toggle the LED on and off. It also allowed the programmer to user bitwise operations to create pretty light patterns. For instance, the following code would cause the lights to ignite in turn, creating a hypnotic scrolling LED marquee. This works by constantly rotating the value % and writing it to the LED array memory address, effectively equivalent to constantly shifting a one through an array of zeros. This was tested and found to captivate and entrance onlookers, causing them to stare at this dreamy light show for hours on end, sometimes slipping in and out of transient, hypnagogic states of consciousness. LEDARR EQU $8000 move.b #% ,d0 move.l #DELAY,d1 loop subq.l #1,d1 bne loop move.b d0,ledarr rol.b #1,d0 move.l #DELAY,d1 bra loop The entire functionality of the LED array was implemented on a single GAL, using 8 input pins, 4 intermediate pins and 4 output pins. The operation of the GAL is such that if /AS, /DS and /RW are asserted then LED will assume the value on input line D. The LED array GAL layout is shown in Fig The final implementation PALASM equations are as follows: 14

15 L0 = /AS * /DS * /RW * A15 * D0 + L0 * /L0_RESET L0_RESET = /AS * /DS * /RW * A15 * /D0 L1 = /AS * /DS * /RW * A15 * D1 + L1 * /L1_RESET L1_RESET = /AS * /DS * /RW * A15 * /D1 L2 = /AS * /DS * /RW * A15 * D2 + L2 * /L2_RESET L2_RESET = /AS * /DS * /RW * A15 * /D2 L3 = /AS * /DS * /RW * A15 * D3 + L3 * /L3_RESET L3_RESET = /AS * /DS * /RW * A15 * /D3 Fig. 3.5 LED Array Implementation 15

16 3.11 Hacking the Monitor The final challenge we set ourselves for this project was to hack the monitor program and inject our own subroutine which would provide an end-user HyperTerminal interface for toggling the LEDs on and off. Success in this task would be a final indication that every component of the board is working perfectly, and would surely be a final testament to our efforts and our understanding of the underlying hardware and software involved in the design and implementation of our microprocessor system. The task was to introduce an additional entry into the monitor main menu and to allow the user to enter our subroutine by pressing the M key. Therein by pressing the number keys 1 4 the user should be interactively able to toggle the corresponding LEDs on our project board. In addition, the HyperTerminal display should update to reflect the current state of the LED array. Finally, by pressing any other key the user would be brought back to the main menu and the monitor would resume normal functionality. It was also essential that whatever changes we introduce should not interfere with the monitor s eisting mode of operation. The monitor program is a robust and sophisticated piece of software, totalling just over 1000 lines of assembly code. To hack the monitor we first had to figure out eactly how it worked. The monitor initializes by clearing the vector table and installing default eception handlers. Net the monitor initializes the ACIAs, since without properly functioning ACIAs the program would not be able to communicate with HyperTerminal and appear dead to the end-user. The ACIA baud rate is initialized by polling for an input character and comparing it to equivalent characters at different baud rates. After initializing the ACIA baud rate and some further data structure initialization, the monitor enters the command interpreter polling loop. Here the monitor polls for key presses and upon receiving a key compares it to entries in a command table. The command table is a lookup table consisting of an ASCII value representing a key-press, a menu entry message and an address for the appropriate subroutine. This was our first point of modification. We added a custom entry for our subroutine onto the end of the command table and proceeded to eplore further. DC.B 0 COMTAB DC.W (' '),SPMSG,SPACE DC.W ('G'),GMSG,G DC.W ('H'),HMSG,H DC.W ('L'),LMSG,L DC.W $0C,CLMSG,CL DC.W ('O'),OMSG,O DC.W ('R'),RMSG,R DC.W ('S'),SMSG,S DC.W ('Z'),ZMSG,Z dc.w ('M'),MMSG,M ; our new entry COMEND 16

17 The menu entry messages are all defined in one place at the bottom of the end of the monitor program. We added our own: MMSG dc.b 'EPIC LED XTRAVAGANZA 9000!',CR,LF,0 The net step was to write and integrate our subroutine into the monitor. By pressing one of the keys numbered 1 4 the user would be presented with a line which looks like this: [.] [X] [.] [.] The contents of each pair of brackets represent the state of a given LED in the LED array. X means the LED is turned on (presumably the user has just pressed 2) and a dot means the LED is turned off. An empty template message (like the one above but with all dots) was added onto our message table: MMSG dc.b 'EPIC LED XTRAVAGANZA 9000!',CR,LF,0 MMSG0 dc.b '[.] [.] [.] [.]',CR,LF,0 The idea was to edit this message at runtime to reflect the state of the LEDs. However, since the program resides in the EPROM, and the EPROM is read-only, this would not be possible. So a decision was made to reserve a chunk of RAM space into which the readonly message could be copied at the start of our subroutine. The message could then be edited at runtime. So in addition to the memory-mapped address of our LED array was added another pre-processor directive specifying a location in memory where the LED display string could be copied to: LEDARR EQU $8000 LEDMEM EQU $10A00 Now finally we could write the subroutine itself. First the registers are backed up. Net the LED array is initialized by copying 0 into LEDARR. The LED display message is copied from the EPROM to RAM and its effective address is loaded into a0. The polling loop consists of reading in a character from the ACIA and comparing the value read in with ASCII characters 1 4. If a match is found then the bit location corresponding to the key press value minus one (bit locations 0 3) are tested to see if the bit is set. If the bit is set the LED is turned off, otherwise the LED is turned on, thus toggling the LED with successive key presses. The address in a0 is incremented by an appropriate byte-sized offset in order to align it with the correct place in the LED display message. Finally the new LED state is written to LEDARR and either an X or a dot is written to the address stored in a0. Control flow branches back to the start of the loop if a match was found; otherwise the registers are restored and the program returns from the subroutine. The final source code for the M subroutine is listed below. (Minor modifications such as a goodbye message and an added entry into the Help menu are omitted for brevity.) 17

18 ** ** EPIC LED XTRAVAGANZA 9000! ** ~~~~~~~~~~~~~~~~~~~~~~~~~~ ** M movem.l d0-d1/a0-a1,-(sp) move.b #0,d1 lea MMSG0,a0 lea LEDMEM,a1 MCPMSG move.b (a0)+,(a1)+ tst.b (a0) bne MCPMSG M0 move.b d1,ledarr lea LEDMEM,a0 CALL CALL WRSTR RACIA M1 cmp.b #'1',d0 bne M2 btst #0,d1 beq M1SET M1RST and.b #%1110,d1 adda #1,a0 move.b #'.',(a0) bra M0 M1SET or.b #%0001,d1 adda #1,a0 move.b #'X',(a0) bra M0 M2 cmp.b #'2',d0 bne M3 btst #1,d1 beq M2SET M2RST and.b #%1101,d1 adda #5,a0 move.b #'.',(a0) bra M0 M2SET or.b #%0010,d1 adda #5,a0 move.b #'X',(a0) bra M0 M3 cmp.b #'3',d0 bne M4 btst #2,d1 beq M3SET M3RST and.b #%1011,d1 adda #9,a0 move.b #'.',(a0) bra M0 M3SET or.b #%0100,d1 adda #9,a0 move.b #'X',(a0) bra M0 M4 cmp.b bne #'4',d0 MRTS btst beq #3,d1 M4SET 18

19 M4RST and.b #%0111,d1 adda #13,a0 move.b #'.',(a0) bra M0 M4SET or.b #%1000,d1 adda #13,a0 move.b #'X',(a0) bra M0 MRTS movem.l (sp)+,d0-d1/a0-a1 move.b #0,LEDARR rts PAGE 19

20 Part 4 Source Code 4.1 GAL A PALASM TITLE GALA PATTERN template.pds REVISION 3 AUTHOR COMPANY Mikhail Volkov, Niall Murphy, Wang Yunfeng Trinity College Dublin DATE CHIP GAL1 PAL22V10 ; ; PINS ; PIN 1 PIN 2 PIN 3 PIN 4 ;PIN 5 ;PIN 6 PIN 7 ;PIN 8 ;PIN 9 PIN 10 PIN 11 PIN 13 PIN 14 PIN 15 PIN 16 PIN 17 PIN 18 PIN 19 PIN 20 PIN 21 PIN 22 PIN 23 CLK A11 EPROM_ACTIVE A13 A16 A19 RW AS ACIA0 ACIA1 RAM0 RAM1 EPROM DTACK ACIA_ACTIVE LED_RESET LED CLK2 ; ; STRINGS ; STRING LED_ACCESS STRING LED_SET '(/AS * A13)' '(/AS * /RW * A13)' ; EQUATIONS ; CLK2 := /CLK2 /EPROM = /AS * /A19 * /A16 * /A13 /RAM0 = /AS * /A19 * A16 * /A11 /RAM1 = /AS * /A19 * A16 * A11 /ACIA0 = /AS * A19 * /A11 /ACIA1 = /AS * A19 * A11 ACIA_ACTIVE = /ACIA0 + /ACIA1 /DTACK = (/EPROM * EPROM_ACTIVE) + /RAM0 + /RAM1 + LED_ACCESS LED_RESET = (/AS * RW * A13) LED = LED_SET + LED*/LED_RESET 20

21 4.2 GAL B PALASM TITLE GALB PATTERN template.pds REVISION 3 AUTHOR Mikhail Volkov, Niall Murphy, Wang Yunfeng COMPANY Trinity College Dublin DATE CHIP GAL1 PAL22V10 ; ; PINS ; PIN 1 PIN 2 PIN 3 PIN 4 PIN 5 ;PIN 6 PIN 7 PIN 8 PIN 9 ;PIN 10 ;PIN 11 ;PIN 13 PIN 14 PIN 15 PIN 16 PIN 17 PIN 18 ;PIN 19 PIN 20 PIN 21 PIN 22 PIN 23 CLK2 AS DS RW LSB FC0 FC1 FC2 OE WE CLK8 CLK4 VPA BSC_0 BSC_1 BSC_2 BSC_3 ; EQUATIONS ; /OE = RW * /DS /WE = /RW * /DS BSC_0 := LSB * /AS BSC_1 := BSC_0 * /AS BSC_2 := BSC_1 * /AS BSC_3 := BSC_2 * /AS /VPA = FC0 * FC1 * FC2 * /AS CLK4 := /CLK4 CLK8 := /CLK8*CLK4 + CLK8*/CLK4 21

22 4.3 GAL C PALASM TITLE GALC PATTERN template.pds REVISION 1 AUTHOR Mikhail Volkov, Niall Murphy, Wang Yunfeng COMPANY Trinity College Dublin DATE CHIP GAL1 PAL22V10 ; ; PINS ; PIN 1 PIN 2 PIN 3 PIN 4 PIN 5 PIN 6 PIN 7 PIN 8 PIN 9 ;PIN 10 ;PIN 11 ;PIN 13 PIN 14 PIN 15 PIN 16 PIN 17 PIN 18 PIN 19 PIN 20 PIN 21 ;PIN 22 ;PIN 23 CLK AS DS RW A15 D0 D1 D2 D3 L0 L0_RESET L1 L1_RESET L2 L2_RESET L3 L3_RESET ; EQUATIONS ; L0 = /AS * /DS * /RW * A15 * D0 + L0 * /L0_RESET L0_RESET = /AS * /DS * /RW * A15 * /D0 L1 = /AS * /DS * /RW * A15 * D1 + L1 * /L1_RESET L1_RESET = /AS * /DS * /RW * A15 * /D1 L2 = /AS * /DS * /RW * A15 * D2 + L2 * /L2_RESET L2_RESET = /AS * /DS * /RW * A15 * /D2 L3 = /AS * /DS * /RW * A15 * D3 + L3 * /L3_RESET L3_RESET = /AS * /DS * /RW * A15 * /D3 22

23 4.4 Board Test org $0 dc.l $40800 dc.l main org $1000 main jmp main 4.5 Control LED Test LED equ $02000 DELAY equ org $0 dc.l $40800 dc.l main org $1000 main move.b d0,led ; turn on LED move.l #DELAY,d1 ; initialise DELAY counter loop1 subq.l #1,d1 ; decrement bne loop1 ; loop until DELAY over move.b LED,d0 ; turn off LED move.l #DELAY,d1 ; initialise DELAY counter loop2 subq.l #1,d1 ; decrement bne loop2 ; loop until DELAY over bra main ; start again end 4.6 LED Array Marquee LEDARR equ $8000 DELAY equ org dc.l $0 $40800 dc.l main org $1000 main move.b # ,d0 ; store marquee move.l #DELAY,d1 ; initialise DELAY counter loop subq.l #1,d1 ; decrement bne loop ; loop until DELAY over move.b d0,ledarr ; write marquee to LED array rol.b #1,d0 ; rotate marquee bra loop ; start again end 23

24 4.7 ACIA Test RAM EQU $10000 ; RAM RAMMAX EQU RAM+4096 ; 4K A0DAT EQU $F0000 ; ACIA0 data register A0ST EQU A0DAT+1 ; ACIA0 status register A0CR EQU A0DAT+2 ; ACIA0 command register A0CTRL EQU A0DAT+3 ; ACIA0 control register A1DAT EQU $F0800 ; ACIA1 data register A1ST EQU A1DAT+1 ; ACIA1 status register A1CR EQU A1DAT+2 ; ACIA1 command register A1CTRL EQU A1DAT+3 ; ACIA1 control register LED EQU $2000 ; LED memory map DELAY EQU ; 1 second delay ORG $0 DC.L DC.L RAMMAX INIT rmsg dc.b $0A,$0D,'Enter a character: ',0 wmsg dc.b $0A,$0D,'You have entered ',0 ORG $1000 INIT0 MOVE.L #40000,D0 IACIA0 DBEQ D0,IACIA0 MOVE.B D0,A0ST TST.B A0DAT MOVE.B #$0B,A0CR MOVE.B #$18,A0CTRL MOVE.L (SP)+,D0 START MOVE.B D0,LED move.b #% ,d2 move.b d2,$8000 loop0 lea rmsg,a0 loop1 move.b (a0)+,d0 bsr wacia tst.b d0 bne loop1 bsr racia move.b d0,d1 loop2 lea wmsg,a0 move.b (a0)+,d0 bsr wacia tst.b d0 bne loop2 move.b d1,d0 bsr wacia rol.b #1,d2 move.b d2,$8000 bra loop0 24

25 * subroutine to read a char from the ACIA * at eit: D0 = character [ASCII] RACIA BTST.B #3,A0ST ;loop until... BEQ.S RACIA ;ACIA ready MOVE.B A0DAT,D0 ;move char in ACIA to d0 ANDI.L #$7F,D0 ;clear parity bit RTS * subroutine to write a char to the ACIA * at entry: D0 = character to be written [ASCII] WACIA BTST.B #4,A0ST ;loop until... BEQ.S WACIA ;data register empty MOVE.B D0,A0DAT ;move char in D0 into the ACIA RTS 25

Computer Architecture 5.1. Computer Architecture. 5.2 Vector Address: Interrupt sources (IS) such as I/O, Timer 5.3. Computer Architecture

Computer Architecture 5.1. Computer Architecture. 5.2 Vector Address: Interrupt sources (IS) such as I/O, Timer 5.3. Computer Architecture License: http://creativecommons.org/licenses/by-nc-nd/3./ Hardware interrupt: 5. If in an eternal device (for eample I/O interface) a predefined event occurs this device issues an interrupt request to

More information

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview CPE/EE 421/521 Fall 2004 Chapter 4 The 68000 CPU Hardware Model Dr. Rhonda Kay Gaede UAH Fall 2004 1 The 68000 CPU Hardware Model - Overview 68000 interface Timing diagram Minimal configuration using the

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers: Motorola The CPU Hardware Model. Outline

Alex Milenkovich 1. CPE/EE 421 Microcomputers: Motorola The CPU Hardware Model. Outline Outline CPE/EE 421 Microcomputers: Motorola 68000 The CPU Hardware Model Instructor: Dr Aleksandar Milenkovic Lecture Notes 68000 interface Timing diagram Minimal configuration using the 68000 Extensions

More information

Chapter Operation Pinout Operation 35

Chapter Operation Pinout Operation 35 68000 Operation 35 Chapter 6 68000 Operation 6-1. 68000 Pinout We will do no construction in this chapter; instead, we will take a detailed look at the individual pins of the 68000 and what they do. Fig.

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers THE 68000 CPU HARDWARE MODEL Instructor: Dr Aleksandar Milenkovic Lecture Notes Lecture 19 CPE/EE 421/521 Microcomputers 1 THE 68000 CPU HARDWARE MODEL Chapter 4 68000 interface

More information

Digital Input and Output

Digital Input and Output Digital Input and Output Topics: Parallel Digital I/O Simple Input (example) Parallel I/O I/O Scheduling Techniques Programmed Interrupt Driven Direct Memory Access Serial I/O Asynchronous Synchronous

More information

6 Direct Memory Access (DMA)

6 Direct Memory Access (DMA) 1 License: http://creativecommons.org/licenses/by-nc-nd/3.0/ 6 Direct Access (DMA) DMA technique is used to transfer large volumes of data between I/O interfaces and the memory. Example: Disk drive controllers,

More information

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly. Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale

More information

Central Processing Unit. Steven R. Bagley

Central Processing Unit. Steven R. Bagley Central Processing Unit Steven R. Bagley Introduction So far looked at the technology underpinning computers Logic signals to cause things to happen, and represent numbers Boolean gates to combine and

More information

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

More information

INTERFACING THE ISCC TO THE AND 8086

INTERFACING THE ISCC TO THE AND 8086 APPLICATION NOTE INTERFACING THE ISCC TO THE 68 AND 886 INTRODUCTION The ISCC uses its flexible bus to interface with a variety of microprocessors and microcontrollers; included are the 68 and 886. The

More information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

Summer 2003 Lecture 21 07/15/03

Summer 2003 Lecture 21 07/15/03 Summer 2003 Lecture 21 07/15/03 Simple I/O Devices Simple i/o hardware generally refers to simple input or output ports. These devices generally accept external logic signals as input and allow the CPU

More information

538 Lecture Notes Week 1

538 Lecture Notes Week 1 538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:

More information

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085. (1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

More information

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals. 1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals. A typical communication link between the processor and

More information

Question Bank Microprocessor and Microcontroller

Question Bank Microprocessor and Microcontroller QUESTION BANK - 2 PART A 1. What is cycle stealing? (K1-CO3) During any given bus cycle, one of the system components connected to the system bus is given control of the bus. This component is said to

More information

INPUT-OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION INPUT-OUTPUT ORGANIZATION Peripheral Devices: The Input / output organization of computer depends upon the size of computer and the peripherals connected to it. The I/O Subsystem of the computer, provides

More information

Architecture of 8085 microprocessor

Architecture of 8085 microprocessor Architecture of 8085 microprocessor 8085 consists of various units and each unit performs its own functions. The various units of a microprocessor are listed below Accumulator Arithmetic and logic Unit

More information

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses

The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle. Address, Data and Control Buses EE 308 Spring 2013 The MC9S12 address, data and control buses The MC9S12 single-chip mode memory map Simplified write/read cycle The real MC9S12 multiplexed external bus Byte order in microprocessors How

More information

Module 12: Elementary Input/Output

Module 12: Elementary Input/Output Module 12: Elementary Input/Output I/O Concepts Typical Organization of an I/O Device Memory-mapped vs Isolated I/O Elementary output with latch and LED Elementary input with buffer and switch 7-segment

More information

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays

More information

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

More information

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

More information

AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS

AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS Q.2 a. Draw pin diagram and signal group diagram of 8085 microprocessor. (8) b. List out the various categories of the 8085 instructions. Give examples of the instructions for each group. (8) Data transfer

More information

Program Development. Chapter 5

Program Development. Chapter 5 Chapter 5 Program Development Expected Outcomes Distinguish between various codes in the programming language Explain the role of assembler and compiler Distinguish between different data types Use directive

More information

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60 M. Sc (CS) (II Semester) Examination, 2012-13 Subject: Computer System Architecture Paper Code: M.Sc-CS-203 Time: Three Hours] [Maximum Marks: 60 Note: Question Number 1 is compulsory. Answer any four

More information

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5. DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6502- MICROPROCESSORS AND MICROCONTROLLERS UNIT I: 8085 PROCESSOR PART A 1. What is the need for ALE signal in

More information

Programming Book for 6809 Microprocessor Kit

Programming Book for 6809 Microprocessor Kit Programming Book for 6809 Microprocessor Kit Wichit Sirichote, wichit.sirichote@gmail.com Image By Konstantin Lanzet - CPU collection Konstantin Lanzet, CC BY-SA 3.0, Rev1.2 March 2018 1 Contents Lab 1

More information

Microprocessor Architecture. mywbut.com 1

Microprocessor Architecture. mywbut.com 1 Microprocessor Architecture mywbut.com 1 Microprocessor Architecture The microprocessor can be programmed to perform functions on given data by writing specific instructions into its memory. The microprocessor

More information

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET

SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET 1 SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET Intel 8086/8088 Architecture Segmented Memory, Minimum and Maximum Modes of Operation, Timing Diagram, Addressing Modes, Instruction Set,

More information

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY CHAPTER 5 : Introduction to Intel 8085 Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY The 8085A(commonly known as the 8085) : Was first introduced in March 1976 is an 8-bit microprocessor with 16-bit address

More information

Subroutine. Chapter 8

Subroutine. Chapter 8 Chapter 8 Subroutine Expected Outcomes Describe and apply the stack for data storage Describe the process of subroutine in any programs Develop a subroutine and code Interpret subroutine process in the

More information

Z Z-280 MT8930, MT8992/3/4/5 MT8880 MT8888 MT8889 MT8980/1 MT8985, MT8986 (DIP-40) MT8986 (PLCC-44) MT8920B MT8952B

Z Z-280 MT8930, MT8992/3/4/5 MT8880 MT8888 MT8889 MT8980/1 MT8985, MT8986 (DIP-40) MT8986 (PLCC-44) MT8920B MT8952B MSAN-145 How to Interface Mitel Components to Parallel Bus CPUs TABL OF CONTNTS Introduction ISSU 1 August 1993 1.0 Group 1 Components 1.1 Interfacing to the 6802 1.2 Interfacing to the 6809 1.3 Interfacing

More information

9. PERIPHERAL CHIPS 9a

9. PERIPHERAL CHIPS 9a 9. PERIPHERAL CHIPS 9a 8255: Programmable Peripheral Interface. Draw the pin diagram of PPI 8255. Ans. The pin diagram of 8255 is shown in Fig. 9a. PA 3 4 PA 4 PA2 2 39 PA 5 PA 3 38 PA 6 PA 4 37 PA7 RD

More information

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

More information

Introduction read-only memory random access memory

Introduction read-only memory random access memory Memory Interface Introduction Simple or complex, every microprocessorbased system has a memory system. Almost all systems contain two main types of memory: read-only memory (ROM) and random access memory

More information

Chapter TEN. Memory and Memory Interfacing

Chapter TEN. Memory and Memory Interfacing Chapter TEN Memory and Memory Interfacing OBJECTIVES this chapter enables the student to: Define the terms capacity, organization, and speed as used in semiconductor memories. Calculate the chip capacity

More information

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to? ECE3710 Exam 2. Name _ Spring 2013. 5 pages. 102 points, but scored out of 100. You may use any non-living resource to complete this exam. Any hint of cheating will result in a 0. Part 1 Short Answer 1.

More information

Go Gators! Relax! May the Schwartz be with you!

Go Gators! Relax! May the Schwartz be with you! Page 1/12 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front of the test papers. If you need more room make a clearly indicated note on the front

More information

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?

More information

538 Lecture Notes Week 5

538 Lecture Notes Week 5 538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what

More information

SECTION 2 SIGNAL DESCRIPTION

SECTION 2 SIGNAL DESCRIPTION SECTION 2 SIGNAL DESCRIPTION 2.1 INTRODUCTION Figure 2-1 displays the block diagram of the MCF5206 along with the signal interface. This section describes the MCF5206 input and output signals. The descriptions

More information

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1

Module 3. Embedded Systems I/O. Version 2 EE IIT, Kharagpur 1 Module 3 Embedded Systems I/O Version 2 EE IIT, Kharagpur 1 Lesson 15 Interrupts Version 2 EE IIT, Kharagpur 2 Instructional Objectives After going through this lesson the student would learn Interrupts

More information

Digital IP Cell 8-bit Microcontroller PE80

Digital IP Cell 8-bit Microcontroller PE80 1. Description The is a Z80 compliant processor soft-macro - IP block that can be implemented in digital or mixed signal ASIC designs. The Z80 and its derivatives and clones make up one of the most commonly

More information

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING QUESTION BANK Subject Code : EC307 Subject Name : Microprocessor and Interfacing Year & Sem : III Year, V Sem

More information

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION Introduction A general purpose computer should have the ability to exchange information with a wide range of devices in varying environments. Computers

More information

UNIT - II PERIPHERAL INTERFACING WITH 8085

UNIT - II PERIPHERAL INTERFACING WITH 8085 UNIT - II PERIPHERAL INTERFACING WITH 8085 Peripheral Interfacing is considered to be a main part of Microprocessor, as it is the only way to interact with the external world. The interfacing happens with

More information

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic

More information

INPUT-OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION 1 INPUT-OUTPUT ORGANIZATION Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes of Transfer Priority Interrupt Direct Memory Access Input-Output Processor Serial Communication 2

More information

Tutorial 1 Microcomputer Fundamentals

Tutorial 1 Microcomputer Fundamentals Tutorial 1 Microcomputer Fundamentals Question 1 What do these acronyms mean? (a) CPU? (b) ROM? (c) EPROM? (d) RWM? (e) RAM? (f) I/O? What role does the CPU play in a computer system? Why is ROM an essential

More information

3.0 BUS CONTROLLER ARCHITECTURE

3.0 BUS CONTROLLER ARCHITECTURE 3.0 BUS CONTROLLER ARCHITECTURE The S MMIT bus controller (SBC) is an interface device linking a MIL-STD-1553 serial data bus to a host microprocessor and/or subsystem. The SBC s architecture is based

More information

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS UNIT I INTRODUCTION TO 8085 8085 Microprocessor - Architecture and its operation, Concept of instruction execution and timing diagrams, fundamentals of

More information

8086 Interrupts and Interrupt Responses:

8086 Interrupts and Interrupt Responses: UNIT-III PART -A INTERRUPTS AND PROGRAMMABLE INTERRUPT CONTROLLERS Contents at a glance: 8086 Interrupts and Interrupt Responses Introduction to DOS and BIOS interrupts 8259A Priority Interrupt Controller

More information

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control, UNIT - 7 Basic Processing Unit: Some Fundamental Concepts, Execution of a Complete Instruction, Multiple Bus Organization, Hard-wired Control, Microprogrammed Control Page 178 UNIT - 7 BASIC PROCESSING

More information

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n

UART Register Set. UART Master Controller. Tx FSM. Rx FSM XMIT FIFO RCVR. i_rx_clk o_intr. o_out1 o_txrdy_n. o_out2 o_rxdy_n i_cs0 i_cs1 i_ads_n October 2012 Reference Design RD1138 Introduction The Universal Asynchronous Receiver/Transmitter (UART) performs serial-to-parallel conversion on data characters received from a peripheral device or a

More information

CS401 - Computer Architecture and Assembly Language Programming Glossary By

CS401 - Computer Architecture and Assembly Language Programming Glossary By CS401 - Computer Architecture and Assembly Language Programming Glossary By absolute address : A virtual (not physical) address within the process address space that is computed as an absolute number.

More information

Allmost all systems contain two main types of memory :

Allmost all systems contain two main types of memory : Memory Interface Allmost all systems contain two main types of memory : read-only memory (ROM) system software and permanent system data random access memory (RAM) or read/write memory application software

More information

May the Schwartz be with you!

May the Schwartz be with you! Department of Electrical & Computer Engineering Tuesday 27 June 17 29-Sep-17 3:54 PM Page 1/13 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front

More information

I/O Organization John D. Carpinelli, All Rights Reserved 1

I/O Organization John D. Carpinelli, All Rights Reserved 1 I/O Organization 1997 John D. Carpinelli, All Rights Reserved 1 Outline I/O interfacing Asynchronous data transfer Interrupt driven I/O DMA transfers I/O processors Serial communications 1997 John D. Carpinelli,

More information

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book BUILDING BLOCKS OF A BASIC MICROPROCESSOR Part PowerPoint Format of Lecture 3 of Book Decoder Tri-state device Full adder, full subtractor Arithmetic Logic Unit (ALU) Memories Example showing how to write

More information

Alex Milenkovich 1. CPE/EE 421 Microcomputers: Motorola 68000: Assembly Language and C. Outline

Alex Milenkovich 1. CPE/EE 421 Microcomputers: Motorola 68000: Assembly Language and C. Outline Outline CPE/EE 421 Microcomputers: Motorola 68: Assembly Language and C Instructor: Dr Aleksandar Milenkovic Lecture Notes ACIA Example: Pseudo-code + Assembly Passing parameters In registers Passing by

More information

3. The MC6802 MICROPROCESSOR

3. The MC6802 MICROPROCESSOR 3. The MC6802 MICROPROCESSOR This chapter provides hardware detail on the Motorola MC6802 microprocessor to enable the reader to use of this microprocessor. It is important to learn the operation and interfacing

More information

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to

For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to For your convenience Apress has placed some of the front matter material after the index. Please use the Bookmarks and Contents at a Glance links to access them. Contents at a Glance About the Author...xi

More information

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics Chapter 4 Objectives Learn the components common to every modern computer system. Chapter 4 MARIE: An Introduction to a Simple Computer Be able to explain how each component contributes to program execution.

More information

Unit 5 DOS INTERRPUTS

Unit 5 DOS INTERRPUTS Unit 5 DOS INTERRPUTS 5.1 Introduction The DOS (Disk Operating System) provides a large number of procedures to access devices, files and memory. These procedures can be called in any user program using

More information

3 Volt Intel StrataFlash Memory to Motorola MC68060 CPU Design Guide

3 Volt Intel StrataFlash Memory to Motorola MC68060 CPU Design Guide 3 Volt Intel StrataFlash Memory to Motorola MC68060 CPU Design Guide Application Note 703 April 2000 Document Number: 292251-002 Information in this document is provided in connection with Intel products.

More information

The functional block diagram of 8085A is shown in fig.4.1.

The functional block diagram of 8085A is shown in fig.4.1. Lecture-13 Internal Architecture of Intel 05A The functional block diagram of 05A is shown in fig.4.1. INTA INTR RST7.5 RST5.5 RST6.5 TRAP SOD SID INTERRUPT SERIAL I/O (Internal Bus) FR(S) IR() B() C()

More information

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output 8085 SATISH CHANDRA What is a Microprocessor? The word comes from the combination micro and processor. Processor means a device that processes whatever. In this context, processor means a device that processes

More information

Accessing I/O Devices Interface to CPU and Memory Interface to one or more peripherals Generic Model of IO Module Interface for an IO Device: CPU checks I/O module device status I/O module returns status

More information

Experiment No. 5 MEMORY DESIGN USING STATIC RANDOM ACCESS MEMORY (RAM) ECE 441

Experiment No. 5 MEMORY DESIGN USING STATIC RANDOM ACCESS MEMORY (RAM) ECE 441 Experiment No. 5 MEMORY DESIGN USING STATIC RANDOM ACCESS MEMORY (RAM) ECE 441 Peter Chinetti October 30, 2013 1 Introduction 1.1 Purpose Date Performed: October 10,17, & 24, 2013 Partners: Zelin Wu Instructor:

More information

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure

EC 6504 Microprocessor and Microcontroller. Unit II System Bus Structure EC 6504 Microprocessor and Microcontroller Unit II 8086 System Bus Structure Syllabus: 8086 Signals Basic Configurations System bus timing System Design using 8086 IO Programming Introduction to multiprogramming

More information

The 80C186XL 80C188XL Integrated Refresh Control Unit

The 80C186XL 80C188XL Integrated Refresh Control Unit APPLICATION BRIEF The 80C186XL 80C188XL Integrated Refresh Control Unit GARRY MION ECO SENIOR APPLICATIONS ENGINEER November 1994 Order Number 270520-003 Information in this document is provided in connection

More information

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

We r e going to play Final (exam) Jeopardy! Answers: Questions: - 1 - . (0 pts) We re going to play Final (exam) Jeopardy! Associate the following answers with the appropriate question. (You are given the "answers": Pick the "question" that goes best with each "answer".)

More information

Memory & Simple I/O Interfacing

Memory & Simple I/O Interfacing Chapter 10 Memory & Simple I/O Interfacing Expected Outcomes Explain the importance of tri-state devices in microprocessor system Distinguish basic type of semiconductor memory and their applications Relate

More information

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 15 October 199 Professor in ECE 31-Dec-9 12:22 PM Page 1/ Instructions: Show all work on the front of the test papers. If you need more room, make a clearly

More information

UNIT-IV. The semiconductor memories are organized as two-dimensional arrays of memory locations.

UNIT-IV. The semiconductor memories are organized as two-dimensional arrays of memory locations. UNIT-IV MEMORY INTERFACING WITH 8086: The semi conductor memories are of two types: Static RAM Dynamic RAM The semiconductor memories are organized as two-dimensional arrays of memory locations. For Ex:

More information

Unit DMA CONTROLLER 8257

Unit DMA CONTROLLER 8257 DMA CONTROLLER 8257 In microprocessor based system, data transfer can be controlled by either software or hardware. To transfer data microprocessor has to do the following tasks: Fetch the instruction

More information

Computer Systems Organization

Computer Systems Organization The IAS (von Neumann) Machine Computer Systems Organization Input Output Equipment Stored Program concept Main memory storing programs and data ALU operating on binary data Control unit interpreting instructions

More information

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an Microcontroller Basics MP2-1 week lecture topics 2 Microcontroller basics - Clock generation, PLL - Address space, addressing modes - Central Processing Unit (CPU) - General Purpose Input/Output (GPIO)

More information

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14

The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14 The 9S12 in Expanded Mode - Using MSI logic to build ports Huang Chapter 14 Using MSI Logic To Build An Output Port Many designs use standard MSI logic for microprocessor expansion This provides an inexpensive

More information

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices, CISC and RISC processors etc. Knows the architecture and

More information

PIO 8255 (cont..) M Krishna kumar MAM/M3/LU9e/V1/2004 1

PIO 8255 (cont..) M Krishna kumar MAM/M3/LU9e/V1/2004 1 PIO 8255 (cont..) The parallel input-output port chip 8255 is also called as programmable peripheral input-output port. The Intel s 8255 is designed for use with Intel s 8-bit, 16-bit and higher capability

More information

Address connections Data connections Selection connections

Address connections Data connections Selection connections Interface (cont..) We have four common types of memory: Read only memory ( ROM ) Flash memory ( EEPROM ) Static Random access memory ( SARAM ) Dynamic Random access memory ( DRAM ). Pin connections common

More information

Freescale Semiconductor, Inc.

Freescale Semiconductor, Inc. Order this document by /D Software I 2 C Communications By Brad Bierschenk MMD Applications Engineering Austin, Texas Introduction I 2 C Overview The I 2 C (inter-integrated circuit) protocol is a 2-wire

More information

AT25PE40. 4-Mbit DataFlash-L Page Erase Serial Flash Memory ADVANCE DATASHEET. Features

AT25PE40. 4-Mbit DataFlash-L Page Erase Serial Flash Memory ADVANCE DATASHEET. Features 4-Mbit DataFlash-L Page Erase Serial Flash Memory Features ADVANCE DATASHEET Single 1.65V - 3.6V supply Serial Peripheral Interface (SPI) compatible Supports SPI modes 0 and 3 Supports RapidS operation

More information

CPE/EE 421 Microcomputers

CPE/EE 421 Microcomputers CPE/EE 421 Microcomputers Instructor: Dr Aleksandar Milenkovic Lecture Note S07 Outline Stack and Local Variables C Programs 68K Examples Performance *Material used is in part developed by Dr. D. Raskovic

More information

the enters state of the next m/c cycle, As indicated in the fig the HALT f/f is checked in state of the next m/c cycle if it is fount

the enters state of the next m/c cycle, As indicated in the fig the HALT f/f is checked in state of the next m/c cycle if it is fount Lecture-15 STATE TRANSITION DIAGRAM HALT state: (T HALT ): Whenever the HALT instruction is executed enters in to the HALT state the op code for HALT is 76H. Assume that an op code fetch m/c cycle is initiated

More information

VMEbus Vertical Interconnect Alan Jones

VMEbus Vertical Interconnect Alan Jones VMEbus Vertical Interconnect Alan Jones 1.0 INTRODUCTION The Vertical Interconnect module allows a standard VMEbus crate to be expanded, by accessing other remote VMEbus crates over a 60 MHz serial link.

More information

The D igital Digital Logic Level Chapter 3 1

The D igital Digital Logic Level Chapter 3 1 The Digital Logic Level Chapter 3 1 Gates and Boolean Algebra (1) (a) A transistor inverter. (b) A NAND gate. (c) A NOR gate. 2 Gates and Boolean Algebra (2) The symbols and functional behavior for the

More information

DP8420V 21V 22V-33 DP84T22-25 microcmos Programmable 256k 1M 4M Dynamic RAM Controller Drivers

DP8420V 21V 22V-33 DP84T22-25 microcmos Programmable 256k 1M 4M Dynamic RAM Controller Drivers DP8420V 21V 22V-33 DP84T22-25 microcmos Programmable 256k 1M 4M Dynamic RAM Controller Drivers General Description The DP8420V 21V 22V-33 DP84T22-25 dynamic RAM controllers provide a low cost single chip

More information

Basics of Microprocessor

Basics of Microprocessor Unit 1 Basics of Microprocessor 1. Microprocessor Microprocessor is a multipurpose programmable integrated device that has computing and decision making capability. This semiconductor IC is manufactured

More information

History and Basic Processor Architecture

History and Basic Processor Architecture History and Basic Processor Architecture History of Computers Module 1 Section 1 What Is a Computer? An electronic machine, operating under the control of instructions stored in its own memory, that can

More information

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Chapter 5 Input/Output Organization Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan Outline Accessing I/O Devices Interrupts Direct Memory Access Buses Interface

More information

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor Practical 1 Date : AIM : Introduction Of Microprocessor 8085. 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within µp to carry out the instruction, which has been decoded.

More information

Module 7: Address Registers & Array Processing

Module 7: Address Registers & Array Processing Module 7: Address Registers & Array Processing Special instructions for address registers CMPA, MOVEA, SUBA, ADDA LEA Understanding arrays Array applications 2006 munim@utm.my,athif@fke.utm.my,kamal@bip.utm.my

More information

AT45DB041E. 4-Mbit DataFlash (with Extra 128-Kbits), 1.65V Minimum SPI Serial Flash Memory. Features

AT45DB041E. 4-Mbit DataFlash (with Extra 128-Kbits), 1.65V Minimum SPI Serial Flash Memory. Features 4-Mbit DataFlash (with Extra 128-Kbits), 1.65V Minimum SPI Serial Flash Memory Features Single 1.65V - 3.6V supply Serial Peripheral Interface (SPI) compatible Supports SPI modes 0 and 3 Supports RapidS

More information

MB68k-100 Motherboard Test Procedure, C

MB68k-100 Motherboard Test Procedure, C MB68k-100 Motherboard Test Procedure, C Set Up Instructions:! DC power supply! Obtain 2 solid core jumper wires for testing o 1 length for pull-up wire, installing one end in A1CON161, pos 61 o 2 length

More information

Introduction to Microprocessor

Introduction to Microprocessor Introduction to Microprocessor The microprocessor is a general purpose programmable logic device. It is the brain of the computer and it performs all the computational tasks, calculations data processing

More information