You might need to implement high-precision variable speed in a motor control application or high-speed control loop execution in a power conversion application. Your home appliance design may need functional safety certification, or your industrial automation application may require math-intensive functions. To address these real-world design requirements, you need a high-performance solution that provides the processing power of a Digital Signal Controller DSC and the design simplicity of a microcontroller MCU. The slave core is used for executing dedicated, time-critical control code while the master core is busy running the user interface, system monitoring, and communications functions that are customized for your end application.
|Published (Last):||26 February 2018|
|PDF File Size:||10.72 Mb|
|ePub File Size:||6.76 Mb|
|Price:||Free* [*Free Regsitration Required]|
Download and extract the source code for this demo to a folder. You may need to locate your own p33FJGP Hardware profile Most of the code for this demo is located in main. The define statements give the hardware names that are easier to remember and use. LATA10 pin name. The only absolutely necessary line in HardwareProfile. Configuration bits Configuration bits are settings that control how the PIC is configured when it first starts.
This is particularly important for clock settings and watchdog timers. If the configuration bits are set for an external clock source, but none is present as on the web platform , the PIC will never start.
The configuration bits are stored in the last few bytes of the flash program space on 16 bit PICs. When you compile your own firmware, be sure to include the first two config lines shown in the example. They set the clock source to the internal oscillator, and disable external clock hardware. The bootloader in the web platform does program the configuration bits included in firmware files. See the end of p33FJGP Every C program should include this function.
We use the internal oscillator to derive clock frequencies up to 80MHz. The 7. Once configured, we have to wait for the clock to stabilize. See section 9. This feature makes possible the simple routing used on the web platform. See section The speed is determined by the value in UxBRG. Use a baud rate calculator to calculate the value for your desired serial port speed key constants:ds33, We enable the UART receiver, but leave the transmitter off. We included the UART configuration code in the main function for clarity and simplicity, but you could replace it with a call to the InitializeUART1 function that contains the same code.
See section 18 page of the data sheet for more about the UART configuration options. To use a pin for digital input and output, we need to disable the analog functions on a pin by writing 1 to the corresponding bits of the AD1PCFGL register. The pins are now digital inputs, a state that still protects any external connections from unwanted output.
In order to drive a LED the pins must be outputs. The TRIS register controls pin direction. The LAT register controls pin state. The next three lines of code turn on the LEDs. These macros are also defined in HardwareProfile. Use the PORT register to read pins.
Read the PORT register to see the actual state of input pins. Rxx bits for the web platform IO pins. Since while 1 is always true, the PIC will run this code forever.
At the end, c is echoed back. Compiling Download the full project source code ZIP file from here. The FTDI chip will appear as a new virtual serial port on your system. Press the reset button on the web platform.
Type 0 into the terminal to turn off all the LEDs. Type 1,2,or 3 to light different LEDs. Each character will be echoed back to the terminal. Taking it further.
dsPIC33C Digital Signal Controllers
- HENRY MILLER QUIET DAYS IN CLICHY PDF
- BIOLOGICAL PSYCHOLOGY 6TH ED BY BREEDLOVE WATSON ROSENZWEIG PDF
- VALLALAR HISTORY IN PDF
- ADMINISTRACION UNA PERSPECTIVA GLOBAL HAROLD KOONTZ PDF
- AURICULOMEDICINA DR NOGIER PDF
- DIE PROPHEZEIUNGEN DER BORBARAD-KAMPAGNE PDF
- APOCALIPSIS EL FIN DE LOS TIEMPOS ADRIAN ROGERS PDF