View previous topic :: View next topic |
Author |
Message |
valemike Guest
|
Anyone have a problem w/glitchy ECCP? |
Posted: Tue Jul 05, 2005 12:49 pm |
|
|
Hi,
Has anyone had a problem with glitchy ECCP values? i know that ECCPR1L is double-buffered, but there are times when my motor has a sudden initial jerk for a split second.
This occurs when I go from single PWM ECCP mode to Full Bridge mode. I know for sure that I put an intermediate value of 0 to the ECCPR1L register while i re-configure the ECCP.
I think my problem is not the code, but rather, i think that the ECCP module just may have an undocumented bug. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jul 05, 2005 2:22 pm |
|
|
But what PIC are you using ?
I would go read the errata for the PIC, and also search the Microchip
forums for the keyword ECCP. |
|
|
valemike Guest
|
|
Posted: Tue Jul 05, 2005 2:46 pm |
|
|
PIC18F458
I think this is a matter for Microchip's tech support.
Or it can be that i'm using LATD wrong, which is what i address in a post earlier today.
I take for granted how programming errors can be quite disastrous. For example, if i made this mistake on a PICDEM demo board, worst that can happen is an LED fails to turn on. But on the real target, it made my motor H-bridge suffer some brief shoot through, which fried my IGBTs to short out, and 200 lbs of weights flew and hit the wall! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
valemike Guest
|
|
Posted: Tue Jul 05, 2005 3:23 pm |
|
|
Yeah, i'm aware of that errata. I have to look at some internal registers to see which rev. the chip is.
However, I dont use ECCP in half-bridge mode (which is the only ECCP mode that the errata applies to), and just to be safe, I even forced the delay to be 0 to avoid any glitches, as the errata says to do.
Perhaps my problem is related to that same bug, though they don't document it in the errata. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jul 05, 2005 3:35 pm |
|
|
Look at the following errata.
PIC18F6627/6722/8627/8722 Rev. A1 Silicon Errata
http://ww1.microchip.com/downloads/en/DeviceDoc/80221a.pdf
It talks about getting unexpected short pulses in Full Bridge mode
when switching directions.
I think it's valid to look at errata for other PICs because Microchip
may use the same ECCP design in several chips, but maybe the bug
is only reported for one PIC (so far). |
|
|
valemike Guest
|
|
Posted: Tue Jul 05, 2005 3:47 pm |
|
|
Thanks for bringing this errata to my attention.
Anytime i change PWM modes or directions, i make sure to set the TRIS bits as inputs (which overrides the ECCP modes), wait a few ms, disable the ECCP module, heck i even set the ECCPR1L to 0. So this errata doesn't apply to my problem. Maybe it does, who knows.
i'll try again tomorrow. |
|
|
valemike Guest
|
|
Posted: Tue Jul 05, 2005 4:24 pm |
|
|
I'm looking at the PIC18F4585 errata sheet, and there are like 8 different erratas on ECCP alone!
A lot of these parts that now have 4 digits (e.g. 18f458 --> 18f4585 or 18F458 --> 18F4580) do have several erratas compared to their more mature predecessors.
I sure hope MCHP doesnt obsolete out the more mature versions. After all, they do discourage new design with them in favor of the 4-digit parts. |
|
|
sseidman
Joined: 14 Mar 2005 Posts: 159
|
|
Posted: Tue Jul 05, 2005 4:48 pm |
|
|
When people talk about a "mature" version, they're usually referring to the development process. The newer versions of the chips are therefore the mature versions. |
|
|
Guest
|
|
Posted: Tue Jul 05, 2005 5:04 pm |
|
|
sseidman wrote: | When people talk about a "mature" version, they're usually referring to the development process. The newer versions of the chips are therefore the mature versions. |
I meant to say the more 'stable' versions whose errata .pdf file doesn't exceed 100KB. |
|
|
|