I/O Interfacing. What we are going to learn in this session:

Size: px
Start display at page:

Download "I/O Interfacing. What we are going to learn in this session:"

Transcription

1 I/O Interfacing ECE 5: Digital System & Microprocessor What we are going to learn in this session: M6823 Parallel Interface Timer. egisters in the M6823. Port initialization method. How M6823 interfaces with various devices. Delay subroutine.

2 The M623 Parallel Interface/Timer M6823 Parallel Interface/Timer Used by M68 to communicate with external devices. Parallel data transfer. Has three ports: Port A, Port B, Port C. Each port is 8-bits long. Ports connect to devices. Ports need to be initialized before used. M6823 Datasheet 2

3 M6823 Interfacing Memory CS* M68k MAD (LED, Switches, Motor, 7-Segment, Keypad, etc.) Data Bus CS* Port A Device # M6823 Port B Device #2 Port C Device #3 How M6823 connects to M68k D-D7 D-D7 PA-PA7 DTACK* DTACK* /W* /W* PB-PB7 ESET* CLK CLK ESET* PC-PC7 A6-A23 MAD CS* A-A5 S-S5 (egister select pins) M68k M6823 3

4 M6823 Ports egisters in M6823 M6823 contains 23 registers. Each of the registers have a unique address that refers to them. To initialize ports, some registers need to be configured. Port General Control egister. Port X Control egister (A, B). Port X Data Direction egister (A, B, C). Port X Data egister (A, B, C). 4

5 PGC Port General Control egister. Used to set the operation of Port A & Port B. You only need to know (and use) Mode. #$,PGC PGC Settings PGC= Mode Description $ Unidirectional 8-bit transfer (Port A, Port B) $4 Unidirectional 6-bit transfer (Port A + Port B) $8 2 Bidirectional 8-bit transfer on Port B, bit I/O on Port A. $C 3 Bidirectional 6-bit transfer (Port A + Port B) 5

6 Port X Control egister Used to set buffering of input/output on PXD. Three modes: Mode. Mode. Mode X. You only need to know (and use) mode X. PXC Settings PXC= Sub-mode Description $ Double-buffered input $4 Double-buffered output $8 X Bit I/O 6

7 Port X Data Direction egister Used to specify the direction of data transfer for each bit in the port. Two states: If PXDD bit =, will be set as input. If PXDD bit =, will be set as output. Port X Data egister Contains the data sent/received to/from devices. Each PXD carries 8-bits of data. There are three data registers in the M6823: PAD, PBD, PCD. 7

8 Port Initialization To perform port initialization: Assign the register addresses to a unique name. PGC must be set to #$. PXC must be set to #$8. Set PXDD to input or output. Port Initialization Example Port Address PGC $A PAC $AD PBC $AF PADD $A5 PBDD $A7 PCDD $A9 PAD $A PBD $A3 PCD $A9 STAT OG $XXXXXX PGC EQU $A PAC EQU $AD PBC EQU $AF PADD EQU $A5 PBDD EQU $A7 PCDD EQU $A9 PAD EQU $A PBD EQU $A3 PCD EQU $A9 #$,PGC #$8,PAC/PBC #$XX,PADD/PBDD/PCDD (DEPENDING ON THE H/W) 8

9 6823 Interfacing M6823 Interfacing M6823 interfacing is similar to memory interfacing in last chapter. Instead of interfacing memory, M6823 is interfaced. A-A5 is reserved for M6823, the rest used for decoder. 9

10 Example: Full Decoding Interface M6823 with M68k so that its base address is $A5. Discussion For M6823 interfacing, 5 lines are automatically reserved for M6823.

11 Step : Allocate Address Line A23 A22 A2 A2 A9 A8 A7 A6 A5 A4 A3 A2 A A A9 A8 A7 A6 A5 A4 A3 A2 A A X X X X X 5 lines allocated UDS/LDS (reserved) Step 2: Set Base Address A23 A22 A2 A2 A9 A8 A7 A6 A5 A4 A3 A2 A A A9 A8 A7 A6 A5 A4 A3 A2 A A X X X X X A 5 UDS/LDS (reserved)

12 Step 3: Find Lower ange A23 A22 A2 A2 A9 A8 A7 A6 A5 A4 A3 A2 A A A9 A8 A7 A6 A5 A4 A3 A2 A A A 5 Step 4: Find Upper ange A23 A22 A2 A2 A9 A8 A7 A6 A5 A4 A3 A2 A A A9 A8 A7 A6 A5 A4 A3 A2 A A A 5 3 F 2

13 Step 5: Design Decoder A23 A22 A2 A2 A9 A8 A7 A6 A5 A4 A3 A2 A A A9 A8 A7 A6 A 5 SELIO* NAND NAND NAND A23 A6 A5 A8 A7 A6 AS* Memory Block Diagram $ unused Interfaced with M68k (M6823 I/O) $A5 $A53F (Lower ange) (Upper ange) unused $FFFFFF 3

14 Sample Programs LEDs & Switches 4

15 Example Example : Set LED A set of LEDs are connected to Port B in M6823. Write a program that turns on LED3 and LED4, and turns off the rest. Port Address PGC $8 PAC $85 PBC $87 PADD $89 PBDD $8D PCDD $8F PAD $8 PBD $83 PCD $89 M6823 PB PB PB2 PB3 PB4 PB5 PB6 PB7 LED LED LED2 LED3 LED4 LED5 LED6 LED7 5

16 Discussion Port B should be initialized before being used. To turn on LED, the voltage at Port B bits should be high. To turn off LED, the voltage at Port B should be low. LED Operation A B A B LED Zero biased (OFF) everse biased (OFF) Forward biased (ON) Zero biased (OFF) 6

17 Solution STAT OG $ PGC EQU $8 PBC EQU $87 PBDD EQU $8D PBD EQU $83 INIT #$,PGC #$8,PBC #$FF,PBDD ONLED #%,PBD END STAT Example : Set LED M6823 PB PB PB2 PB3 PB4 PB5 PB6 PB7 LED LED LED2 LED3 LED4 LED5 LED6 LED7 7

18 Example 2 Example 2: ead Switches & Output to LED A set of switches are connected to Port A, and a set of LEDs are connected to Port B in M6823. Write a program that reads the value in the switches and turns on the respective LEDs. 8

19 Switch Operation +5V Switch A OPEN A CLOSE Switch Operation +5V A Switch A OPEN CLOSE 9

20 Circuit Diagram +5V M6823 PA PB PA PB PA2 PB2 PA3 PB3 PA4 PB4 PA5 PB5 PA6 PB6 PA7 PB7 LED LED LED2 LED3 LED4 LED5 LED6 LED7 Port Assignments Port Address PGC $A PAC $AD PBC $AF PADD $A5 PBDD $A7 PCDD $A9 PAD $A PBD $A3 PCD $A9 2

21 Discussion Both Port A & B should be initialized before being used. When the switch is OPEN, 5V is passed to M6823 (logic high). When the switch is CLOSE, V is passed to M6823 (logic low). Solution Initialize Ports INIT #$,PGC #$8,PAC #$8,PBC #$,PADD #$FF,PBDD 2

22 Solution Solve Problem LOOP PAD,D D,PBD BA LOOP Solution Complete Program STAT OG $ PGC EQU $A PAC EQU $AD PBC EQU $AF PADD EQU $A5 PBDD EQU $A7 PAD EQU $A PAD EQU $A3 INIT #$,PGC #$8,PAC #$8,PBC #$,PADD #$FF,PBDD LOOP PAD,D D,PBD BA LOOP END STAT 22

23 Sample Output +5V M6823 PA PB PA PB PA2 PB2 LED LED LED2 PA3 PB3 LED3 PA4 PB4 LED4 PA5 PB5 LED5 PA6 PA7 PB6 PB7 LED6 LED7 PAD D PBD 7-Segment 23

24 7-Segment Consists of 7-LEDs arranged together. Can display numbers and characters. Each segment is marked with a letter (a to g). To display characters, need to turn on/off certain segments. Also has E (enable) pin to turn on/off 7-segment. Interfacing 7-Segment with M6823 To interface with M6823, each segment (a to g) is connected to a port in M6823. The E signal must also be connected to a port to enable/disable the 7-segment. 24

25 7-Segment Types There are two types of 7-segment displays: Common cathode. Common anode. Each type differs in how they behave with certain inputs. Common Cathode 7-Segment Input (from M6823) E E Input Output OFF ON OFF ON 25

26 Example: Interfacing CC 7-Segment with M6823 (No Transistor) M6823 B B B2 B3 B4 B5 B6 B7 a b c d e f g E (Common cathode) To turn on the 7-segment, E must be set to, and the input to be turned on must be set to. Example: Interfacing CC 7-Segment with M6823 (With Transistor) M6823 B B B2 B3 B4 B5 B6 a b c d e f g B7 To turn on the 7-segment, E must be set to, and the input to be turned on must be set to. By setting E to, the transistor is turned ON, providing a path to GND. E (Common cathode) 26

27 Displaying Numbers: CC7S (No Transistor) E a X b c d e f g Number X X X X X X None Displaying Numbers: CC7S (with Transistor) E a X b c d e f g Number X X X X X X None

28 Common Anode 7-Segment E Input (to M6823) E Input Output OFF OFF ON OFF Example: Interfacing CA 7-Segment with M6823 M6823 B B B2 B3 B4 B5 B6 B7 a b c d e f g E (Common anode) To turn on the 7-segment, E must be set to, and the input to be turned on must be set to. 28

29 Displaying Numbers: CA7S (No Transistor) E a X b c d e f g Number X X X X X X None Example 29

30 Example: Displaying C on 7-Seg M6823 B B B2 B3 B4 B5 B6 a= b= c= d= e= f= g= B7 E= #$,PGC #$8,PBC #$FF,PBDD ULANG #$B9,PBD BA ULANG (Common cathode) Displaying More Numbers/Characters 7-Segments can also be grouped together to display multiple numbers/characters. Usually done using a technique called multiplexing. 3

31 Interfacing 2 7-Segments with M6823 M6823 B B B2 a b c a b c B3 d d B4 e e B5 f f B6 g g B7 A A E E2 (Common cathode) Example 2 3

32 Example: Displaying on Multiple 7-Segs Write a program to display 2 on 2 7- Segment displays. The circuit diagram is shown. Example: Displaying 2 on 2 7-Segments M6823 B B B2 a b c a b c B3 d d B4 e e B5 f f B6 g g B7 A A E E2 (Common cathode) 32

33 Step : Init Ports #$,PGC #$8,PAC #$8,PBC #$FF,PADD #$FF,PBDD Step 2: Activate E2, Send First Number #$,PAD * activate E2 #$5B,PBD * display 2 BS DELAY * delay for a while to * allow 7-seg to * turn on. 33

34 Example: Displaying 2 on 2 7-Segments B= a a B= b b B2= c c B3= B4= d e OFF d e B5= f f B6= g g B7 A A E = (off) E2 = (on) (Common cathode) M6823 Step 2: Activate E, Send Second Number #$2,PAD * activate E #$6,PBD * display BS DELAY * delay for a while to * allow 7-seg to * turn on. 34

35 Example: Displaying 2 on 2 7-Segments B= a a B= b b B2= c c B3= B4= d e d e OFF B5= f f B6= g g B7 A A E = (on) E2 = (off) (Common cathode) M6823 Step 3: Activate E2 Back, Send First Number Again #$,PAD * activate E2 #$5B,PBD * display 2 BS DELAY * delay for a while to * allow 7-seg to * turn on. 35

36 Example: Displaying 2 on 2 7-Segments B= a a B= b b B2= c c B3= B4= d e OFF d e B5= f f B6= g g B7 A A E = (off) E2 = (on) (Common cathode) M6823 Discussion Using multiplexing, only one digit may be turned on at one time. But, if the delay is fast enough (<ms), our eyes won t be able to catch the change. 36

37 Example: Displaying 2 on 2 7-Segments M6823 B B B2 a b c a b c B3 d d B4 e e B5 f f B6 g g B7 A A E E2 (Common cathode) Complete Program OG $8C DELAY MOVE.L #5,D7 DELLOOP SUB.L #,D7 CMP.L #,D7 BNE DELLOOP TS STAT OG $8D INIT #$,PGC #$8,PAC #$8,PBC #$3,PADD #$7F,PBDD BEGIN #$,PAD #$5B,PBD BS DELAY PGC EQU $ PADD EQU $5 PBDD EQU $7 PCDD EQU $9 PAD EQU $ PBD EQU $3 PCD EQU $9 PAC EQU $D PBC EQU $F BS BA END #$2,PAD #$6,PBD DELAY BEGIN STAT 37

38 Example 2 Example: Displaying on 5 7-Segs. A set of 7-segment displays are connected on Port A and Port B in M6823. Write a program to display the message HELLO on the 7-segment display. 38

39 Circuit Diagram M6823 A A A2 A3 A4 A5 A6 A7 B B B2 B3 B4 B5 B6 B7 E4 E3 E2 E E Algorithm Turn on E4, Display H. Delay for a while. Turn on E3, Display E. Delay for a while. Turn on E2, Display L. Delay for a while. Turn on E, Display L. Delay for a while. Turn on E, Display O. Delay for a while. Do E4 again. 39

40 Character H A = B = C = D = E = F = G = O #%,PBD #$76,PBD Character E A = B = C = D = E = F = G = O #%,PBD #$79,PBD 4

41 Character L A = B = C = D = E = F = G = O #%,PBD #$39,PBD Character H A = B = C = D = E = F = G = O #%,PBD #$3F,PBD 4

42 Program OG $8C DELAY MOVE.L #5,D7 * 8 MS DELAY DELLOOP SUB.L #,D7 CMP.L #,D7 BNE DELLOOP TS STAT OG $8D PGC EQU $ PADD EQU $5 PBDD EQU $7 PAD EQU $ PBD EQU $3 PAC EQU $D PBC EQU $F INIT #$,PGC #$8,PAC #$8,PBC #$FF,PADD #$FF,PBDD HELLO #$F,PAD * ACTIVATE E4 #$76,PBD * DISPLAY H BS DELAY #$7,PAD * ACTIVATE E3 #$79,PBD * DISPLAY E BS DELAY #$B,PAD * ACTIVATE E2 #$39,PBD * DISPLAY L BS DELAY #$D,PAD * ACTIVATE E #$39,PBD * DISPLAY L BS DELAY #$E,PAD * ACTIVATE E #$3F,PBD * DISPLAY O BS DELAY BA END HELLO STAT 7-Segment + BCD Decoder 42

43 7-Segment + BCD Decoder A BCD 7-Segment decoder can be used to simplify the interface to M6823. Just send a BCD number, and it will be automatically displayed at 7-segment. Also reduces the number of connections required to display 7-segment values. Example: 7-Segment + BCD Decoder M6823 B B B2 B3 B4 BCD 7-Seg Decoder a b c d e a b c d e B5 f f B6 g g B7 A A E E2 (Common cathode) 43

44 BCD Decoder I/O B3 B2 B B Number Example 3 44

45 Displaying 2 on 7-Segments A circuit is wired as in the next figure. Write a program that displays 2 on the 7-Segment. Example: 7-Segment + BCD Decoder M6823 B B B2 B3 B4 B5 BCD 7-Seg Decoder a b c d e f a b c d e f B6 g g B7 A A E E2 (Common cathode) 45

46 Step : Init Ports #$,PGC #$8,PAC #$8,PBC #$FF,PADD #$FF,PBDD Step 2: Activate E2, Send First Number #$,PAD * activate E2 #$2,PAD * display 2 BS DELAY * delay for a * while to allow 7-seg * to turn on. 46

47 Example: Displaying 2 on 2 7-Segments B= B= B2= B3= B4 BCD 7-Seg Decoder a b c d e OFF a b c d e B5 f f B6 g g B7 (Common cathode) A E = (off) A E2 = (on) M6823 Step 2: Activate E, Send Second Number #$2,PAD * activate E #$,PAD * display BS DELAY * delay for a while * to allow 7-seg * to turn on. 47

48 Example: Displaying 2 on 2 7-Segments B= B= B2= B3= B4= BCD 7-Seg Decoder a b c d e a b c d e OFF B5= f f B6= g g B7 (Common cathode) A E = (on) A E2 = (off) M6823 Step 4: Activate E2 Back, Send First Number Again #$,PAD * activate E2 #$2,PAD * display 2 BS DELAY * delay for a * while to allow 7-seg * to turn on. 48

49 Example: Displaying 2 on 2 7-Segments B= B= B2= B3= B4 BCD 7-Seg Decoder a b c d e OFF a b c d e B5 f f B6 g g B7 (Common cathode) A E = (off) A E2 = (on) M6823 Discussion Using multiplexing, only one digit may be turned on at one time. But, if the delay is fast enough (<ms), our eyes won t be able to catch the change. 49

50 Example: Displaying 2 on 2 7-Segments M6823 B B B2 B3 B4 B5 BCD 7-Seg Decoder a b c d e f a b c d e f B6 g g B7 A A E E2 (Common cathode) Complete Program OG $8C DELAY MOVE.L #5,D7 DELLOOP SUB.L #,D7 CMP.L #,D7 BNE DELLOOP TS STAT OG $8D PGC EQU $ PADD EQU $5 PBDD EQU $7 PCDD EQU $9 PAD EQU $ PBD EQU $3 PCD EQU $9 PAC EQU $D PBC EQU $F INIT #$,PGC #$8,PAC #$8,PBC #$FF,PADD #$FF,PBDD BEGIN #$,PAD #$2,PBD BS DELAY #$2,PAD #$,PBD BS DELAY BA BEGIN END STAT 5

51 DC Motor Controlling DC Motors Has two terminals (positive/negative), connected to DC voltage. If positive voltage applied at positive terminal, motor moves clockwise. If negative voltage applied at positive terminal, motor moves anti-clockwise. 5

52 DC Motor +2V +2V with + = clockwise + with - = anti-clockwise Interfacing DC Motor with M6823 Single Direction +2V M6823 A A + A2 A3 A4 A5 - #$,PGC #$8,PAC #$FF,PADD #$,PAD A6 A7 52

53 Interfacing DC Motor with M6823 (Two Directions) +2V A T T2 A2 + - A T4 T3 A3 PNP transistors are turned on by at base. NPN transistors are turned on by at base. Moving the Motor Clockwise #$,PGC #$8,PAC #$FF,PADD #%,PAD (Turn on T and T3) 53

54 Interfacing DC Motor with M6823 (Clockwise) +2V A T T2 A2 + - A T4 T3 A3 Positive meets positive, clockwise direction Moving the Motor Anti-clockwise #$,PGC #$8,PAC #$FF,PADD #%,PAD (Turn on T2 and T4) 54

55 Interfacing DC Motor with M6823 (Anti-clockwise) +2V A T T2 A2 + - A T4 T3 A3 Positive meets negative, anti-clockwise direction Keypad 55

56 Keypad A set of switches. CPU determines what button pressed by scanning each column in turn. Need to be de-bounced after each key press: Done using de-bouncing subroutine. Keypad P P P2 2 3 P P P6 * # P7 56

57 Step : Initialization Lets say Port A is connected to keypad. #$,PGC #$8,PAC #$F,PADD Step 2 Scan st Column P= P P2 2 3 P P P6 * # P7 57

58 Step 2: Scan st Column COL BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD AND.B CMP.B BEQ CMP.B BEQ CMP.B BEQ CMP.B BEQ BNE PBD,D #$F,D #$,D IS #$2,D IS4 #$4,D IS7 #$8,D ISSTA COL2 IS #,D BS WAIT #9,D3 TAP # BA COL IS4 #4,D BS WAIT #9,D3 TAP # BA COL IS7 #7,D BS WAIT #9,D3 TAP # BA COL ISSTA #$,D BS WAIT #9,D3 TAP # BA COL * #9,D3 and TAP # are used as an example to display the output to screen. eplace it with your own code. Step 3 Scan 2 nd Column P P= P2 2 3 P P P6 * # P7 58

59 Step 3: Scan 2 nd Column COL2 BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS2 CMP.B #$2,D BEQ IS5 CMP.B #$4,D BEQ IS8 CMP.B #$8,D BEQ IS BNE COL3 IS2 #2,D BS WAIT #9,D3 TAP # BA COL IS5 #5,D BS WAIT #9,D3 TAP # BA COL IS8 #8,D BS WAIT #9,D3 TAP # BA COL IS #,D BS WAIT #9,D3 TAP # BA COL Step 4 Scan 3 rd Column P P P2= 2 3 P P P6 * # P7 59

60 Step 4: Scan 3 rd Column COL3 BCL.B #,PBD BCL.B #,PBD BSET.B #2,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS3 CMP.B #$2,D BEQ IS6 CMP.B #$4,D BEQ IS9 CMP.B #$8,D BEQ ISHASH BNE COL IS3 #3,D BS WAIT #9,D3 TAP # BA COL IS6 #6,D BS WAIT #9,D3 TAP # BA COL IS9 #9,D BS WAIT #9,D3 TAP # BA COL ISHASH #,D BS WAIT #9,D3 TAP # BA COL Complete Program OG $8C DELAY #$F,D4 NEXTDEL SUB.B #,D4 BNE NEXTDEL WAIT PBD,D2 AND.B #$F,D2 CMP.B #$,D2 BNE WAIT TS STAT OG $8D PGC EQU $ PAC EQU $D PBC EQU $F PADD EQU $5 PBDD EQU $7 PCDD EQU $9 PAD EQU $ PBD EQU $3 PCD EQU $9 INIT #$,PGC #$8,PAC #$8,PBC #$F,PBDD #$,PBD COL BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS CMP.B #$2,D BEQ IS4 CMP.B #$4,D BEQ IS7 CMP.B #$8,D BEQ ISSTA BNE COL2 IS #,D BS WAIT #9,D3 TAP # BA COL IS4 #4,D BS WAIT #9,D3 TAP # BA COL IS7 #7,D BS WAIT #9,D3 TAP # BA COL ISSTA #$,D BS WAIT #9,D3 TAP # BA COL END STAT COL2 BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS2 CMP.B #$2,D BEQ IS5 CMP.B #$4,D BEQ IS8 CMP.B #$8,D BEQ IS BNE COL3 IS2 #2,D BS WAIT #9,D3 TAP # BA COL IS5 #5,D BS WAIT #9,D3 TAP # BA COL IS8 #8,D BS WAIT #9,D3 TAP # BA COL IS #,D BS WAIT #9,D3 TAP # BA COL COL3 BCL.B #,PBD BCL.B #,PBD BSET.B #2,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS3 CMP.B #$2,D BEQ IS6 CMP.B #$4,D BEQ IS9 CMP.B #$8,D BEQ ISHASH BNE COL IS3 #3,D BS WAIT #9,D3 TAP # BA COL IS6 #6,D BS WAIT #9,D3 TAP # BA COL IS9 #9,D BS WAIT #9,D3 TAP # BA COL ISHASH #,D BS WAIT #9,D3 TAP # BA COL 6

61 Example Example 4 Pressed P P P2 2 3 P P P6 * # P7 6

62 Step 2: Scan st Column COL BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD AND.B CMP.B BEQ CMP.B BEQ CMP.B BEQ CMP.B BEQ BNE PBD,D #$F,D #$,D IS #$2,D IS4 #$4,D IS7 #$8,D ISSTA COL2 IS #,D BS WAIT #9,D3 TAP # BA COL IS4 #4,D BS WAIT #9,D3 TAP # BA COL IS7 #7,D BS WAIT #9,D3 TAP # BA COL ISSTA #$,D BS WAIT #9,D3 TAP # BA COL Example 8 Pressed P P P2 2 3 P P P6 * # P7 62

63 Step 3: Scan 2 nd Column COL2 BCL.B #,PBD BCL.B #2,PBD BSET.B #,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS2 CMP.B #$2,D BEQ IS5 CMP.B #$4,D BEQ IS8 CMP.B #$8,D BEQ IS BNE COL3 IS2 #2,D BS WAIT #9,D3 TAP # BA COL IS5 #5,D BS WAIT #9,D3 TAP # BA COL IS8 #8,D BS WAIT #9,D3 TAP # BA COL IS #,D BS WAIT #9,D3 TAP # BA COL Example 6 Pressed P P P2 2 3 P P P6 * # P7 63

64 Step 4: Scan 3 rd Column COL3 BCL.B #,PBD BCL.B #,PBD BSET.B #2,PBD PBD,D AND.B #$F,D CMP.B #$,D BEQ IS3 CMP.B #$2,D BEQ IS6 CMP.B #$4,D BEQ IS9 CMP.B #$8,D BEQ ISHASH BNE COL IS3 #3,D BS WAIT #9,D3 TAP # BA COL IS6 #6,D BS WAIT #9,D3 TAP # BA COL IS9 #9,D BS WAIT #9,D3 TAP # BA COL ISHASH #,D BS WAIT #9,D3 TAP # BA COL Delay Subroutine 64

65 Delay Subroutine In some applications, we may need to delay the output before executing next instruction. Can be achieved using delay subroutine: Does some meaningless repetitive task over and over. Wastes processing time of M68k. Can be set to repeat until desired delay is achieved. Delay Subroutine Example DELAY MOVE.L #xxx,dn LOOP SUB.L #,Dn CMP.L #,Dn BNE LOOP TS 65

66 Calculating The Delay To calculate delay, you need to know the time required to execute each instruction: Instruction Clock Cycles to Complete Time Executed n times. MOVE.L 2.2s SUB.L 6.6s CMP.L 4.4s BNE.s TS 6.6s MHz T = /MHz = x -7 secs. Calculating the Delay M68k MHz For sec.,,, clock cycles are required.,, = ( )n,, = n n = (,, 28)/4 n = (,, 28)/4 = 249,999 66

67 Delay Subroutine Example s DELAY MOVE.L #249999,D6 LOOP SUB.L #,D6 CMP.L #,D6 BNE LOOP TS Calculating The Delay.25s To calculate delay, you need to know the time required to execute each instruction: Instruction Clock Cycles to Complete Time Executed n times. MOVE.L 2.2s SUB.L 6.6s CMP.L 4.4s BNE.s TS 6.6s MHz T = /MHz = x -7 secs. 67

68 Calculating the Delay For.25 sec., 2,5, clock cycles are required. 2,5, = ( )n 2,5, = n n = (2,5, 28)/4 n = (2,5, 28)/4 = 62,499 Delay Subroutine Example.25s DELAY MOVE.L #62499,D6 LOOP SUB.L #,D6 CMP.L #,D6 BNE LOOP TS 68

69 Implementing Delay STAT OG $9 INIT MOVEA.L #$,A6 * base address of pi/t #$8,$E(A6) * configure port B control reg to mode x #$FF,$6(A6) * configure port B data reg to o/p LOOP #$FF,$3 BS DELAY #$,$3 BS DELAY BA LOOP Turn on all LEDs, Wait second, Turn off all LEDs, Wait second. DELAY MOVE.L #249999,D7 DELLOOP SUB.L #,D7 CMP.L #,D7 BNE DELLOOP TS END STAT Conclusion 69

70 Conclusion The M6823 is a parallel interface used by M68k to connect with various devices. The M6823 has three ports, which can be configured to interface with many devices. To use the ports, it MUST be initialized first. Conclusion The delay subroutine is used to waste the CPU s time by telling it to do repetitive tasks. The delay format is basically the same, just adjust the counter to get the delay you want. 7

71 The End Please read: Antonakos, pg M6823 Datasheet Ablelogic, Abitec, VTES Manuals 7

ECE 372 Microcontroller Design

ECE 372 Microcontroller Design E.g. Port A, Port B Used to interface with many devices Switches LEDs LCD Keypads Relays Stepper Motors Interface with digital IO requires us to connect the devices correctly and write code to interface

More information

Chapter 9 MSI Logic Circuits

Chapter 9 MSI Logic Circuits Chapter 9 MSI Logic Circuits Chapter 9 Objectives Selected areas covered in this chapter: Analyzing/using decoders & encoders in circuits. Advantages and disadvantages of LEDs and LCDs. Observation/analysis

More information

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Logic Devices for Interfacing, The 8085 MPU Lecture 4 Logic Devices for Interfacing, The 8085 MPU Lecture 4 1 Logic Devices for Interfacing Tri-State devices Buffer Bidirectional Buffer Decoder Encoder D Flip Flop :Latch and Clocked 2 Tri-state Logic Outputs

More information

Quad 7-segment display board

Quad 7-segment display board Quad 7-segment display board www.matrixtsl.com EB008 Contents About this document 3 Board layout 3 General information 4 Circuit description 4 Protective cover 5 Circuit diagram 6 2 Copyright About this

More information

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD

S6B CH SEGMENT DRIVER FOR DOT MATRIX LCD 64 CH SEGMENT DRIVER FOR DOT MATRIX LCD June. 2000. Ver. 0.0 Contents in this document are subject to change without notice. No part of this document may be reproduced or transmitted in any form or by

More information

64CH SEGMENT DRIVER FOR DOT MATRIX LCD

64CH SEGMENT DRIVER FOR DOT MATRIX LCD 64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION The (TQFP type: S6B2108) is a LCD driver LSI with 64 channel output for dot matrix liquid crystal graphic display systems. This device consists of the

More information

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester Embedded Systems Interfacing PIC with external devices 7-Segment display Eng. Anis Nazer Second Semester 2016-2017 PIC interfacing The PIC needs to be connected to other devices such as: LEDs Switches

More information

Chapter 2. Digital Circuits

Chapter 2. Digital Circuits Chapter 2. Digital Circuits Logic gates Flip-flops FF registers IC registers Data bus Encoders/Decoders Multiplexers Troubleshooting digital circuits Most contents of this chapter were covered in 88-217

More information

UNIT V 8051 Microcontroller based Systems Design

UNIT V 8051 Microcontroller based Systems Design UNIT V 8051 Microcontroller based Systems Design INTERFACING TO ALPHANUMERIC DISPLAYS Many microprocessor-controlled instruments and machines need to display letters of the alphabet and numbers. Light

More information

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester

Embedded Systems. Interfacing PIC with external devices 7-Segment display. Eng. Anis Nazer Second Semester Embedded Systems Interfacing PIC with external devices 7-Segment display Eng. Anis Nazer Second Semester 2017-2018 PIC interfacing In any embedded system, the microcontroller should be connected to other

More information

Laboratory Exercise 4

Laboratory Exercise 4 Laboratory Exercise 4 Polling and Interrupts The purpose of this exercise is to learn how to send and receive data to/from I/O devices. There are two methods used to indicate whether or not data can be

More information

EECS150 - Digital Design Lecture 9 - CPU Microarchitecture. CMOS Devices

EECS150 - Digital Design Lecture 9 - CPU Microarchitecture. CMOS Devices EECS150 - Digital Design Lecture 9 - CPU Microarchitecture Feb 17, 2009 John Wawrzynek Spring 2009 EECS150 - Lec9-cpu Page 1 CMOS Devices Review: Transistor switch-level models The gate acts like a capacitor.

More information

CHAPTER1: Digital Logic Circuits

CHAPTER1: Digital Logic Circuits CS224: Computer Organization S.KHABET CHAPTER1: Digital Logic Circuits 1 Sequential Circuits Introduction Composed of a combinational circuit to which the memory elements are connected to form a feedback

More information

Experiment (6) 2- to 4 Decoder. Figure 8.1 Block Diagram of 2-to-4 Decoder 0 X X

Experiment (6) 2- to 4 Decoder. Figure 8.1 Block Diagram of 2-to-4 Decoder 0 X X 8. Objectives : Experiment (6) Decoders / Encoders To study the basic operation and design of both decoder and encoder circuits. To describe the concept of active low and active-high logic signals. To

More information

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER

ECB DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER ECB2212 - DIGITAL ELECTRONICS PROJECT BASED LEARNING PROJECT REPORT ON 7 SEGMENT DIGITAL STOP WATCH USING DECODER SUBMITTED BY ASHRAF HUSSAIN (160051601105) S SAMIULLAH (160051601059) CONTENTS >AIM >INTRODUCTION

More information

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10

Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10 School Course Name : : ELECTRICAL ENGINEERING 2 ND YEAR ELECTRONIC DESIGN LAB Review : 2 Release Date : 2019 Last Amendment : 2013 Course Code : SKEE 2742 Procedure Number : PK-UTM-FKE-(0)-10 School of

More information

1. Keyboard and Panel Switch Scanning DX7 CIRCUIT DESCRIPTION The 4 bits BO ~ B3 from the sub-cpu (6805S) are input to the decoder (40H138). The decoder output is sent to the keyboard transfer contacts

More information

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver

V6118 EM MICROELECTRONIC - MARIN SA. 2, 4 and 8 Mutiplex LCD Driver EM MICROELECTRONIC - MARIN SA 2, 4 and 8 Mutiplex LCD Driver Description The is a universal low multiplex LCD driver. The version 2 drives two ways multiplex (two blackplanes) LCD, the version 4, four

More information

Laboratory 8. Digital Circuits - Counter and LED Display

Laboratory 8. Digital Circuits - Counter and LED Display Laboratory 8 Digital Circuits - Counter and Display Required Components: 2 1k resistors 1 10M resistor 3 0.1 F capacitor 1 555 timer 1 7490 decade counter 1 7447 BCD to decoder 1 MAN 6910 or LTD-482EC

More information

Design and Implementation of Timer, GPIO, and 7-segment Peripherals

Design and Implementation of Timer, GPIO, and 7-segment Peripherals Design and Implementation of Timer, GPIO, and 7-segment Peripherals 1 Module Overview Learn about timers, GPIO and 7-segment display; Design and implement an AHB timer, a GPIO peripheral, and a 7-segment

More information

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore) Laboratory 11 Digital Displays and Logic (modified from lab text by Alciatore) Required Components: 2x lk resistors 1x 10M resistor 3x 0.1 F capacitor 1x 555 timer 1x 7490 decade counter 1x 7447 BCD to

More information

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops

PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops PHYSICS 5620 LAB 9 Basic Digital Circuits and Flip-Flops Objective Construct a two-bit binary decoder. Study multiplexers (MUX) and demultiplexers (DEMUX). Construct an RS flip-flop from discrete gates.

More information

Experiment 3: Basic Embedded System Analysis and Design

Experiment 3: Basic Embedded System Analysis and Design University of Jordan Faculty of Engineering and Technology Department of Computer Engineering Embedded Systems Laboratory 0907334 3 Experiment 3: Basic Embedded System Analysis and Design Objectives Empowering

More information

Chapter 3: Sequential Logic Systems

Chapter 3: Sequential Logic Systems Chapter 3: Sequential Logic Systems 1. The S-R Latch Learning Objectives: At the end of this topic you should be able to: design a Set-Reset latch based on NAND gates; complete a sequential truth table

More information

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE

82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE Y Y Y Y Y 82C55A CHMOS PROGRAMMABLE PERIPHERAL INTERFACE Compatible with all Intel and Most Other Microprocessors High Speed Zero Wait State Operation with 8 MHz 8086 88 and 80186 188 24 Programmable I

More information

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) COUNTERS One common requirement in digital circuits is counting, both forward and backward. Digital clocks and

More information

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus Part I 0. In this part of the lab you investigate the 164 a serial-in, 8-bit-parallel-out, shift register. 1. Press in (near the LEDs) a 164.

More information

MODULE 3. Combinational & Sequential logic

MODULE 3. Combinational & Sequential logic MODULE 3 Combinational & Sequential logic Combinational Logic Introduction Logic circuit may be classified into two categories. Combinational logic circuits 2. Sequential logic circuits A combinational

More information

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH

CPE 200L LABORATORY 3: SEQUENTIAL LOGIC CIRCUITS UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND: SR FLIP-FLOP/LATCH CPE 200L LABORATORY 3: SEUENTIAL LOGIC CIRCUITS DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING UNIVERSITY OF NEVADA, LAS VEGAS GOALS: Learn to use Function Generator and Oscilloscope on the breadboard.

More information

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science EECS 5 Fall 25 R. H. Katz SOLUTIONS Problem Set #3: Combinational and Sequential Logic

More information

EXPERIMENT 2: Elementary Input Output Programming

EXPERIMENT 2: Elementary Input Output Programming EXPERIMENT 2: Elementary Input Output Programming Objectives Introduction to the Parallel Input/Output (I/O) Familiarization to Interfacing with digital inputs and outputs such as switches, LEDs and 7-segment.

More information

64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION FEATURES 100 QFP-1420C

64CH SEGMENT DRIVER FOR DOT MATRIX LCD INTRODUCTION FEATURES 100 QFP-1420C INTRODUCTION The KS0108B is a LCD driver LSl with 64 channel output for dot matrix liquid crystal graphic display systems. This device consists of the display RAM, 64 bit data latch, 64 bit drivers and

More information

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam

CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam CS302 Digital Logic Design Solved Objective Midterm Papers For Preparation of Midterm Exam MIDTERM EXAMINATION Spring 2012 Question No: 1 ( Marks: 1 ) - Please choose one A SOP expression is equal to 1

More information

1. Synopsis: 2. Description of the Circuit:

1. Synopsis: 2. Description of the Circuit: Design of a Binary Number Lock (using schematic entry method) 1. Synopsis: This lab gives you more exercise in schematic entry, state machine design using the one-hot state method, further understanding

More information

PESIT Bangalore South Campus

PESIT Bangalore South Campus SOLUTIONS TO INTERNAL ASSESSMENT TEST 3 Date : 8/11/2016 Max Marks: 40 Subject & Code : Analog and Digital Electronics (15CS32) Section: III A and B Name of faculty: Deepti.C Time : 11:30 am-1:00 pm Note:

More information

16 Stage Bi-Directional LED Sequencer

16 Stage Bi-Directional LED Sequencer 16 Stage Bi-Directional LED Sequencer The bi-directional sequencer uses a 4 bit binary up/down counter (CD4516) and two "1 of 8 line decoders" (74HC138 or 74HCT138) to generate the popular "Night Rider"

More information

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Nate Pihlstrom, npihlstr@uccs.edu Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts) Objective The objective of lab assignments 5 through 9 are to systematically design and implement

More information

TRANSFER BETWEEN REGISTERS and THREE STATE LOGIC

TRANSFER BETWEEN REGISTERS and THREE STATE LOGIC TANSFE BETWEEN EGISTES and THEE STATE LOGIC Introduction Bus design is made using Three State Logic, implemented at circuit outputs For information transfer, usually are used three state registers, three

More information

T 2 : WR = 0, AD 7 -AD 0 (μp Internal Reg.) T 3 : WR = 1,, M(AB) AD 7 -AD 0 or BDB

T 2 : WR = 0, AD 7 -AD 0 (μp Internal Reg.) T 3 : WR = 1,, M(AB) AD 7 -AD 0 or BDB Lecture-17 Memory WRITE Machine Cycle: It also requires only T 1 to T 3 states. The purpose of memory write machine cycle is to store the contents of any of the 8085A register such as the accumulator into

More information

Digital Electronics II 2016 Imperial College London Page 1 of 8

Digital Electronics II 2016 Imperial College London Page 1 of 8 Information for Candidates: The following notation is used in this paper: 1. Unless explicitly indicated otherwise, digital circuits are drawn with their inputs on the left and their outputs on the right.

More information

CPS311 Lecture: Sequential Circuits

CPS311 Lecture: Sequential Circuits CPS311 Lecture: Sequential Circuits Last revised August 4, 2015 Objectives: 1. To introduce asynchronous and synchronous flip-flops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce

More information

Chapter 7 Memory and Programmable Logic

Chapter 7 Memory and Programmable Logic EEA091 - Digital Logic 數位邏輯 Chapter 7 Memory and Programmable Logic 吳俊興國立高雄大學資訊工程學系 2006 Chapter 7 Memory and Programmable Logic 7-1 Introduction 7-2 Random-Access Memory 7-3 Memory Decoding 7-4 Error

More information

Sequential Logic Basics

Sequential Logic Basics Sequential Logic Basics Unlike Combinational Logic circuits that change state depending upon the actual signals being applied to their inputs at that time, Sequential Logic circuits have some form of inherent

More information

Lab 17: Building a 4-Digit 7-Segment LED Decoder

Lab 17: Building a 4-Digit 7-Segment LED Decoder Phys2303 L.A. Bumm [Basys3 1.2.1] Lab 17 (p1) Lab 17: Building a 4-Digit 7-Segment LED Decoder In this lab you will make 5 test circuits in addition to the 4-digit 7-segment decoder. The test circuits

More information

Contents Circuits... 1

Contents Circuits... 1 Contents Circuits... 1 Categories of Circuits... 1 Description of the operations of circuits... 2 Classification of Combinational Logic... 2 1. Adder... 3 2. Decoder:... 3 Memory Address Decoder... 5 Encoder...

More information

IT T35 Digital system desigm y - ii /s - iii

IT T35 Digital system desigm y - ii /s - iii UNIT - III Sequential Logic I Sequential circuits: latches flip flops analysis of clocked sequential circuits state reduction and assignments Registers and Counters: Registers shift registers ripple counters

More information

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE

NORTHWESTERN UNIVERSITY TECHNOLOGICAL INSTITUTE NORTHWESTERN UNIVERSITY TECHNOLOGICL INSTITUTE ECE 270 Experiment #8 DIGITL CIRCUITS Prelab 1. Draw the truth table for the S-R Flip-Flop as shown in the textbook. Draw the truth table for Figure 7. 2.

More information

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES 1 Learning Objectives 1. Explain the function of a multiplexer. Implement a multiplexer using gates. 2. Explain the

More information

Registers and Counters

Registers and Counters Registers and Counters Clocked sequential circuit = F/Fs and combinational gates Register Group of flip-flops (share a common clock and capable of storing one bit of information) Consist of a group of

More information

ME 515 Mechatronics. Introduction to Digital Electronics

ME 515 Mechatronics. Introduction to Digital Electronics ME 55 Mechatronics /5/26 ME 55 Mechatronics Digital Electronics Asanga Ratnaweera Department of Faculty of Engineering University of Peradeniya Tel: 8239 (3627) Email: asangar@pdn.ac.lk Introduction to

More information

NT7108. Neotec Semiconductor Ltd. 新德科技股份有限公司 NT7108 LCD Driver. Copyright: NEOTEC (C)

NT7108. Neotec Semiconductor Ltd. 新德科技股份有限公司 NT7108 LCD Driver. Copyright: NEOTEC (C) Copyright: NEOTEC (C) 2002 http:// All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electric or mechanical,

More information

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory

Rensselaer Polytechnic Institute Computer Hardware Design ECSE Report. Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory RPI Rensselaer Polytechnic Institute Computer Hardware Design ECSE 4770 Report Lab Three Xilinx Richards Controller and Logic Analyzer Laboratory Name: Walter Dearing Group: Brad Stephenson David Bang

More information

Digital Clock. Perry Andrews. A Project By. Based on the PIC16F84A Micro controller. Revision C

Digital Clock. Perry Andrews. A Project By. Based on the PIC16F84A Micro controller. Revision C Digital Clock A Project By Perry Andrews Based on the PIC16F84A Micro controller. Revision C 23 rd January 2011 Contents Contents... 2 Introduction... 2 Design and Development... 3 Construction... 7 Conclusion...

More information

EEM Digital Systems II

EEM Digital Systems II ANADOLU UNIVERSITY DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EEM 334 - Digital Systems II LAB 3 FPGA HARDWARE IMPLEMENTATION Purpose In the first experiment, four bit adder design was prepared

More information

Counters

Counters Counters A counter is the most versatile and useful subsystems in the digital system. A counter driven by a clock can be used to count the number of clock cycles. Since clock pulses occur at known intervals,

More information

Lab #11: Register Files

Lab #11: Register Files Lab #11: Register Files ECE/COE 0501 Date of Experiment: 3/20/2017 Report Written: 3/22/2017 Submission Date: 3/27/2017 Nicholas Haver nicholas.haver@pitt.edu 1 H a v e r PURPOSE The purpose of this lab

More information

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Lab Manual for Computer Organization Lab

More information

Logic Design. Flip Flops, Registers and Counters

Logic Design. Flip Flops, Registers and Counters Logic Design Flip Flops, Registers and Counters Introduction Combinational circuits: value of each output depends only on the values of inputs Sequential Circuits: values of outputs depend on inputs and

More information

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533 Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop Course project for ECE533 I. Objective: REPORT-I The objective of this project is to design a 4-bit counter and implement it into a chip

More information

Chapter 18. DRAM Circuitry Discussion. Block Diagram Description. DRAM Circuitry 113

Chapter 18. DRAM Circuitry Discussion. Block Diagram Description. DRAM Circuitry 113 DRAM Circuitry 113 Chapter 18 DRAM Circuitry 18-1. Discussion In this chapter we describe and build the actual DRAM circuits in our SK68K computer. Since we have already discussed the general principles

More information

MC54/74F568 MC54/74F569 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS)

MC54/74F568 MC54/74F569 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) 4-BIT BIDIRECTIONAL COUNTERS (WITH 3-STATE OUTPUTS) The MC54/ 74F568 and MC54/74F569 are fully synchronous, reversible counters with 3-state outputs. The F568 is a BCD decade counter; the F569 is a binary

More information

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit

TSIU03, SYSTEM DESIGN. How to Describe a HW Circuit TSIU03 TSIU03, SYSTEM DESIGN How to Describe a HW Circuit Sometimes it is difficult for students to describe a hardware circuit. This document shows how to do it in order to present all the relevant information

More information

EECS145M 2000 Midterm #1 Page 1 Derenzo

EECS145M 2000 Midterm #1 Page 1 Derenzo UNIVERSITY OF CALIFORNIA College of Engineering Electrical Engineering and Computer Sciences Department EECS 145M: Microcomputer Interfacing Laboratory Spring Midterm #1 (Closed book- calculators OK) Wednesday,

More information

Digital Circuits ECS 371

Digital Circuits ECS 371 Digital Circuits ECS 37 Dr. Prapun Suksompong prapun@siit.tu.ac.th Lecture 0 Office Hours: BKD 360-7 Monday 9:00-0:30, :30-3:30 Tuesday 0:30-:30 Announcement HW4 posted on the course web site Chapter 5:

More information

Microprocessor Design

Microprocessor Design Microprocessor Design Principles and Practices With VHDL Enoch O. Hwang Brooks / Cole 2004 To my wife and children Windy, Jonathan and Michelle Contents 1. Designing a Microprocessor... 2 1.1 Overview

More information

ECE 263 Digital Systems, Fall 2015

ECE 263 Digital Systems, Fall 2015 ECE 263 Digital Systems, Fall 2015 REVIEW: FINALS MEMORY ROM, PROM, EPROM, EEPROM, FLASH RAM, DRAM, SRAM Design of a memory cell 1. Draw circuits and write 2 differences and 2 similarities between DRAM

More information

UNIT IV. Sequential circuit

UNIT IV. Sequential circuit UNIT IV Sequential circuit Introduction In the previous session, we said that the output of a combinational circuit depends solely upon the input. The implication is that combinational circuits have no

More information

CprE 281: Digital Logic

CprE 281: Digital Logic CprE 28: Digital Logic Instructor: Alexander Stoytchev http://www.ece.iastate.edu/~alexs/classes/ Registers and Counters CprE 28: Digital Logic Iowa State University, Ames, IA Copyright Alexander Stoytchev

More information

Computer Systems Architecture

Computer Systems Architecture Computer Systems Architecture Fundamentals Of Digital Logic 1 Our Goal Understand Fundamentals and basics Concepts How computers work at the lowest level Avoid whenever possible Complexity Implementation

More information

EE 367 Lab Part 1: Sequential Logic

EE 367 Lab Part 1: Sequential Logic EE367: Introduction to Microprocessors Section 1.0 EE 367 Lab Part 1: Sequential Logic Contents 1 Preface 1 1.1 Things you need to do before arriving in the Laboratory............... 2 1.2 Summary of material

More information

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS NH 67, Karur Trichy Highways, Puliyur C.F, 639 114 Karur District DEPARTMENT OF ELETRONICS AND COMMUNICATION ENGINEERING COURSE NOTES SUBJECT: DIGITAL ELECTRONICS CLASS: II YEAR ECE SUBJECT CODE: EC2203

More information

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM

MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM MODULAR DIGITAL ELECTRONICS TRAINING SYSTEM MDETS UCTECH's Modular Digital Electronics Training System is a modular course covering the fundamentals, concepts, theory and applications of digital electronics.

More information

Universal Asynchronous Receiver- Transmitter (UART)

Universal Asynchronous Receiver- Transmitter (UART) Universal Asynchronous Receiver- Transmitter (UART) (UART) Block Diagram Four-Bit Bidirectional Shift Register Shift Register Counters Shift registers can form useful counters by recirculating a pattern

More information

Asynchronous (Ripple) Counters

Asynchronous (Ripple) Counters Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory. The chapter about flip-flops introduced

More information

Embedded System Training Module ABLab Solutions

Embedded System Training Module ABLab Solutions Embedded System Training Module ABLab Solutions www.ablab.in Table of Contents Course Outline... 4 1. Introduction to Embedded Systems... 4 2. Overview of Basic Electronics... 4 3. Overview of Digital

More information

Lab #11: Register Files

Lab #11: Register Files Lab #11: Register Files Zack Mattis Lab: 3/21/17 Report: 3/26/17 Partner: Brendan Schuster Purpose In this lab, 4x4 register was designed and fully implemented onto a protoboard that emulates the local

More information

Figure 1: segment of an unprogrammed and programmed PAL.

Figure 1: segment of an unprogrammed and programmed PAL. PROGRAMMABLE ARRAY LOGIC The PAL device is a special case of PLA which has a programmable AND array and a fixed OR array. The basic structure of Rom is same as PLA. It is cheap compared to PLA as only

More information

University of Illinois at Urbana-Champaign

University of Illinois at Urbana-Champaign University of Illinois at Urbana-Champaign Digital Electronics Laboratory Physics Department Physics 40 Laboratory Experiment 3: CMOS Digital Logic. Introduction The purpose of this lab is to continue

More information

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9

Revision: August 11, E Main Suite D Pullman, WA (509) Voice and Fax. 8 LEDs. Doc: page 1 of 9 Digilent DIO4 Peripheral Board Reference Manual www.digilentinc.com Revision: August 11, 2004 215 E Main Suite D Pullman, WA 99163 (509) 334 6306 Voice and Fax Overview The DIO4 circuit board provides

More information

UNIVERSITI TEKNOLOGI MALAYSIA

UNIVERSITI TEKNOLOGI MALAYSIA SULIT Faculty of Computing UNIVERSITI TEKNOLOGI MALAYSIA FINAL EXAMINATION SEMESTER I, 2016 / 2017 SUBJECT CODE : SUBJECT NAME : SECTION : TIME : DATE/DAY : VENUES : INSTRUCTIONS : Answer all questions

More information

CSE 352 Laboratory Assignment 3

CSE 352 Laboratory Assignment 3 CSE 352 Laboratory Assignment 3 Introduction to Registers The objective of this lab is to introduce you to edge-trigged D-type flip-flops as well as linear feedback shift registers. Chapter 3 of the Harris&Harris

More information

Lab #6: Combinational Circuits Design

Lab #6: Combinational Circuits Design Lab #6: Combinational Circuits Design PURPOSE: The purpose of this laboratory assignment is to investigate the design of combinational circuits using SSI circuits. The combinational circuits being implemented

More information

Data Sheet. Electronic displays

Data Sheet. Electronic displays Data Pack F Issued November 0 029629 Data Sheet Electronic displays Three types of display are available; each has differences as far as the display appearance, operation and electrical characteristics

More information

MC9211 Computer Organization

MC9211 Computer Organization MC9211 Computer Organization Unit 2 : Combinational and Sequential Circuits Lesson2 : Sequential Circuits (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage Lesson2 Outlines the formal procedures for the

More information

Alice EduPad Board. User s Guide Version /11/2017

Alice EduPad Board. User s Guide Version /11/2017 Alice EduPad Board User s Guide Version 1.02 08/11/2017 1 Table OF Contents Chapter 1. Overview... 3 1.1 Welcome... 3 1.2 Launchpad features... 4 1.3 Alice EduPad hardware features... 4 Chapter 2. Software

More information

M66004SP/FP M66004SP/FP MITSUBISHI DIGITAL ASSP ASSP 16-DIGIT 5X7-SEGMENT VFD CONTROLLER 16-DIGIT 5 7-SEGMENT VFD CONTROLLER

M66004SP/FP M66004SP/FP MITSUBISHI DIGITAL ASSP ASSP 16-DIGIT 5X7-SEGMENT VFD CONTROLLER 16-DIGIT 5 7-SEGMENT VFD CONTROLLER ASSP M664SP/FP M664SP/FP 6-DIGIT 5X7-SEGMENT FD CONTROLLER 6-DIGIT 5 7-SEGMENT FD CONTROLLER DESCRIPTION The M664 is a 6-digit 5 7-segment vacuum fluorescent display (FD) controller using the silicon gate

More information

FPGA Design. Part I - Hardware Components. Thomas Lenzi

FPGA Design. Part I - Hardware Components. Thomas Lenzi FPGA Design Part I - Hardware Components Thomas Lenzi Approach We believe that having knowledge of the hardware components that compose an FPGA allow for better firmware design. Being able to visualise

More information

Handout 16. by Dr Sheikh Sharif Iqbal. Memory Interface Circuits 80x86 processors

Handout 16. by Dr Sheikh Sharif Iqbal. Memory Interface Circuits 80x86 processors Handout 16 Ref: Online course on EE-390, KFUPM by Dr Sheikh Sharif Iqbal Memory Interface Circuits 80x86 processors Objective: - To learn how memory interface blocks, such as Bus-controller, Address bus

More information

FX-2DA SPECIAL FUNCTION BLOCK USER'S GUIDE

FX-2DA SPECIAL FUNCTION BLOCK USER'S GUIDE FX-2DA SPECIAL FUNCTION BLOCK USER'S GUIDE JY992D52801C This manual contains text, diagrams and explanations which will guide the reader in the correct installation and operation of the FX-2DA special

More information

Combo Board.

Combo Board. Combo Board www.matrixtsl.com EB083 Contents About This Document 2 General Information 3 Board Layout 4 Testing This Product 5 Circuit Diagram 6 Liquid Crystal Display 7 Sensors 9 Circuit Diagram 10 About

More information

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator University of Pennsylvania Department of Electrical and Systems Engineering Digital Design Laboratory Purpose Lab Calculator The purpose of this lab is: 1. To get familiar with the use of shift registers

More information

Digital Circuits 4: Sequential Circuits

Digital Circuits 4: Sequential Circuits Digital Circuits 4: Sequential Circuits Created by Dave Astels Last updated on 2018-04-20 07:42:42 PM UTC Guide Contents Guide Contents Overview Sequential Circuits Onward Flip-Flops R-S Flip Flop Level

More information

R.G.O. 32 BIT CAMAC COUNTER MODULE USER MANUAL

R.G.O. 32 BIT CAMAC COUNTER MODULE USER MANUAL R.G.O. 32 BIT CAMAC COUNTER MODULE USER MANUAL C.S. Amos / D.J. Steel 16th August 1993 Copyright R.G.O. August 1993 1. General description. 3 2. Encoder formats 3 2.1 A quad B type encoders... 3 2.2 Up/down

More information

VU Mobile Powered by S NO Group

VU Mobile Powered by S NO Group Question No: 1 ( Marks: 1 ) - Please choose one A 8-bit serial in / parallel out shift register contains the value 8, clock signal(s) will be required to shift the value completely out of the register.

More information

Point System (for instructor and TA use only)

Point System (for instructor and TA use only) EEL 4744C - Drs. George and Gugel Spring Semester 2002 Final Exam NAME SS# Closed book and closed notes examination to be done in pencil. Calculators are permitted. All work and solutions are to be written

More information

Counter dan Register

Counter dan Register Counter dan Register Introduction Circuits for counting events are frequently used in computers and other digital systems. Since a counter circuit must remember its past states, it has to possess memory.

More information

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan.

Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties. All rights reserved. Printed in Taiwan. Copyright 2011 by Enoch Hwang, Ph.D. and Global Specialties All rights reserved. Printed in Taiwan. No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form

More information

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1. [Question 1 is compulsory] 1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. Figure 1.1 b) Minimize the following Boolean functions:

More information

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil

ADC Peripheral in Microcontrollers. Petr Cesak, Jan Fischer, Jaroslav Roztocil ADC Peripheral in s Petr Cesak, Jan Fischer, Jaroslav Roztocil Czech Technical University in Prague, Faculty of Electrical Engineering Technicka 2, CZ-16627 Prague 6, Czech Republic Phone: +420-224 352

More information

6-DIGIT FREQUENCY METER, TACHOMETER, RATE METER, TIMER, PULSE TOTALIZER, PROCESS METER & TOTALIZER WITH RS-232 PENTA P6000

6-DIGIT FREQUENCY METER, TACHOMETER, RATE METER, TIMER, PULSE TOTALIZER, PROCESS METER & TOTALIZER WITH RS-232 PENTA P6000 6-DIGIT FREQUENCY METER, TACHOMETER, RATE METER, TIMER, PULSE TOTALIZER, PROCESS METER & TOTALIZER WITH RS-232 PENTA P6000 NEWPORT PRODUCT INFO MANUAL (HTML) - (PDF Version) P6000A/P5000 - INPUT OPTIONS

More information