Overview
Pins as inputs
The student will be able to:
- define the pins of a microcontroller parallel port as inputs or outputs by using commands in C language
- connect switches and pull up resistors to parallel port and use it as an input
- learn how to read a whole 8-bit word from a parallel input port
- learn how to read the value of a pin of a parallel port that has been defined as an input.
- learn how to check the value of a specific bit of a parallel input port
- select a different program based on the value given to an input parallel port
- The student must know the characteristic of a LED and how to connect it to a DC source (link1)
- The student must know the use of the Direction Register and the Data Register of a microcontroller parallel port, PIC18F4550 datasheet (I/O ports, p. 113)
- The student must know the commands of CCS C Compiler associated with the use of parallel ports, CCS C Compiler Manual (Built In Functions, DISCRETE I/O p. 159, set_tris_x() command p.244)
- The student must be familiarized with the Proteus Design Suite
Τhe duration of this module is 3 hours
Tip1. Some devices have polarity, for instance the LED, they must be connected in the right way.
Tip2. The program must include the main.h and the 18F4550.h files. These files must be in the same folder with your project
Last modified: Sunday, 21 November 2021, 9:56 AM