Elec307 - M5A1.docx - 1 Write a program to toggle all bits...

This preview shows page 1 - 3 out of 3 pages.

1. Write a program to toggle all bits of PORTB and PORTC continuously (a) using AAH and 55H (b) using the COMF instruction.
2. Explain the role of TRISx and PORTx in I/O operation.
3. Interface four common anode seven-segment LEDs to the PIC18F452 microcontroller using PORTB and PORTC. Write instructions to display a four-digit
number stored in data registers starting from REG20 (address 20H). Simulate your

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture