Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Slide 13 Slide 14 Slide 15 Slide 16 Slide 17 Slide 18 Slide 19 Slide 20 Slide 21 Slide 22 Slide 23 Product List
Program UART

All peripherals must have their functions allocated by the crossbar in order for them to be available at the pins of the device. In many devices there are no dedicated pins for TX and RX; however, some TX and RX signals are allocated by the crossbar to port 0 pin 4 for Tx and port 0 pin 5 for Rx for all cases. The XBRx registers define what peripherals get assigned to I/O through the crossbar. In addition, the I/O pins need to be configured appropriately for the direction of the signal mapped to the pin. For example, the Tx signal requires the pin to be configured as a push pull output, whereas the Rx signal requires the pin to be configured as an input. These can be configured through the PMDOUT register. A suitable timer needs to be programmed to generate the baud rate. Configuration of the timer will be covered in later slides. The SCON0 register is used to select the serial port operation mode and enable/disable UART reception. Then the user can enable the UART interrupts and set the priorities (if desired).

PTM Published on: 2011-02-07