Test the operation of the ports of your development board


REFERENCE:

  • Mazidi, McKinlay, and Causey "PIC Microcontroller and Embedded Systems,"

MATERIALS:

  •  Development board HP-488
  •  MPLAB
  •  Logic probe

ACTIVITY 1

Test the operation of the ports of your Development board as follows. Write and compile a program to toggle all the bits of PORTA, and PORTB continuously by sending 55H and AAH to these ports. The PORTA and PORTB pins are connected to the LED of the Board. Use your board to watch the bits of the ports toggle on and off. Make sure that the time delay in between the "on" and "off" states is long enough that you can observe each state clearly.

ACTIVITY 2
Test the PIC's ports for input operation as follows. PORTA and PORTB is connected to the push buttons of on board. Write and run a program to get data from PORTB and send it to PORTA. Any change of status of the switches connected to PORTB will be instantly reflected on LEDs connected to PORTA.

 

Microcontrollers and Embedded Systems
1. Upon reset, all ports of the PIC are configured as _____________ (output, input).
2. Which port of the PIC18F has ADC channels?
3. Which pin(s) of PORTB in the PIC18 is used for low-voltage-programming (LVP) by the Development board HP-488 and can not be used as I/O?
4. In the PIC, explain why we must write "1" to TRISx register in order for the port to be used for input.
5. Explain why we need to buffer the switches used as input in order to avoid damaging the PIC port.
6. Explain the different roles played by the PORTC and TRISC registers in I/O operation.

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: Test the operation of the ports of your development board
Reference No:- TGS01423062

Expected delivery within 24 Hours