Logic after PWM
Submitted by akowal on Fri, 05/11/2012 - 00:54
I was wondering if it is possible to essentially 'process' (i.e. test with logic, and run through algorithms) the PWM signal in VisSim. I get how to make a PWM signal using the ePWM block, just not sure how I can go about using this generated signal afterwards. Would I just use the GPIO pin that corresponds to that particular PWM output? I'm using a 'delfino' F28335, on a peripheral explorer card.
Answers
-
Submitted by Anders89 on Fri, 05/11/2012 - 02:19.
There are several things you can do. One is to access the pin as both a PWM and GPIO. VisSim will generate a resource usage conflict warning at codegen time, but you can ignore that. We have existing diagrams that will run a slow PWM on the target and store the GPIO pin values to a monitor buffer so you can view the PWM wave form interactively in VisSim on the PC. You can find them for Delfino in the VisSim menu here:
Embedded > Examples > Delfino > ePWM2833x0