1. Aims
This assignment is intended to give you experience in the design and implementation of microcontroller-based systems. You are required to consider the implementation of a particular system, a synchronous counter.
2. Assignment Learning Outcomes
This assignment addresses the EL1242 module Learning Outcomes corresponding to the Semester 2 Microcontroller coursework, i.e.:
(4) Explain the operation of a basic microprocessor system, relating the description to the architecture of the processor
(5) Interpret assembly language software used in a processor based system
(6) Design hardware and software to meet the specification for a simple processor based system
3. System Specification
You are required to design and implement a 4-bit synchronous decade counter to produce a count sequence from 010 to 910.
3.1. The inputs to the system
The system should count upwards in increments of either 1 or 2, depending on a control input X (X = 0 signifies increments of 1, X = 1 signifies increments of 2). In either case, the count sequence repeats, e.g. an increment of 1 from 10012 should result in 00002, an increment of 2 from 10012 should result in 00012 etc.
An additional control input Y should act as a synchronous reset for the counter. On the next clock pulse after this input is asserted the count should reset to 00002.
You may assume that a suitable external ‘CLOCK’ signal (i.e. a square wave with the appropriate voltage levels) is available, to initiate the transition from one state to the next.
You must select for yourself which pins are used to connect these three inputs.
3.2. The outputs from the system
The current counter state should be output to the lower nibble of Port1, on pins P1 <3:0>. The remaining bits of Port1, pins P1 <7:4>, should not be affected by changes in the counter state.
Port1 pin 7 (P1.7) should be used to output the current state of the control input X.
University of Central Lancashire School of Computing, Engineering and Physical Sciences EL1242 Digital Electronics Reassessment Assignment 2013/14
Page 2 of 2
3.3. Other Considerations
The software should be written in 8051 assembly code using the Keil µVision 4 development environment. You should only use features available on a standard 8051 [Select Generic 8051(All variants) when starting your new project]. If you are not able to meet the specification, then describe exactly what your system does, and how it fails to meet the specification.
4. Requirements
You should determine the minimised next state logic for the counter and translate this into a form most suitable for software implementation. Write pseudocode for the counter program, and explain in your report how this pseudocode achieves the specifications. Write the program in assembly language (include comments) to implement the counter using this 8051-based system, and simulate/debug it using the Keil development system. Include in your report a listing of the software, and an explanation of how your program works. Your discussion should encompass the flexibility of the approach, e.g. how straightforward would it be to alter the generated sequence, extend the counter to represent 2 decimal digits, function as an up/down counter and/or generate the clock signal internally.
5. Marking scheme
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]
