dsPIC33 - RS232 Module + Peripherial Pin Select
Posted: Wed Feb 06, 2013 10:26 pm
Hello all,
I am using Flowcode 5 to program mostly dsPIC devices (30 and 33 series) and I'm trying to use the the RS232 module to make 2 of these communicate between each other in the simplest of ways.
The dsPIC I'm using is a dsPIC33EP512GP806 with a great feature called Peripheral Pin Select which essentially allows one to configure most pins to act as specific I/O pins. Below a more thorough description of this feature.
Anyway, my question is simple: for the RS232 module in Flowcode (in hardware mode), how do I configure the specific pins I want to act as UART1 TX and RX? I assume it's a bit of C code stuck to the start of the program, but I am just assuming... don't know what exactly either.
Thanks for your help...
Ronald
PERIPHERAL PIN SELECT
A major challenge in general-purpose devices is providing the largest possible set of peripheral features while minimizing the conflict of features on I/O pins. The challenge is even greater on low pin-count devices. In an application where more than one peripheral needs to be assigned to a single pin, inconvenient workarounds in application code or a complete redesign may be the only option.
Peripheral pin select configuration provides an alternative to these choices by enabling peripheral set selection and their placement on a wide range of I/O pins. By increasing the pinout options available on a particular device, users can better tailor the microcontroller to their entire application, rather than trimming the application to fit the device.
The peripheral pin select configuration feature operates over a fixed subset of digital I/O pins. Users may independently map the input and/or output of most digital peripherals to any one of these I/O pins. Peripheral pin select is performed in software and generally does not require the device to be reprogrammed. Hardware safeguards are included that prevent accidental or spurious changes to the peripheral mapping once it has been established."
I am using Flowcode 5 to program mostly dsPIC devices (30 and 33 series) and I'm trying to use the the RS232 module to make 2 of these communicate between each other in the simplest of ways.
The dsPIC I'm using is a dsPIC33EP512GP806 with a great feature called Peripheral Pin Select which essentially allows one to configure most pins to act as specific I/O pins. Below a more thorough description of this feature.
Anyway, my question is simple: for the RS232 module in Flowcode (in hardware mode), how do I configure the specific pins I want to act as UART1 TX and RX? I assume it's a bit of C code stuck to the start of the program, but I am just assuming... don't know what exactly either.
Thanks for your help...
Ronald
PERIPHERAL PIN SELECT
A major challenge in general-purpose devices is providing the largest possible set of peripheral features while minimizing the conflict of features on I/O pins. The challenge is even greater on low pin-count devices. In an application where more than one peripheral needs to be assigned to a single pin, inconvenient workarounds in application code or a complete redesign may be the only option.
Peripheral pin select configuration provides an alternative to these choices by enabling peripheral set selection and their placement on a wide range of I/O pins. By increasing the pinout options available on a particular device, users can better tailor the microcontroller to their entire application, rather than trimming the application to fit the device.
The peripheral pin select configuration feature operates over a fixed subset of digital I/O pins. Users may independently map the input and/or output of most digital peripherals to any one of these I/O pins. Peripheral pin select is performed in software and generally does not require the device to be reprogrammed. Hardware safeguards are included that prevent accidental or spurious changes to the peripheral mapping once it has been established."