You are on page 1of 2

INSTITUTO TECNOLGICO DE CELAYA

Mechatronics Engineering
Practice 3
"Adder and subtractor
Abstract In this practice, the student will get acquainted with the basic assembler instructions for moving data
and performing some basic arithmetic operations.

Keywords assembler, port, work register.

I. REQUIREMENTS
Develop and implement an algorithm in assembler for the PIC16F628A to calculate the addition and
subtraction (A-B) of two 3-bit operands. The operands A and B must be read from port A; each operand will be
defined with a 4-bit dip switch connected to this port (A<RA2:RA0> and B<RA5:RA4>). The pin RA7 allows
the user to select the desired operation, in this case, when is read a 0 level from this pin, the microcontroller
must calculate the addition, otherwise the subtraction. The result of the operation must be shown in 4 LEDs
connected in PORTB <RB3:RB0>. Consider the fourth bit (RB3) as the carry and as the negative flag depending
on the operation executed.

II. ABOUT THE EVALUATION


To approve this practice, the student must accomplish:
An algorithm and implementation totally functional as requested.
Date for an ordinary evaluation: September 29th, 2017.
Date for a complementary evaluation: October 4th, 2017.

Mechatronics Engineering, Microcontrollers. September 19th, 2017.


INSTITUTO TECNOLGICO DE CELAYA
Mechatronics Engineering
Practice 4
"Binary Coded Decimal
Abstract In this practice, the student will design and implement a system to convert from a binary input to a
decimal number showed in two 7-segment displays.

Keywords decoder, multiplexer, subroutine.

I. REQUIREMENTS
Design and implement an algorithm for a decoder, which input is a 5-bit number connected in port A
<RA4:RA0>. The decimal number must be shown in two 7-segments displays to display tens and units. Both
displays must be connected to port B <PB6:PB0>, so they are multiplexed by two additional outputs from the
MCU <RA7:RA6>. E. g. If the user defines an input of 01110, the displays must show a 1 and a 4 to form
the number 14.

II. ABOUT THE EVALUATION


To approve this practice, the student must accomplish:
A design and implementation totally functional as requested.
Include and submit a report with the required format, where the student presents the theory,
calculations, and the design of the prototype developed, including its results and his conclusions.
Date for an ordinary evaluation: October 6th, 2017.
Date for a complementary evaluation: October 11th, 2017.

Mechatronics Engineering, Microcontrollers. September 24th, 2017.

You might also like