Submit a ticket at our help desk. Our Support team will find the answer to all your questions.
See our Knowledge base, before you post a ticket - perhaps you'll find the solution to your problem faster.
Libstock is a community website created by mikroElektronika, that allows users to share their projects and libraries. It’s created with aim to provide the community with the right and neccessary infrastructure for this.
This is the place for all your additional questions and suggestions. Our team is ready for all your questions. We will handle everything in a timely manner. Feel free to send your request using the form on the web page.
Use our latest embedded development solutions to experience the rapid prototyping on a whole new level. We bring you the most complete, most innovative, and most reliable development toolchain in the industry, giving you an edge over the competition, greatly reducing the time to market.
Learn more about our rapid development toolchain. A huge number of articles and examples that might inspire you or give you a kickstart. A huge knowledge base will provide you with the guidance you need.
Many practical examples and demonstration applications that you can use as a starting point or reference for your own custom design. Each post offers guidance and explanations not only about the project but also about the used technology.
The output compare module has the task of comparing the value of the time base counter with the value of one or two compare registers depending on the Operation mode selected. It is able to generate a single output pulse or a sequence of output pulses when the compared values match; also, it has the ability to generate interrupts on compare match events.
The dsPIC30F4013 controller has 4 output compare modules whereas controller dsPIC6014A has 8. Each output compare channel can select which of the time base counters, TMR2 or TMR3, will be compared with the compare registers. The counter is selected by using control bit OCTSEL (OCxCON<3>).
The output compare module has several modes of operation selectable by using control bits OCM<2:0> (ocXcon<2:0>):
Single compare match mode,
Dual compare match mode generating either one output pulse or a sequence of output pulses,
Pulse Width Modulation (PWM) mode.
NOTE: It is advisable, before switching to a new mode, to turn off the output compare module by clearing control bit OCM<2:0>.
Fig. 6-1 Functional diagram of output compare module