Digprac3 TL101 0 2022

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

DIGPRAC3/101/0/2022

Tutorial Letter 101/0/2022

DIGITAL SYSTEMS III PRACTICALS


DIGPRA3

Year Module

ELECTRICAL DEPARTMENT

IMPORTANT INFORMATION
Please register on myUnisa, activate your myLife e-mail account and
make sure that you have regular access to the myUnisa module
website, MODULE CODE-2022-S1/S2, as well as your group website.

Note: This is a fully online module. It is, therefore, only available on myUnisa.

BARCODE

Open Rubric
CONTENTS

1 INTRODUCTION ............................................................................................................................ 3
1.1 Getting started ................................................................................................................................ 3
2 OVERVIEW OF [insert module code] .......................................................................................... 3
2.1 Purpose........................................................................................................................................... 3
2.2 Outcomes........................................................................................................................................ 3
3 CURRICULUM TRANSFORMATION ............................................................................................ 4
4 LECTURER(S) AND CONTACT DETAILS .................................................................................... 4
4.1 Lecturer(s)....................................................................................................................................... 4
4.2 Department ..................................................................................................................................... 4
4.3 University ........................................................................................................................................ 4
5 RESOURCES ................................................................................................................................. 4
5.1 Joining myUnisa.............................................................................................................................. 4
5.2 Prescribed book(s) .......................................................................................................................... 5
5.3 Recommended book(s)................................................................................................................... 5
5.4 Electronic reserves (e-reserves) ..................................................................................................... 5
5.5 Library services and resources ....................................................................................................... 5
6 STUDENT SUPPORT SERVICES ................................................................................................. 6
6.1 First-Year Experience Programme @ Unisa .................................................................................... 6
7. HOW TO STUDY ONLINE ............................................................................................................. 7
7.1 What does it mean to study fully online? ........................................................................................ 7
7.2 myUnisa tools ................................................................................................................................. 7
8. ASSESSMENT ............................................................................................................................... 8
8.1 Assessment plan............................................................................................................................. 8
8.2 Year mark and final examination/other options ............................................................................... 8
8.3 Submission of assignments .................................................................................................................. 8
Assignment 1 .......................................................................................................................................... 13
Assignment 2 Assignment 2.1............................................................................................................... 13
Assignment 2.2 ....................................................................................................................................... 13
Assignment 2.3 ....................................................................................................................................... 14
9. CONCLUSION .............................................................................................................................. 17
ANNEXURE: GLOSSARY OF TERMS.................................................................................................... 17
1 INTRODUCTION
Dear Student

Welcome to Digital Systems III Practical) (DIGPRA3) at UNISA. This tutorial letter serves as a
guideline to this subject. It provides you with general administrative information as well as specific
information about the subject. Read it carefully and keep it safe for future reference. We trust that
you will enjoy this course.

Because this is a fully online module, you will need to use myUnisa to study and complete the
learning activities for this module. Visit the website for [module code] on myUnisa frequently. The
website for your module is [the module website code written out in full, eg MODULE CODE-20-Y].

1.1 Getting started

Owing to the nature of this module, you can read about the module and find your study material
online. Go to the website at https://my.unisa.ac.za and log in using your student number and
password. Click on "myModules" at the top of the web page and then on "Sites" in the top right
corner. In the new window, click on the grey Star icon next to the modules you want displayed on
your navigation bar. Close the window in the top right corner. Then select the option "Reload to
see your updated favourite sites". Now go to your navigation bar and click on the module you
want to open.

We wish you every success with your studies!

2 OVERVIEW OF [insert module code]


2.1 Purpose

Students who have completed this module successfully will be able to:

To comprehend the concepts and terminology relating to an 8-bit microcontroller. To become


familiar with the microcontroller firmware development process to write programs to perform
various tasks.

2.2 Outcomes

For this module, you will have to master several outcomes:

Knowledge - The student will learn and understand 8-bit microcontroller well defined concepts
and terminology. He/she will learn the steps involved to develop firmware to drive an 8-bit
microcontroller.

Skills - The student will be able to use development tools such as assemblers, simulators and
emulators to write firmware programs to perform various tasks. The student will be able to make
use of input switches, seven segment displays, buzzers and keypads connected to the
microcontroller. He/she will also have the ability to use the on board timers, counters, interrupts
and A/D converter of the well-defined 8-bit microcontroller
3 CURRICULUM TRANSFORMATION
Unisa has implemented a transformation charter based on five pillars and eight dimensions. In
response to this charter, we have placed curriculum transformation high on the teaching and
learning agenda. Curriculum transformation includes the following pillars: student-centred
scholarship, the pedagogical renewal of teaching and assessment practices, the scholarship of
teaching and learning, and the infusion of African epistemologies and philosophies. These pillars
and their principles will be integrated at both programme and module levels as a phased-in
approach. You will notice a marked change in the teaching and learning strategy implemented by
Unisa, together with how the content is conceptualised in your modules. We encourage you to
embrace these changes during your studies at Unisa in a responsive way within the framework of
transformation.

4 LECTURER(S) AND CONTACT DETAILS


4.1 Lecturer(s)

The primary lecturer for this module is [insert lecturer names]:


Department:
Telephone:
E-mail:

4.2 Department

You can contact the Department of Electrical Engineering:

Telephone number:
E-mail:

4.3 University

To contact the University, follow the instructions on the Contact us page on the Unisa website.
Remember to have your student number available whenever you contact the University.

Whenever you contact a lecturer via e-mail, please include your student number in the subject
line to enable the lecturer to help you more effectively.

5 RESOURCES
5.1 Joining myUnisa

The myUnisa learning management system is the University's online campus which will help you
communicate with your lecturers, other students, and the administrative departments within
Unisa. To claim your myUnisa account, please follow the steps below:

1. Visit the myUnisa website at https://my.unisa.ac.za/portal


2. Click on the "Claim Unisa login" link on the top of the screen under the orange user ID box.
3. A new screen will load, prompting you to enter your student number. Please enter your
student number and click "continue".

4
4. Enter your surname, your full name, your date of birth and, finally, your South African ID
number (for South African citizens) OR your passport number (for foreign students). Then click
"continue". Remember to enter either an ID number or a passport number, NOT both.
5. Please read through the guidelines and click all the check boxes to acknowledge that you
have read all the information provided. Once you are done, click the "Acknowledge" button to
redirect you to the final page in the process.
6. The final page will display your myLife e-mail address, and your myLife AND myUnisa
password. This password will also be sent to the cellphone number displayed on the page for
safekeeping.
7. Please note that it can take up to 24 hours for your myLife e-mail account to be created.

Remember, the password provided is your myUnisa AND myLife password.

5.2 Prescribed book(s)

The only Prescribed book for this subject is: Ellis P, Pic Trix, ISBN: 0620236949, Student edition.

PLEASE USE THE STUDYGUIDE INCLUDED IN YOUR STUDY MATERIAL AS ADDITIONAL


INFORMATION. YOU MUST USE THE STUDY PROGRAMME ATTACHED TO THIS
TUTORIAL LETTER AS GUIDANCE THROUGH THE PRESCRIBED BOOK PICTRIX.

5.3 Recommended book(s)

None

Recommended books can be requested online, via the Library catalogue.

5.4 Electronic reserves (e-reserves)

E-reserves can be downloaded from the Library catalogue. More information is available at:

https://libguides.unisa.ac.za/request/request

5.5 Library services and resources

The Unisa Library offers a range of information services and resources:

• For a general Library overview, go to


https://www.unisa.ac.za/sites/corporate/default/Library/About-the-Library
Library @ a glance
• For detailed Library information, go to
https://www.unisa.ac.za/sites/corporate/default/Library
• For research support and services (eg personal librarians and literature search services), go
to
https://www.unisa.ac.za/sites/corporate/default/Library/Library-services/Research-support

The Library has created numerous Library guides to assist you: http://libguides.unisa.ac.za

Recommended guides:
• Request recommended books and access e-reserve material:
https://libguides.unisa.ac.za/request
• Requesting and finding library material: Postgraduate services:
https://libguides.unisa.ac.za/request/postgrad
• Finding and using library resources and tools (Research Support):
https://libguides.unisa.ac.za/research-support
• Frequently asked questions about the Library:
https://libguides.unisa.ac.za/ask
• Services to students living with disabilities:
https://libguides.unisa.ac.za/disability
• A-Z databases:
https://libguides.unisa.ac.za/az.php
• Subject-specific guides:
https://libguides.unisa.ac.za/?b=s
• Information on fines & payments:
https://libguides.unisa.ac.za/request/fines

Assistance with technical problems accessing the Unisa Library or resources:


https://libguides.unisa.ac.za/techsupport

[email protected] (insert your student number in the subject line please)

General library enquiries can be directed to [email protected]

6 STUDENT SUPPORT SERVICES


The Study @ Unisa website is available on myUnisa: www.unisa.ac.za/brochures/studies

This website has all the tips and information you need to succeed at Unisa.

6.1 First-Year Experience Programme @ Unisa

For many students, the transition from school education to tertiary education is beset with anxiety.
This is also true for first-time students to Unisa. Unisa is a dedicated open distance and e-learning
institution. Unlike face-to-face/contact institutions, Unisa is somewhat different. It is a mega
university and all our programmes are offered through a blended learning mode or fully online
learning mode. It is for this reason that we thought it necessary to offer first-time students
additional/extended support so that you can seamlessly navigate the Unisa teaching and learning
journey with little difficulty and few barriers. In this regard we offer a specialised student support
programme to students entering Unisa for the first time. We refer to this programme as Unisa’s
First-Year Experience (FYE) Programme. The FYE is designed to provide you with prompt and
helpful information about services that the institution offers and how you can access information.
The following FYE programmes are currently offered:

• FYE website: All the guides and resources you need to navigate through your first year at
Unisa can be accessed using the following link: www.unisa.ac.za/FYE
6
• FYE e-mails: You will receive regular e-mails to help you stay focused and motivated.

• FYE broadcasts: You will receive e-mails with links to broadcasts on various topics related to
your first-year studies (eg videos on how to submit assignments online).

• FYE mailbox: For assistance with queries related to your first year of study, send an e-mail to
[email protected]

7. HOW TO STUDY ONLINE


7.1 What does it mean to study fully online?

Studying fully online modules differs completely from studying some of your other modules at
Unisa.

• All your study material and learning activities for online modules are designed to be
delivered online on myUnisa.
• All your assignments must be submitted online. This means that you will do all your
activities and submit all your assignments on myUnisa. In other words, you may NOT post
your assignments to Unisa using the South African Post Office.
• All communication between you and the University happens online. Lecturers will
communicate with you via e-mail and SMS, and use the Announcements, the Discussion
Forums and the Questions and Answers tools. You can also use all of these platforms to
ask questions and contact your lecturers.

7.2 myUnisa tools

The main tool that we will use is the Lessons tool. This tool will provide the content of and the
assessments for your module. At times you will be directed to join discussions with fellow
students and complete activities and assessments before you can continue with the module.

It is very important that you log in to myUnisa regularly. We recommend that you log in at least
once a week to do the following:

• Check for new announcements. You can also set your myLife e-mail account so that you
receive the announcement e-mails on your cellphone.
• Do the Discussion Forum activities. When you do the activities for each learning unit, we
want you to share your answers with the other students in your group. You can read the
instructions and even prepare your answers offline, but you will need to go online to post your
messages.
• Do other online activities. For some of the learning unit activities you might need to post
something on the Blog tool, take a quiz or complete a survey under the Self-Assessment
tool. Do not skip these activities because they will help you complete the assignments and the
activities for the module.
We hope that by giving you extra ways to study the material and practise all the activities, this will
help you succeed in the online module. To get the most out of the online module, you MUST go
online regularly to complete the activities and assignments on time.

8. ASSESSMENT
8.1 Assessment plan

The assignments are as follows:


• Assignment 1 Registration Form for ELECTRONICS IV (ANNEXURE A)

• Assignment 2: Send in your portfolio

Submission of both assignments is compulsory.

The final mark is based on all the assignment marks obtained and their contribution towards the
final mark are as shown in the table below:

Assignment Unique No Due Date Contribution


Assignment 1: 10%
Assignment 2 (Portfolio): 90%

Submission of assignment 1 allows you to complete a portfolio, which is


examination for this subject. Failure to submit Assignment 1 by the due date, will
result in you being barred from handing in a portfolio assignment and you will have
to reregister for this subject.

*Because this is an online module, the assignments are not provided in this tutorial letter. Instead,
the assignments are provided online as they become due. You will see them when you go online.

8.2 Year mark and final examination/other options

Your year mark for this module is as presented in section 8.1.

8.3 Submission of assignments

8
NB: The old Programs WILL NOT be marked.

The aim of the practical assignments is to improve the learner’s knowledge and skill in using the
tools to perform entry level programming and application of the selected PIC micro-controller. It is
therefore important that the learner is able to identify, analyse and solve problems from
conceptual design to a satisfactory application solution, for a given practical task using the
selected PIC micro-controller.

NB:
For each assignment you will be given a basic description of a practical task that needs to be
solved. The following is required to solve each practical assignment:

• A comprehensive problem definition(p116)


• A conceptual design including.
• All the relevant definitions.
• Descriptions of expected procedures.
• A block diagram of the proposed hardware.
• Firmware design structure using a flow chart Diagram.
• Adequately commented firmware source code.

The firmware specification refers to the required physical format in which all written programs
must adhere too. The required firmware specification format is covered in the prescribed PIC
TRIX book and an appropriate firmware code template will be provided during laboratory
sessions. Students must use the given firmware code template for all the assignments.

NB: DO ALL ASSIGNMENT PROGRAMS + FLOWCHARTS


Example (SEE P120 for Flowchart and ALL the conceptional design) Adding
and subtracting binary numbers:

The objective of the first practical assignment is to familiarize the learner with Microchips During
this practical session the learner will be able to do the following:

• Create and build a project.


• Write the source code.
• Rectify code errors identified.
• Draw the flowchart for the software.

PROGRAM DESCRIPTION:

During the first practical session the student must learn how to use the PIC
microcontroller to write the software programs. For this reason a sample program to add
two numbers together and store the answer in a file register is already provided below.

; Program to add two 8-bit numbers together

List p=16F877A

Numb1 equip 20h ;Address of 1st number

Numb2 equ 21h ;Address of 2nd number

Answ equ 22h ;Address where result is to be saved

org 0000h ;Reset vector address

goto MainProg

MainProg org 0010h ;Start

address movlw 0x05 ;Load 1st number

movwf Numb1 ;Store in register Numb

movlw 0x03 ;Load 2nd number

Movwf Numb2 ;Store in register Numb2

movf Numb1,W ;Fetch 1st number

10
addwf Numb2,W ;Add 2nd number and store result

movwf Answ ;Store result in register Answ

goto $ ;Trap program (jump same lane)

end ;end of source program


8.4 ASSIGNMENT
ASSIGNMENT ONE

REGISTRATION FORM FOR INDUSTRIAL ELECTRONICS II


PRACTICAL WORKSHOP/COMPLETION OF PRACTICAL
ASSIGNMENT 2020

PLEASE COMPLETE IN CLEAR BLOCK LETTERS & SEND IN AS A


NORMAL ASSIGNMENT

FROM Surname/Initials

STUDENT NUMBER

POSTAL ADDRESS

POSTAL CODE

TEL NO (WORK)

TEL NO (HOME)

MOBILE

e-mail

Indicate preference with an X:

I want to attend the practical workshop

I want to do the practical assignment on my


own

The date, according to the workshop


schedule, on which I will attend the _________________________________
workshop?

ONCE A STUDENT WAS ALLOCATED TO A SPECIFIC DATE, NO CHANGES WILL BE


MADE.
SIGNATURE OF LEARNER …………………….. DATE: …………………….

12
module code/101/0/2022

Assignment 1

Flashing LEDs connected to port pin:

The objective of this practical assignment is to familiarize the learner with some of the PIC
microcontroller commands and to learn how fixed time delay routines are generated. Fixed time
delay routines are used quite often in a variety of I/O interfacing tasks such as switch contact
debouncing, periodic pulse width generation, slowing down of micro-controller for human
interfacing etc…(see PIC TRIX p125-127 for delays)

PROGRAM DESCRIPTION:

1. Write a firmware code to switch all LED’s connected to port pins RD0-RD7 continuously
on for one second and then off for one second.
2. First use a flowchart to determine the program structure and then generate your
commented firmware source code.

Assignment 2
Assignment 2.1

Binary 8-bit up or down switch controlled counter:

The objective of this practical assignment is to familiarize the learner with the PIC
microcontroller’s decision making ability and how to debouncing an input switch contact.
Pushbutton switches connected to input configured port pins will be used to control the program
counting sequence.

1. Write a program to demonstrate an 8-bit binary up or down counter displayed on the LED’s
connected to PortD(0-7).
2. When the pushbutton connected to port pin RA4 is held in the pressed position, the LED
displayed 8-bit binary value must count up continually every ½ second.
3. When the pushbutton connected to port pin RA0 is held in the pressed position, the LED
displayed 8-bit binary value must count down continually every ½ second.
4. Counting must stop only when both the input pushbutton switches are released.
5. First use a flowchart to determine the program structure and then generate your commented
firmware source code.

NB: When switches are used on Port A then the port must 1st be made a Digital port(p166).
When test for switches pressed use BTFSS or BTFSC instructions.

Assignment 2.2

Switch controlled binary bit rotated right or left:


The objective of this practical assignment is to provide the learner with an exciting challenge to
improve their understanding and programming ability through a decision-making controlled
process.

PROGRAM DESCRIPTION:

1. Write a program for an 8-bit port bit rotation displayed on LED’s connected to PortD(0-7).

2. When the pushbutton connected to port pin RA4 is pressed a single activated
LED connected to PortD rotates right every ½ a second.
3. When the pushbutton connected to port pin RA0 is pressed a single activated
LED connected to PortD rotates left every ½ a second.
4. If both the pushbuttons are pressed, all the LED's connected to PortD must flash on and
off every ½ a second for as long as they are both pressed.
5. If both the pushbuttons are not pressed, then the current position of the single activated
LED must be displayed continually without rotation.
6. First use a flowchart to determine the program structure and then generate your
commented firmware source code.(use the RLF and RRF instructions)

Assignment 2.3

One seven segment display, switch controlled counter:

The objective of this practical assignment is to familiarize the learner with the use of lookup
tables to display numerical numbers on a seven segment display.(Look-up tables explained
P136-137)

PROGRAM DESCRIPTION:

1. Every time the pushbutton connected to port A pin RA4 is pressed and then released the
seven segment connected to port C displayed numerical number increments.
3. The numerical seven segment displayed number must increment form 0 to 3 then repeat
from 0-3.

4. First use a flowchart to determine the program structure and then generate your
commented firmware source code.

5 Write a PIC16F877A assembler program to display zero to three on the seven


segment LED display shown in figure 1, every 500ms. When the displayed value
reaches three, the program must restart displaying from zero to three again. Create
a look-up table named “SevSegCode” that can be used to get the correct binary
pattern to display the numbers zero to three on the seven segment display. Assume
that a delay subroutine called “D500ms” already exists and can be called when a
delay between displaying numbers is required. Used a register “NumCnt” in memory

14
module code/101/0/2022

location 20h, to count from zero to three and show the required output port
initialization.

A A

B
F
RC6 C
RC5 G B
D
RC4 RC3
E E
RC2
RC1 F D C
RC0 G

PIC16F877A

Figure 1
Assessment Evaluation Mark Sheet
Mark Weight
DESCRIPTION obtained Allocation

Part A: Flowchart

Symbol application and labelling Out of 5%

Layout of flowchart Out of 5%

Loop implementation Out of 5%

Subroutine implementation Out of 5%

Workable solution to problem Out of 10%

Part B: Source File

Implementation of labels Out of 5%

Assembler directives Out of 5%

Use and validity of comments Out of 5%

Flowchart‐Source code correlation Out of 10%

Code efficiency Out of 10%

Part C: Demonstration

Lab assignment objectives met? Out of 20%

Learner’s ability to demonstrate Out of 15%

Total Out of 100%

DECLARATION BY STUDENT

By signing and submitting this form with your programs: I agree that I am familiar with the
assessment completion date and that this is my own work.

Student Signature:

16
module code/101/0/2022

9. CONCLUSION
Do not hesitate to contact us by e-mail if you are experiencing problems with the content of this
tutorial letter or with any academic aspect of the module.

We wish you a fascinating and satisfying journey through the learning material, and trust that
you will complete the module successfully.

Enjoy the journey!

[Lecturer’s name] – lecturer for [module code]

DEPARTMENT OF …

ANNEXURE: GLOSSARY OF TERMS


……

You might also like