UQ Students should read the Disclaimer & Warning
Note: This page dates from 2005, and is kept for historical purposes.
COMP1300 / COMP2302 - Assignment Feedback
Assignment Statistics | |
---|---|
Average mark | 55.4 (out of 80) |
Median mark | 58 |
Maximum | 77.5 |
Minimum | 3.5 (not considering late penalties) |
Proportion of students scoring 40 or more out of 80 | 90% |
My Assignment Marks
Processor | Mark |
---|---|
Atmel AT90S8515-4 | 12.5 out of 20 |
Atmel ATtiny11-6 | 17.5 out of 20 |
National COP8ACC5 | 18.5 out of 20 |
Microchip PIC17C756A | 17.5 out of 20 |
Late Penalty - Assignment submitted on time | 0 |
Total (out of 80) | 66 |
My answers and marks for processor (1): Atmel AT90S8515-4
Characteristic | Your Answer | Source | Mark | Marker Comment |
---|---|---|---|---|
1: What is the maximum clock speed of the microcontroller? (1 mark) | a. 4 MHz | b. Page 1, PDF Datasheet | 1 | |
2: What is the word size of the microcontroller? (1 mark) | a. 8 bit | b. Page 1, PDF Datasheet | 1 | |
3: How many bits wide is the address bus? (1 mark) | a. Data memory 14 bit, program memory 12 bit | b. Pages 1, 11, 60 and 61, PDF Datasheet | 0 | address bus is 16 bits wide, required to address the entire data memory space from $0000 - $FFFF 12 bits is only for addressing the program memory |
4: How many different type of memory are included within the microcontroller and how many bytes are there of each? (1 mark) | a. 3 types, FLASH 8192 bytes, EEPROM 512 bytes, SRAM 512 bytes | b. Page 1, PDF Datasheet | 1 | |
5: How many registers are there? Describe them, including size and purpose (descriptions such as general purpose registers and I/O registers are satisfactory). (1 mark) | a. 32 8-bit general-purpose registers. 64 b-bit I/O registers. Some of these are reserved. | b. Pages 1, 10 and 13, PDF Datasheet | 0.5 | 64 8bit I/O registers |
6: What is the size (in bits) of the instructions and how many instructions are there in the instruction set? (1 mark) | a. 118 instructions. 8-bit or 16-bit. | b. Pages 1, 11, 106 and 107, PDF Datasheet | 1 | |
7: Does the microcontroller have support for external memory? If so, what is the maximum external memory size that can be addressed? (1 mark) | a. Yes, 64 Kbytes are supported. | b. Page 60, PDF Datasheet | 1 | |
8: How many Timers and Counters does the processor have? What sizes are they? (1 mark) | a. Two general purpose counters, one 8-bit, one 16-bit. Not including watchdog timers. | b. Page 32, PDF Datasheet | 1 | |
9: Does the microcontroller have any analog capability (e.g. Analog-to-Digital converter(s), Digital-to-Analog converter(s), Analog-comparator(s)). If so, what voltage range(s) can be measured or outputted? (1 mark) | a. An analog comparator with input range of –1 volt to VCC + 0.5 volt. | b. Pages 1 and 90, PDF Datasheet | 0.5 | what is the value of the max. Vcc voltage? |
10: Does the microcontroller support synchronous serial communication (eg SPI)? If so, what is the maximum bit rate? (1 mark) | a. Supported. Maximum bit rate is one bit per clock/4 | b. Page 50, PDF Datasheet | 0.5 | You need to calculate the the bit rate to get full mark. max clock frequency = 4MHz, therefore max bit rate : 4MHz/4 = 1Mbits/s |
11: Does the microcontroller support asynchronous serial communication (eg UART)? If so, what is the maximum bit rate? (1 mark) | a. Supported, Maximum bit rate 115200 bits per second. | b. Page 58, PDF Datasheet | 1 | |
12: How many interrupts does the microcontroller service? Describe how interrupts are enabled. (1 mark) | a. 12 interrupts. Interrupts are enabled by setting the I-bit in the status register and each interrupt has an individual enable bit which enables the interrupt when set. | b. Page 22, PDF Datasheet | 1 | |
13: How many addressing modes are there? Describe them (eg. number of registers accessed, program or data memory accessed, etc). (2 marks) | a. 11 addressing modes. Register direct (single register) contains a single register address in the instruction. Register direct (two registers) contains two registers in the instruction. I/O addressing addresses I/O memory, with 6 bits of the instruction giving the operand address. Data direct uses 2 word instructions and contains a 16-bit data address. Data indirect uses the X or Y register contents and adds an address contained in the instruction to them to obtain the operand. Data indirect uses the value in the X, Y or Z register as the operand address. Data with pre-decrement and data with post-decrement use the values in the X, Y or Z registers but increment or decrement them after or before the operation. Constant addressing uses the value in the Z register as its address. Indirect program addressing loads the value from the Z register into the program counter and continues from there. Relative program addressing increments the program counter by a value specified in the instruction and continues from there. | b. Pages 13 to 17, PDF Datasheet | 1 | information provided is not sufficient. You need to state which memory (data/ I/O /program) is addressed, how or what registers are involved or other relevant information to receive full mark. |
14: List and describe any sleep or standby modes or idle states of the processor. (2 marks) | a. Device supports IDLE and POWER-DOWN modes. Idle mode stops CPU but timers/counters, watchdog timer and interrupt system continue functioning. Optionally, analog comparator can be enabled or disabled during idle mode. Power-down mode stops the oscillator and only the watchdog timer and external interrupts continue operating. | b. Page 31, PDF Datasheet | 1 | You must provide information on how different sleep modes operate AND on how to wake up from both modes, OR describe what instructions or registers are used to enter the sleep modes in order to receive the full mark. |
15: Describe the I/O ports. Include how many bits each port has, which direction the pins are and what other uses the pins have. (2 marks) | a. 4 I/O ports. All ports are general-purpose bi-directional 8-bit ports but support additional options. Port A functions as external SRAM connection if required. Port B is used for the timer, analog comparator and synchronous serial interface. Port C supports direct driving of LED arrays. Port D is used for external interrupts and the UART interface. | b. Pages 63 to 77, PDF Datasheet | 1 | You should describe all alternate functions of the ports |
16: Does the microcontroller’s instruction set support 8-bit addition? 16-bit addition? What is the size (in bits) of the largest addition supported? Is multiplication supported? What is the size of the largest multiplication? (2 marks) | a. 8-bit addition is supported. 16-bit addition is not natively supported. Multiplication is not supported. | b. Page 106, PDF Datasheet | 0 | 16 bit addition is adding of two 16bit numbers and 8515-4 does not support this in a single instruction. The instruction ADIW adds a 16bit number to immediate number, k, which is only 6 bits long. (largest value of K is 63). check p 18, www.itee.uq.edu.au/~comp1300/pracs/Atmel_AVR_Resources/doc0856.pdf |
My answers and marks for processor (2): Atmel ATtiny11-6
Characteristic | Your Answer | Source | Mark | Marker Comment |
---|---|---|---|---|
1: What is the maximum clock speed of the microcontroller? (1 mark) | a. 6 MHz | b. Page 1, PDF Datasheet | 1 | |
2: What is the word size of the microcontroller? (1 mark) | a. 8 bit, although instructions are 16 bit. | b. Page 1, PDF Datasheet | 1 | |
3: How many bits wide is the address bus? (1 mark) | a. 8-bit | b. Page 9, PDF Datasheet | 0 | Because AVR is a Harvard architecture, it has separate memory address. In this case, we only consider the address width for data memory only. The data memory are the I/O memeory spaces (pg 6 data sheet). It is 8bit wide and have 64 addresses. Therefore we will need 6-bit to represent 64 address values(pg 8 fig 9). EEPROM does not have address bus (pg 5 fig 4) |
4: How many different type of memory are included within the microcontroller and how many bytes are there of each? (1 mark) | a. 1 KB flash memory | b. Page 10, PDF Datasheet | 1 | |
5: How many registers are there? Describe them, including size and purpose (descriptions such as general purpose registers and I/O registers are satisfactory). (1 mark) | a. 32 8-bit general-purpose working registers, and 14 other registers, which includes the port B data register and data direction register, status register, two interrupt mask control registers and a timer/counter mask register, a watchdog timer register, timer/counter control register and timer counter register and an analog control and comparator status register . All registers are 8-bit but not all bits of all registers are used and reserved registers have not been counted. | b. Pages 1, 3, 14, 25, 26, 36, 41, 44 and 81, PDF Datasheet | 0.5 | 32 8-bit general purpose registers, 64 8-bit I/O registers |
6: What is the size (in bits) of the instructions and how many instructions are there in the instruction set? (1 mark) | a. 90 instructions. Instructions are16 bit. | b. Pages1 and 10, PDF Datasheet | 1 | |
7: Does the microcontroller have support for external memory? If so, what is the maximum external memory size that can be addressed? (1 mark) | a. Not supported | b. Page 1, PDF Datasheet | 1 | |
8: How many Timers and Counters does the processor have? What sizes are they? (1 mark) | a. 1 general-purpose 8-bit timer/counter. This is not including the watchdog timer. | b. Page 33, PDF Datasheet | 1 | |
9: Does the microcontroller have any analog capability (e.g. Analog-to-Digital converter(s), Digital-to-Analog converter(s), Analog-comparator(s)). If so, what voltage range(s) can be measured or outputted? (1 mark) | a. One analog comparator, with absolute maximum input values of -1 volt to VCC + 0.5 volts (with respect to ground) | b. Pages 41 and 57, PDF Datasheet | 1 | |
10: Does the microcontroller support synchronous serial communication (eg SPI)? If so, what is the maximum bit rate? (1 mark) | a. Not supported | b. Not referenced in PDF datasheet therefore assumed to be not supported | 1 | |
11: Does the microcontroller support asynchronous serial communication (eg UART)? If so, what is the maximum bit rate? (1 mark) | a. Not supported | b. Not referenced in PDF datasheet therefore assumed to be not supported | 1 | |
12: How many interrupts does the microcontroller service? Describe how interrupts are enabled. (1 mark) | a. 4 interrupts. Each interrupt has an individual enable bit, which must be set to enable that interrupt, and a global I-bit in the status register to enable interrupts. | b. Pages 15 and 16, PDF Datasheet | 1 | |
13: How many addressing modes are there? Describe them (eg. number of registers accessed, program or data memory accessed, etc). (2 marks) | a. There are 6 addressing modes, namely register direct (single register), register indirect, register direct (two registers), I/O direct, relative, and constant. With Register Direct (single register) the operand is contained in a register, which is referenced in the instruction. With Register Indirect, the register accessed is pointed to by the Z-register. Register Direct (two registers) has references to two registers contained in the instruction. IO direct has the operand address in 6 bits of the instruction, and a register which may be source or destination register in the instruction. Relative addressing increments the program counter by a value in the instruction and constant addressing uses a value in the Z-register to determine a constant byte address. | b. Pages 10, 11 and 12, PDF Datasheet | 2 | |
14: List and describe any sleep or standby modes or idle states of the processor. (2 marks) | a. Device supports IDLE mode and Power-Down mode. IDLE mode stops PCU while allowing timers/counters and interrupt system to continue functioning. The Power-Down mode saves register contents, stops oscillator and disables all other chip functions until next reset or interrupt. Device exits power saving states by a wakeup pin or interrupt. | b. Pages 2 and 31, PDF Datasheet | 1 | Maybe more information on what is still working in sleep mode, and how to wake up the system. e.g. There are two different sleep modes (pg 31 data sheet) - Idle Mode and Power-down mode. In Idle mode, Timer/counter, watchdog and interupt system still work while CPU is not working. Wake up by internal or external interrupts. Power-down modes, oscillator is stopped. External and watchdog continue to operate. Only external interrupt or watchdog reset can wake up. |
15: Describe the I/O ports. Include how many bits each port has, which direction the pins are and what other uses the pins have. (2 marks) | a. This device contains one I/O port – port B. It is a bidirectional 6-bit port with 6 pins. Pins can be set to output or input pins uniquely by changing values in the data direction register. Pins also serve special functions such as reset, xtal oscillator input and output, and external interrupts, as well as the input for the analog comparator depending on which options are set by the pin change interrupt. | b. Pages 43, 44 and 45, PDF Datasheet | 2 | |
16: Does the microcontroller’s instruction set support 8-bit addition? 16-bit addition? What is the size (in bits) of the largest addition supported? Is multiplication supported? What is the size of the largest multiplication? (2 marks) | a. 8-bit addition is supported, and is the largest (in bits) addition supported. Multiplication is not supported. | b. Page 83, PDF Datasheet | 2 | please explain abit more. for example (pg 83,84 data sheet) 8-bit addition supported in a single instruction, e.g. ADD and ADC. 16-bit addition not supported in a single instruction. Largest addition supported in a single instruction is 8 bits. Multiplication not supported in a single instruction. |
My answers and marks for processor (3): National COP8ACC5
Characteristic | Your Answer | Source | Mark | Marker Comment |
---|---|---|---|---|
1: What is the maximum clock speed of the microcontroller? (1 mark) | a. 4 MHz onboard, 10 MHz externally clocked | b. Pages 1 and 12 PDF Datasheet | 1 | |
2: What is the word size of the microcontroller? (1 mark) | a. 8 bit | b. Page 1, PDF Datasheet | 1 | |
3: How many bits wide is the address bus? (1 mark) | a. 15 bit | b. Pages 1 and 33, PDF Datasheet | 0 | incorrect |
4: How many different type of memory are included within the microcontroller and how many bytes are there of each? (1 mark) | a. 4Kbytes ROM and 128 bytes RAM | b. Page 1, PDF Datasheet | 1 | |
5: How many registers are there? Describe them, including size and purpose (descriptions such as general purpose registers and I/O registers are satisfactory). (1 mark) | a. 6 memory mapped CPU registers, 3 I/O registers (configuration, data and pin), 4 control registers, timer registers, a SIO shift counter register and16 bytes of RAM are mapped as 3 memory pointer and 13 general purpose registers. | b. Pages 2 and 12, PDF Datasheet | 1 | |
6: What is the size (in bits) of the instructions and how many instructions are there in the instruction set? (1 mark) | a. Most instructions are single byte; however, some instructions are two bytes. A byte is 8 bits in this instance. A count of the instruction set in the datasheet showed 45 distinct instructions. Instructions such as X and LD have been counted only once, although they are listed multiple times in the datasheet. | b. Pages 34 and 35, PDF Datasheet | 1 | |
7: Does the microcontroller have support for external memory? If so, what is the maximum external memory size that can be addressed? (1 mark) | a. No support. | b. Page 12, PDF Datasheet | 1 | |
8: How many Timers and Counters does the processor have? What sizes are they? (1 mark) | a. Device contains 3 timers, namely a 16 bit idle timer, a 16-bit general-purpose timer/counter, and 16 bit high speed capture timer. Watchdog timers have not been included in this count. | b. Pages 1, 14, 15, 17, PDF Datasheet | 0.5 | 2 |
9: Does the microcontroller have any analog capability (e.g. Analog-to-Digital converter(s), Digital-to-Analog converter(s), Analog-comparator(s)). If so, what voltage range(s) can be measured or outputted? (1 mark) | a. 12 bit A/D 7-input comparator with input voltage range 0 volts to VCC –1.5 volts, where the maximum VCC is 5.5 volts. | b. Pages 1, 4 and 8, PDF Datasheet | 1 | |
10: Does the microcontroller support synchronous serial communication (eg SPI)? If so, what is the maximum bit rate? (1 mark) | a. Yes, and the maximum rate (in Master mode) is selectable to be 8 times the instruction cycle clock, which is itself one tenth of the processor clock frequency, which is a maximum of 4 MHz internally or 10 MHz if clocked externally. Slave mode uses the clock of another device in Master mode. | b. Pages 12 and 30, PDF Datasheet | 1 | |
11: Does the microcontroller support asynchronous serial communication (eg UART)? If so, what is the maximum bit rate? (1 mark) | a. This is not supported. | b. Page 1, PDF Datasheet | 1 | |
12: How many interrupts does the microcontroller service? Describe how interrupts are enabled. (1 mark) | a. There is a global interrupt enable bit. 8 interrupts may be serviced. 7 are maskable and have an enable bit which enables them. The 1 non-maskable (software) interrupt which cannot be disabled. Port L also provides another 8 interrupts which are vectored into the same service routine. | b. Pages 1, 21, 22 and 27, PDF Datasheet | 1 | |
13: How many addressing modes are there? Describe them (eg. number of registers accessed, program or data memory accessed, etc). (2 marks) | a. There are 10 addressing modes. These include the operand addressing modes: register indirect, where the operand is the data memory addressed by the B or X pointers, and register indirect with auto increment or decrement of pointer which is similar except the B or X register is automatically decremented or incremented after executing the instruction; Direct which contains an address directly pointing to data memory for the operand; Immediate containing data for the operand within the instruction and a similar short immediate which has a 4-bit immediate field; Indirect where the contents of the accumulator are used as a partial address for accessing program memory. Transfer of control addressing modes include: Relative, where the instruction field is added to the program counter; absolute which replaces 12 bits of the program counter in order to jump to another location and the similar absolute long which replaces the entire 15 bits of the program counter; and indirect which uses the contents of the accumulator for accessing data in program memory. | b. Pages 32 and 33, PDF Datasheet | 2 | |
14: List and describe any sleep or standby modes or idle states of the processor. (2 marks) | a. Two power saving modes are provided – HALT and IDLE. In HALT mode, all microcontroller activities are stopped. In the IDLE mode, the on-board oscillator circuitry and timer T0 are active but all other microcontroller activities are stopped. In both instances, all RAM is preserved. | b. Pages 17 and 18, PDF Datasheet | 2 | |
15: Describe the I/O ports. Include how many bits each port has, which direction the pins are and what other uses the pins have. (2 marks) | a. Port L is a 4-bit I/O port. Its 4 pins may be configured as either input or output pins, and may be used as external interrupts. Port G is an 8-bit port with 5 bidirectional I/O pins, and an input pin, a dedicated output pin (which can be an input pin depending on the mask selected) and the WATCHDOG output pin, with most pins on this port serving multiple purposes. Port I is an 8-bit Hi-Z input port with 8 pins used for the analogue functions, two of which can also be output pins. Port D is a 4-bit output port. | b. Pages 11 and 12, PDF Datasheet | 2 | |
16: Does the microcontroller’s instruction set support 8-bit addition? 16-bit addition? What is the size (in bits) of the largest addition supported? Is multiplication supported? What is the size of the largest multiplication? (2 marks) | a. 8 bit additions is the largest supported. Multiplication is not supported. | b. Page 34, PDF Datasheet | 2 |
My answers and marks for processor (4): Microchip PIC17C756A
Characteristic | Your Answer | Source | Mark | Marker Comment |
---|---|---|---|---|
1: What is the maximum clock speed of the microcontroller? (1 mark) | a. 33 MHz | b. http://www.microchip.com/1010/pline/picmicro/category/embctrl/32kbytes/devices/17c756a/ Specification Chart | 1 | |
2: What is the word size of the microcontroller? (1 mark) | a. 8 bit data word but 16 bit instruction word (using Harvard Architecture, separate instruction and data buses) | b. Page 7, PDF Datasheet | 1 | |
3: How many bits wide is the address bus? (1 mark) | a. 15 bit | b. Page 56, PDF Datasheet | 0 | This is program memory, not data memory. |
4: How many different type of memory are included within the microcontroller and how many bytes are there of each? (1 mark) | a. 902 bytes RAM, 64 K-words of external memory supported, EPROM 16 K | b. Page 7 and 8, PDF Datasheet | 0.5 | EPROM is 16K words - you must explain this. |
5: How many registers are there? Describe them, including size and purpose (descriptions such as general purpose registers and I/O registers are satisfactory). (1 mark) | a. General-purpose registers are 8-bits wide. There are a total of 81 registers. All registers occupy 8-bits of memory; however some registers do not use the full 8-bits. | b. Pages 46 and 47, PDF Datasheet | 0.5 | This is SFRs. GPRs are separate - there around 900 of them. |
6: What is the size (in bits) of the instructions and how many instructions are there in the instruction set? (1 mark) | a. There are 58 16-bit instructions. | b. Page 197, PDF Datasheet | 1 | |
7: Does the microcontroller have support for external memory? If so, what is the maximum external memory size that can be addressed? (1 mark) | a. External memory is supported, 64K-words, where words are 16 bit, are addressable, however the processor supports different modes, some of which use some internal memory while others use only external memory. 64K-words is the maximum addressable memory, so if an internal memory mode is used, the maximum addressable external supported memory size is decreased accordingly | b. Page 43, PDF Datasheet | 1 | |
8: How many Timers and Counters does the processor have? What sizes are they? (1 mark) | a. There are 4 timer/counters. Timer 0 and timer 3 are 16 bit, timers 1 and 2 are 8 bit, not counting any watchdog timers. | b. Page 8, PDF Datasheet | 1 | |
9: Does the microcontroller have any analog capability (e.g. Analog-to-Digital converter(s), Digital-to-Analog converter(s), Analog-comparator(s)). If so, what voltage range(s) can be measured or outputted? (1 mark) | a. Twelve input 10-bit analogue to digital converter. The input voltage should not exceed more than 0.3 volts above rail values, and the rail value is in the range 3 to 5.5 volt. | b. Page 8, 179 and 189, PDF Datasheet | 1 | |
10: Does the microcontroller support synchronous serial communication (eg SPI)? If so, what is the maximum bit rate? (1 mark) | a. Maximum bit clock frequency is 8.25 MHz (clock / 4), giving maximum bit rate of 8250 Kbit per second. | b. Page 121, 139, PDF Datasheet | 0.5 | Type of communication? |
11: Does the microcontroller support asynchronous serial communication (eg UART)? If so, what is the maximum bit rate? (1 mark) | a. 515.62 Kbit/second | b. Page 122, PDF Datasheet | 1 | |
12: How many interrupts does the microcontroller service? Describe how interrupts are enabled. (1 mark) | a. Has 18 sources of interrupt. There is a global interrupt disable bit, which when set disables all interrupts. Individual interrupts are enabled by setting bits in interrupt control registers. | b. Pages 33, 34, 35 and 36, PDF Datasheet | 1 | |
13: How many addressing modes are there? Describe them (eg. number of registers accessed, program or data memory accessed, etc). (2 marks) | a. 3. Direct, Indirect and relative. There are 4 registers for indirect addressing, although two aren’t physically implemented. | b. Pages 1, 54, PDF Datasheet | 2 | |
14: List and describe any sleep or standby modes or idle states of the processor. (2 marks) | a. Processor supports a SLEEP mode. Entering this mode clears the watchdog timer, turns off the oscillator driver and maintains I/O port status. Certain interrupts and reset commands will wake the processor from sleep mode. | b. Page 194, PDF Datasheet | 2 | |
15: Describe the I/O ports. Include how many bits each port has, which direction the pins are and what other uses the pins have. (2 marks) | a. Seven I/O ports, PORTA through PORTG. PORTA is a 6-bit wide latch and are high impedance inputs. PORTB is 8-bit and bi-directional. It supports interrupt on change and is a general-purpose I/O port. PORTC and PORTD are also general-purpose 8-bit bidirectional ports and are multiplexed with the system bus. PORTE is a 4-bit bidirectional port used for general I/O or control signals for the system bus. PORTF is an 8-bit bidirectional general-purpose I/O port doubling as the inputs for the A/D converter. PORTG is also a general-purpose bidirectional 8-bit I/O port; with the lower four bits doubling as A/D inputs and reference voltage pins and the upper 4 bits doubling as general purpose peripheral I/O. | b. Pages 71 to 88, PDF Datasheet | 2 | |
16: Does the microcontroller’s instruction set support 8-bit addition? 16-bit addition? What is the size (in bits) of the largest addition supported? Is multiplication supported? What is the size of the largest multiplication? (2 marks) | a. 8-bit addition and multiplication is supported. | b. Pages 200 and 202, PDF Datasheet | 2 |
19-Nov-2003