2005-10-20 02:13 AM
Problem while updating PWM
2011-05-17 01:19 AM
Hi, All.
I discovered a very strange behaviour while updating PWM. Now in details: Settings: autoswitch, sensor, voltage, 8-bit PWM mode. PWM is generated on odd MCOx channels only. Problem: while continuously !!!DECREASING!!! MCPUH value PWM disappears on odd MCOx outputs until MCPUH gets stable value. On even MCOx outputs signal is stable. At the same time i have the same PWM on MCPWMW output. It looks always perfect. It means that problem is somewhere in pwm-manager block (and in my brain :) ) One more thing i don't understand. The same mc settings. Outputs are on, MTC clock is off. MCPUH has value, let's say, 2 times lower than MCP0L (it means 50% duty cycle by edge-aligned mode). I have signal on some odd MCO output where PWM is generated. as far as MTC clock is off, there is logical 1 on this output. What do i do? Just switch MTC clock on. Theoretically on this output PWM should appear immediatelly. But it appears in some hundred millisec. I need PWM without any delay. Any update of MCPUH doesn't bring effect. P.S.: Writing this post i have got an idea. If all pwm related registers have preload registers, it means they have to be updated everytime PWM update has occured. Am I right?2011-05-17 01:19 AM
Hi, All.
First problem solved!!! :-] :-] :-] But how!!! I just deleted line which updates MCPWH register. Why do I use it? Just for debugging purposes. What kind of influence gives MCPWH? As far as I am using voltage mode, PCN bit is reset, should be no influence of MCPWH on the motor block. I am totaly confused :-? I am about investigation second problem i have mentioned in prev post.2011-05-17 01:19 AM
Second problem solved in this way as well.
Really, I don't understand it. Whatever, I am happy :-] :-] :-]2011-05-17 01:19 AM
Hi Luter,
congratulations!! That's what I call a perfect case: you submit the problem :-[ and YOU solve the problem :-] By the way, it should be investigated further. I will let you know when I have the solution. For now, my afternoon is free... ;) Best regards, Tanio