Matlab-Simulink device driver Blockset for Microchip dsPIC / PIC24 / PIC32 Microcontrollers.
DsPIC Block/External Interrupt PWM
The External Interrupt block allow to detect and/or measure Time Pulse (like PWM) on EI ports of dsPIC. This block define function of one EI port only. Use many blocks to use many EI..
Dialog Box Parameters
Specify the External Interrupt PIN used.
ext Interrupt Priority
Select the priority for the interrupt since each modification start interrupt execution code..
Speicfy what you want to measure.
Max capture Time
Define max time in secondes of the largest event to be measure by the respective channel.
Safety Margin in %
Add a margin to the max time defined previously. This margin time allow to avoid provided the event is larger than the max attempted value.
ValMax / Channel Variable Name
This Variable will be evaluated in the workspace and allow you to scale the data.The ValMax is the max value that will be given by an event of the duration defined in Max/Channels. This value does not take into account the Safety margin.
Result Byte Resolution
This is the log2 of the ValMax Variables for each channels.
This is the timer that is used with the corresponding channel. It is set automatically. The timer prescaler are defined in the Master block.
Change Detected on
Add outputs to the block. For each channel, you can know if a changed has appears. The output is set to 1 either on rising edge, falling edge or both.
Block Ordering Input/Output
Add the Ordering port on Simulink block.This does not affect code generated excepted for the block execution order.
-1 mean inherited