Waley

IT111: Computer Architecture with Assembly Language
Final Lab Exam – Embedded C Programming and Simulation

General Direction:

  1. Develop a schematic diagram using Proteus ISIS
  2. Create a program using mikroC compiler
  3. Simulate the schematic diagram using Proteus ISIS with preloaded .hex file

Application Project # 1 – Sequence LEDs (10 pts.)

In this project 8 LEDs are 8 LEDs are connected to PORTB of a PIC18F2550 an follow the pattern shown below.

  A. Pattern 1 – header files (typedef.h, design_apps1a.h) and main function (design_apps1a.c)

  B. Pattern 2 – header files (typedef.h, design_apps1b.h) and main function (design_apps1b.c)

Application Project # 2 – Chasing LEDs – header files (typedef.h, design_apps2.h) and main function (design_apps2.c) - (10 pts.)

In this project 8 LEDs are connected to PORTC of a PIC18F452 microcontroller and the microcontroller is operated from a 4MHz resonator. The program turns on the LEDs in an anti-clockwise manner with one second delay between each output and vice versa. The net result is that the LEDs seem to be chasing each other.


Figure 1. Schematic diagram of chasing LEDs

Application Project # 3 – Simple LED Dice - header files (typedef.h, design_apps3.h) and main function (design_apps3.c) - (15 pts.)

In this project 7 LEDs are connected to PORTC of a PIC18F452 microcontroller and the microcontroller is operated from a 4MHz resonator. The LEDs are organized as the faces of a real dice. When a push-button switch connected to RB0 is pressed a dice pattern is displayed on the LEDs. The display remains in this state for 3 seconds and after this period the LEDs all turn OFF to indicate that the system is ready for the button to be pressed again.

Figure 2. Block diagram of the project

Figure 3. LED dice Pattern

Figure 4. Circuit diagram of the project


Figure 5. Pseudo Code Language (PDL) of the project

Table 1. Dice number and LEDs to be turned ON



Table 2. Required number and PORTC...