CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Anyone have a problem w/glitchy ECCP?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
valemike
Guest







Anyone have a problem w/glitchy ECCP?
PostPosted: Tue Jul 05, 2005 12:49 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 05, 2005 2:22 pm     Reply with quote

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







PostPosted: Tue Jul 05, 2005 2:46 pm     Reply with quote

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! Shocked
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jul 05, 2005 2:52 pm     Reply with quote

A search for keyword ECCP on the Microchip forum reveals this post,
which may apply to your problem.
http://forum.microchip.com/tm.asp?m=60805&mpage=1&key=eccp&anchor#60805
valemike
Guest







PostPosted: Tue Jul 05, 2005 3:23 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 05, 2005 3:35 pm     Reply with quote

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







PostPosted: Tue Jul 05, 2005 3:47 pm     Reply with quote

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







PostPosted: Tue Jul 05, 2005 4:24 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Jul 05, 2005 4:48 pm     Reply with quote

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








PostPosted: Tue Jul 05, 2005 5:04 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group