0% found this document useful (0 votes)
14 views2 pages

Assignment#1

The document is an assignment for the Engineering Technology Department focused on applications of microcontrollers, specifically the PIC18F family. It includes questions about program memory capacity, special function registers, program counter contents, and C programming tasks related to configuring ports and controlling LEDs based on switch inputs. The assignment emphasizes practical programming skills and understanding of microcontroller operations.

Uploaded by

ehero33g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Assignment#1

The document is an assignment for the Engineering Technology Department focused on applications of microcontrollers, specifically the PIC18F family. It includes questions about program memory capacity, special function registers, program counter contents, and C programming tasks related to configuring ports and controlling LEDs based on switch inputs. The assignment emphasizes practical programming skills and understanding of microcontroller operations.

Uploaded by

ehero33g
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Engineering Technology Department

Applications of Microcontrollers (EETE 4334)


Assignment#1

Q#1: For the following PICxx Microcontroller, what is the capacity of the program memory and
the capacity of the Data Memory?

Q#2:For PIC18F family, If the starting address of the special function registers is F90h, and the
number of the special function registers is 200 registers. What is the address of the last register in
the special function registers area?

Q#3: Assume that the PIC18F is currently executing a 32-bit instruction addressed by 000FF0H.
What are the current contents of the Program Counter?

1|Page Prepared by Dr. Khawla Alzoubi


Q#4: Using C language, configure:

a. all bits of PORTC as digital outputs


b. all bits of PORTD as digital Inputs
c. bits 0 through 4 of PORTB as digital inputs
d. bit 1 of PORTA as Analog Input

Q#5: Assume PIC18F45K22. Suppose that three switches are connected to bits 0–2 of port B and
an LED to bit 6 of port D. If the number of HIGH switches is even, turn the LED ON; otherwise,
turn the LED OFF. Write a C-program to accomplish this using “if-else” construct. Assume that a
‘1’ will turn the LED ON while a ‘0’ will turn it OFF. Show how these switches and LED are
interfaced with PIC18F45K22

Q#6: Using conditional or polled I/O data transfer approach ,write a C program for the
PIC18F45K22 to turn on an LED connected to bit 1 of PORTD (RD0) if the push button that is
connected on RC0 pin is pressed.

Q#7: using Interrupt I/O data transfer approach ,write a C program for the PIC18F45K22 to turn
on an LED connected to bit 1 of PORTC if the push button that is connected on RC0 pin is
pressed.

2 Prepared by Dr. Khawla Alzoubi

You might also like