- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are just starting to develop a controller based on the IMD111T controller. Our product can be interfaced to many different types of control systems. Therefore we need to use either the analog voltage speed control input or the PWM (Duty) speed control input.
It looks like I can have a switch connected to a GPIO pin and use the scripting language to select the speed control input type. Generally the switch would be pre-set during our product assembly as required by our customer. This way we only need to program one configuration in all of our controllers.
For example, if GPIO2 = 1 then I want analog speed control and if GPIO2 = 0 then I want PWM control. The example below assumes that in MCEWizard, the input control method set was analog voltage control to begin with. Therefore I only need to set or clear bit 1 of the APPControl register to change between analog speed control input or PWM speed control input.
/*Task0 script function*/
Script_Task0()
{
if(GPIO2_IN)
{
CLEAR_BIT(APPControl,1);
}
else
{
SET_BIT(APPControl,1);
}
}
I just want to confirm it's this simple.
Thanks,
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MikeG,
Thanks for posting in the Infineon community.
Yes, You can read the GPIO, and based on it you can set APPConfig Register to select the control input between PWM duty and Analog input.
You could also refer to section 3.2.1.5 APPConfig in iMOTION – MCE – Software Reference Manual v1.3
Thanks,
Krupashankar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @MikeG,
Thanks for posting in the Infineon community.
Yes, You can read the GPIO, and based on it you can set APPConfig Register to select the control input between PWM duty and Analog input.
You could also refer to section 3.2.1.5 APPConfig in iMOTION – MCE – Software Reference Manual v1.3
Thanks,
Krupashankar