A LED PATTERN DISPLAY SYSTEM 1. Design a microprocessing system to implement the following LED pattern display system. An LED display device contains a grid of 25 LEDs, as shown in Fig. 1. An LED in the grid may be turned on by applying +5V to the grid point. For example, (R4,C3) = (+5V,+5V) will turn on the LED at grid point (R4,C3). Two or more LEDs may be turned on. For example, (R1,C2) = (+5V,+5V) and (R2,C2) = (+5V,+5V) will turn on the LEDs at grid points (R1,C2) and (R2,C2). To turn on a set of LEDs, each of the desired LEDs in the set must be turned on. A set of LEDs may be turned on by applying the 10-bit pattern to the inputs of the LED display device, and then latching the 10-bit code by applying a positive edge (low-high) on the Latch signal (See Fig. 1). For example, to turn on the top first row of LEDs, the following 10-bit pattern should be latched into the LED display device: {R1R2R3R4R5C1C2C3C4C5} = 1000011111. Your design is supposed to shine the LEDs in the following sequence: Set 1, Set 2, Set 3, Set 1, Set 2, Set 3, Set 1, ... The three sets of LEDs are shown in Fig. 1. Note: when shining a set of LEDs, all of the LEDs in the set should be turned on simultaneously. The system should shine the LEDs in the given sequence (pattern) only when the user presses the Start button. Note: After the Start button has been released, the system should continue shining the LEDs until the user presses the Stop button. At any time the user may change the speed of shining the LEDs. The user may select LOW, MED, or FAST speed. The LOW speed is defined as 1000ms between shining two consecutive sets of LEDs. The MED speed is defined as 100ms between shining two consecutive sets of LEDs. The HIGH speed is defined as 10ms between shining two consecutive sets of LEDs. For example, for the HIGH speed setting, the system should shine each set for 10ms. • Timer Device: as shown in Fig. 1(a), the timer device has a RO pin, which provides a pulse (high-low-high) each time the timer reaches the timeout value. The timeout value is configurable as multiples of 10ms. The procedure for configuring the time out value is as follows: First, the Timeout Configuration Enable pin (TCE) pin must be set to 0V; Then, the TOV pin should be pulsed (high-low-high) a number of times equal to the desired multiple of 10ms time out value. For example, if you want the time out value to be 10ms, then you must pulse the TOV pin one time. If you want the time out value to be 100ms, then you must pulse the TOV pin 10 times. Finally, the TCE pin must be returned to 5V. The timer also has a Start/Stop pin, which is used to start and stop the timer. - 1 of 3 - Table 1: Control Panel Timer RO (b) Start/Stop TCE TOV START 1 CP2 STOP 2 CP1 RESET 3 CP0 CP2 0 0 0 0 1 1 1 1 (a) CP1 0 0 1 1 0 0 1 1 CP0 0 1 0 1 0 1 0 1 FCN NONE START STOP RESET LOW MED HIGH NONE (c) Latch R1 R2 R3 R4 R5 C1 C2 C3 C4 C5 C1 R1 R2 C2 C3 C4 C5 (d) Set 1: (R1,C1), (R2,C1), (R3,C1), (R4,C1), (R5,C1) Set 2: (R2,C2), (R3,C2), (R4,C2) Set 3: (R3,C3) R3 R4 R5 Fig. 1. (a) Given Timer device. (b) Control Panel, (c) LED device, (d) Pattern. The following describes the parts you may use in your design: Available Parts (no other devices are permitted) • A basic micro-processor (You may use the HC11 or the HCS12 instruction set). • Three 512x8 ROM chips. Each ROM chip has two active low chip selects (CS0 and CS1). • One 128x8 ROM chip, with one active low chip select (CS). • Eight 32Kx8 RAM chips. Each RAM chip has one active high chip select (CS). • One 64x8 RAM chip, with one active low chip select (CS). • Many 4-Port PCIAs. Each PCIA has one active low chip select (CS). • An ATD converter, having 8-bit resolution and a fixed sampling frequency of 8 kHz. • Two DTA converters, which convert 8-bit numbers to the range of 0V to 5V in 256. steps. [1.1] Create and draw a system block diagram of your design. [1.2] Design and show an address decoder for your system. [1.3] Draw a diagram of the memory map for this system. Include the address ranges of all memories - 2 of 3 - and I/O controllers. Also, show the starting and ending addresses of the program code area, data area, and stack area. Also, show the contents of the vector table. [1.4] Draw a flow chart for every part of your software. [1.5] Design and write all software for your system. 2. Analysis Questions [2.1] If you are using a stack, how large does your stack grow? - 3 of 3 -