| ||
PLA9: On basic digital I/O. Designing a combinational circuit |
||
NOTE: This post lab asssignmen must be solved only after having completed successfully lab session Lab9 and studied P9 example because you will copy and adapt materials from it. |
NOTE: EDA in use this semester: Proteus electrical simulator, Notepad++ editor, Microchip MPLABX and XC8 compiler.
Specifications: wind compass
We want to design a digital wind direction meter (wind_compass) based on a 16-position optoelectronic rotary encoder as shown in Fig. 1 using a PIC18F4520. This PLA is adapted from problem B3.1 where you will find questions and ideas.
![]() |
Fig. 1. Circuit symbol and its realisation in Proteus wind_compass.pdsprj based on classic chips for better comprehending how does it work. |
Fig. 2 represents the wind compass subdivided in 16 directions each of which is assigned to a 4-bit Gray code.
![]() |
Fig. 2. Wind compass describing the sixteen principal bearings used to measure wind direction and an example of commercial manufactured wind transducer. |
Pin assignment:
D3 --> RA0; D2 --> RA1; D1 --> RA2; D0 --> RA3
Y(15..8) --> RB(7..0); Y(7..0) --> RD(7..0)
E --> RC7
S(6..0) --> RC(6..0)
Project location:
C:\CSD\P9\PLA9\wind\(files)
Specifications: BCD to 7-segments decoder
Design a BCD_7seg_decoder chip using a PIC18F4520. This PLA is adapted from problem B3.2 where you will find questions and ideas.
![]() |
Fig.1. When operating, this decoder only deals with inputs from 0 to 9 ("0000" to "1001"). The remaining 6 combinations are of no interest. |
![]() |
Fig.2. Truth table definition as an incomplete circuit. |
Use the following pin connections:
D3 --> RA2; D2 --> RA3; D1 --> RA0; D0 --> RA1
a --> RB7; b --> RB6; c --> RC5; d --> RC4; e --> RD7; f --> RC1; g --> RC0
Project location:
C:\CSD\P9\PLA9\7seg\(files)
Specifications: 4-bit ones counter
Design the 4-bit ones counter represented in Fig. 1 using a PIC18F4520. This PLA is adapted from problem B3.3 where you will find questions and ideas.
|
Fig.1. Symbol and truth table. |
Pin assigment:
D3 --> RC4; D2 --> RC3; D1 --> RB6; D0 --> RA1; Y2 --> RA2; Y1 --> RB5; Y0 --> RB0
Project location:
C:\CSD\P9\PLA9\Ones_counter\(files)
Specifications: 8-bit comparator
Design the 8-bit comparator represented in Fig. 1 using a PIC18F4520. This PLA is adapted from problem B3.5 where you will find questions and ideas.
![]() |
Fig. 1. Comp_8bit symbol. |
Project location:
C:\CSD\P9\PLA9\Comp\(files)
Example of individual assignments | |||
Circuit | |||
Est. 1 | wind compass | ||
Est. 2 | BCD to 7-segments decoder | ||
Est. 3 | 4-bit ones counter | ||
Est. 4 | 8-bit comparator | ||
Est. 5 | ··· | ··· | ··· |
··· | ··· | ··· | ··· |
Follow this rubric for writing reports.