Introduction to Microcontrollers Lab Manual - Microchip
Introduction to Microcontrollers Lab Manual - Microchip
Introduction to Microcontrollers Lab Manual - Microchip
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
3.3 THE LAB<br />
3.3.1 Objective<br />
Program the PIC24 microcontroller <strong>to</strong> use the UART <strong>to</strong> communicate with a program<br />
such as Windows HyperTerminal. Setup the UART for 8N1 with 9600 baud, and show<br />
your baud rate calculations.<br />
Use the UART receiver interrupt <strong>to</strong> inform you when a character is available. Process<br />
the character received and transmit back the same character but in the opposite case,<br />
i.e. if a lower case “e” is received, then “E” would be transmitted back.<br />
Connect the RS232 port of the MX Educational Target <strong>to</strong> a PC and use a terminal emula<strong>to</strong>r<br />
(e.g. HyperTerminal that comes with Windows) <strong>to</strong> communicate with the embedded<br />
processor using ACSII characters.<br />
3.3.2 Pertinent Information<br />
The PIC24FJ256GB110 has 4 configurable UARTS. This lab will only use one.<br />
Configure PPS for the chosen UART peripheral. To use the DB9 RS-232 port “CH1” on<br />
the MX Educational Target board, map Rx <strong>to</strong> RP30 (pin 52) and Tx <strong>to</strong> RP15 (pin 53).<br />
To enable handshaking (not required), map RTS <strong>to</strong> RP5 (pin 48) and CTS <strong>to</strong> RPI43 (pin<br />
47). The basic program flow is depicted in Figure 3-4.<br />
2011 <strong>Microchip</strong> Technology Inc. DS51963A-page 31