Blockset described on this wiki is deprecated since 2012.
For Model Based Design (MBD), use the free MPLAB Device Blocks for Simulink, tool from Microchip.
Updated Rapid Control Prototyping (RCP) custom projects are published at: https://lubin.kerhuel.eu.
Difference between revisions of "DsPIC Block"
Jump to navigation
Jump to search
LubinKerhuel (talk | contribs) |
LubinKerhuel (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | [[Image:BlocksetLibrary.png|tumb|450px|frame|right|PIC/dsPIC blockset Library for Simulink]] | ||
+ | |||
==Root== | ==Root== | ||
− | |||
;[[/Master|Master]]: Select the targeted microcontroller, Set its Clock configuration including PLL, and few options to check that real time is respected. | ;[[/Master|Master]]: Select the targeted microcontroller, Set its Clock configuration including PLL, and few options to check that real time is respected. | ||
− | |||
− | |||
;[[/Compiler_Configuration|Compiler Configuration]]: Define the size of double (32/64 bits ;default is 32) | ;[[/Compiler_Configuration|Compiler Configuration]]: Define the size of double (32/64 bits ;default is 32) | ||
− | |||
==Digital I/O== | ==Digital I/O== | ||
− | [[/Digital_Input]] | + | ;[[/Digital_Input|Digital Input]]: Logic Input |
− | [[/Digital_Output_Write]] | + | ;[[/Digital_Output_Write|Digital Output Write]]: Logic Output, write a value |
− | [[/Digital_Output_Read]] | + | ;[[/Digital_Output_Read|Digital Output Read]]: Logic Output, get the las value written |
− | + | ==Peripheral I/O Functions== | |
− | [[/ADC_Analog_to_Digital_Converter]] | + | ;[[/ADC_Analog_to_Digital_Converter|Analog to Digital Converter (ADC)]]: Input driver for analog-to-digital converter (ADC) |
− | [[/Input_Capture]] | + | ;[[/Input_Capture|Input Capture (IC)]]: Pulse width modulation capture |
− | [[/ | + | ;[[/Change_Notification|Change Notification (CN)]]: Pulse width modulation capture and change notification |
− | [[/ | + | ;[[/External_Interrupt_PWM|External Interrupt (EI)]]:Pulse width modulation capture and change notification |
− | [[/ | + | ;[[/Output_Compare|Output Compare (OC)]]:Pulse width modulation (PWM) signal generation |
− | [[/PWM_Motor_Output]] | + | ;[[/PWM_Motor_Output|PWM Motor Output]]:Pulse width modulation (PWM) signal generation |
− | + | ==Serial Port (UART)== | |
− | [[/UART_Configuration]] | + | ;[[/UART_Configuration|UART Configuration]]:Set UART configuration |
− | [[/Tx_Output]] | + | ;[[/Tx_Output|Tx Output]]:Serial output a scalar or vector of uint8 data |
− | [[/Rx_Input]] | + | ;[[/Rx_Input|Tx Input]]:Serial Input a scalar of uint8 data |
− | [[/Tx_Output_Multiplexed_For_Matlab-Labview]] | + | ;[[/Tx_Output_Multiplexed_For_Matlab-Labview|Tx Output Multplexed for Matlab-Labview]]:Serial output of data with conditionning allowing graphical monitoring of variable into matalb in pseudo real time |
− | [[/Interface_Tx-Matlab]] | + | ;[[/Interface_Tx-Matlab|Interface Tx-Matlab]]:MAtalb Grapical User Interface to collect, view and record varaible evolution send using Tx Output Multiplexed for Matlab-Labview |
− | + | ==SPI PORT functions== | |
− | [[/SPI_Configuration]] | + | ;[[/SPI_Configuration|SPI Configuration]]:Configure the microcontroller SPI port |
− | [[/SPI_Input_Output]] | + | ;[[/SPI_Input_Output|SPI Input/Output]]:Input-Output driver for SPI transmission |
− | + | ==BUS CAN== | |
− | [[/CAN_Configuration]] | + | ;[[/CAN_Configuration|CAN Configuration]]:Configure the CAN Peripheral |
− | [[/CAN_Transmit]] | + | ;[[/CAN_Transmit|CAN Transmit]]:Output block for CAN Peripheral |
− | [[/CAN_Receive]] | + | ;[[/CAN_Receive|CAN Receive]]: Input block for CAN Peripheral |
− | + | ==BUS I2C== | |
− | [[/I2C_Master]] | + | ;[[/I2C_Master|I2C MAster]]:I2C Peripheral (as master) |
− | + | ==Others== | |
− | [[/Calculus_Time_Step]] | + | ;[[/Calculus_Time_Step|Calculus Time Step]]:Get the calculation time |
− | [[/C_Function_Call]] | + | ;[[/C_Function_Call| C Function Call]]:Call custom write handed C function |
− | [[/Nop]] | + | ;[[/Nop|Nop]]: Add Nop instructions introducint a lag time between two blocks |
− | [[/Software_Reset]] | + | ;[[/Software_Reset|Software Reset]]:Reset the microcontroller |
<!-- | <!-- | ||
− | + | [[Image:Block_Compiler_Configuration.png|120px|right]] | |
− | + | [[Image:Block_Master.png|120px|right]] | |
Block_Digital_Input.png | Block_Digital_Input.png | ||
Block_Digital_OutputWrite.png | Block_Digital_OutputWrite.png |
Revision as of 11:21, 15 June 2008
Contents
Root
- Master
- Select the targeted microcontroller, Set its Clock configuration including PLL, and few options to check that real time is respected.
- Compiler Configuration
- Define the size of double (32/64 bits ;default is 32)
Digital I/O
- Digital Input
- Logic Input
- Digital Output Write
- Logic Output, write a value
- Digital Output Read
- Logic Output, get the las value written
Peripheral I/O Functions
- Analog to Digital Converter (ADC)
- Input driver for analog-to-digital converter (ADC)
- Input Capture (IC)
- Pulse width modulation capture
- Change Notification (CN)
- Pulse width modulation capture and change notification
- External Interrupt (EI)
- Pulse width modulation capture and change notification
- Output Compare (OC)
- Pulse width modulation (PWM) signal generation
- PWM Motor Output
- Pulse width modulation (PWM) signal generation
Serial Port (UART)
- UART Configuration
- Set UART configuration
- Tx Output
- Serial output a scalar or vector of uint8 data
- Tx Input
- Serial Input a scalar of uint8 data
- Tx Output Multplexed for Matlab-Labview
- Serial output of data with conditionning allowing graphical monitoring of variable into matalb in pseudo real time
- Interface Tx-Matlab
- MAtalb Grapical User Interface to collect, view and record varaible evolution send using Tx Output Multiplexed for Matlab-Labview
SPI PORT functions
- SPI Configuration
- Configure the microcontroller SPI port
- SPI Input/Output
- Input-Output driver for SPI transmission
BUS CAN
- CAN Configuration
- Configure the CAN Peripheral
- CAN Transmit
- Output block for CAN Peripheral
- CAN Receive
- Input block for CAN Peripheral
BUS I2C
- I2C MAster
- I2C Peripheral (as master)
Others
- Calculus Time Step
- Get the calculation time
- C Function Call
- Call custom write handed C function
- Nop
- Add Nop instructions introducint a lag time between two blocks
- Software Reset
- Reset the microcontroller