You are on page 1of 2

Subject: DIGITAL SYSTEMS 2

Student:

Practice Name BYTE AND BIT ORIENTED INPUT/OUTPUT INSTRUCTIONS

Practice Number 2 Length (Hours) 4

OBJECTIVE (Learning result)

The student will be able to configure as input/output the ports of the microcontroller PIC18F4550 and the ports of the
PIC18f8723 as well as to manage Byte and Bit oriented instructions.

THEORETICAL FRAMEWORK

- Main features of the PIC18F4550, PIC18F8723


- Define: Free-run counter, High impedance
- Perform the following numerical conversions:
- A9F0 to Binary
- F533 to Binary
- ECEB to Binary
- 1101 1011 to Hexadecimal
- 1000 0000 to Hexadecimal
- 0101 0100 to Hexadecimal
- 0010 1110 to Hexadecimal

MATERIALS AND EQUIPEMENT

Software: ISIS 7 Professional, PIC C Compiler

METHODOLOGY

1.- Type the Source code “My First C program” (prog 1.c)

2.- Identify and explain each one of the following lines of code:

a) Pre-processor directive which indicates the microcontroller


b) Clock frequency
c) Fuse XT
d) Main function
e) Infinite loop
f) No code protection fuse

3.- Compile the code and write down the output files that are generated
4.- Use the software ISIS 7 to simulate this code
5.- Modify the source code “My first C program” in order to show on port B a 8-bit free-run counter with delays of 250 ms
6.- Build the schematic and simulate the free-run counter (Check point 1)
7.- Modify the code in order to control the direction of a stepper motor by using a single one-bit input (C0) (Check point 2)
8.- Modify the program in order to build a pulse counter from 0 to 99. This is, a pulsed input will be read on PIN C0 and the
number of pulses shown on port B (7 segment display #1) and D (7 segment display #2), (Use the PIC18F8723) (Check point 3)
9.- Build the schematic, simulate the pulse counter and wire the circuit (USING THE PIC18F4550). (Check point 4)

PRACTICE EVALUATION

QUESTIONARY

1. What is the content of the header file PIC18F4550.H?


2. Define the use of the fuses XT, NOWDT and NOPROTECT
3. Which is the working frequency of this microcontroller?
4. Add the schematic used to simulate the 8-bits free-run counter
5. Add the schematic used to simulate the 8-bits pulse counter
6. Add the schematic used to simulate the stepper motor control
7. Add the schematic used to simulate the pulsed counter when using 7-segments display with the PIC18F8723
8. Take a picture of your protoboard when using the 7-segments display and add it to this report
9. Write three differences between the PIC18F4550 and the PIC18F8723?

Conclusions

(Results interpretation, Was the objective reached? Possible applications, etc.)