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

A question about ECCP dead band time setting

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



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

A question about ECCP dead band time setting
PostPosted: Sat Jul 31, 2010 12:38 am     Reply with quote

I have used these codes for setting dead band time which is located at:
http://www.ccsinfo.com/forum/viewtopic.php?t=40040
Code:

#include <16F684.h>
#fuses XT,NOWDT,BROWNOUT,PUT
#use delay (clock=4000000)

void set_pwm_dead_band(int8 value)
{
int8 temp;
#byte PWM1CON = 0x16

// Put 'value' into the lower 7 bits of PWM1CON
// but don't change the top bit of PWM1CON.
value &= 0x7F;     
temp = PWM1CON; 
temp &= 0x80;   
temp |= value; 
PWM1CON = temp;
}

//=================================
void main()
{
setup_ccp1(CCP_PWM_FULL_BRIDGE  | CCP_PWM_H_H);

set_pwm_dead_band(0x1F);


// Put other PWM setup code here.


while(1);
}

But I couldn't set dead band time. How can I use these code for setting dead band time delay?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jul 31, 2010 10:53 am     Reply with quote

Quote:

I have used these codes for setting dead band time which is located at:
http://www.ccsinfo.com/forum/viewtopic.php?t=40040

Did you read the whole thread ? Read Ttelmah's comment at the end
of the thread.
lokken



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

PostPosted: Tue Aug 03, 2010 12:23 am     Reply with quote

OK I understand what you mean. But I have one more question, by your leave. Is it more reliable to drive H-Bridge with an external hardware like L298? Because if we couldn't set dead band, the mosfets or others can be burnt out because of their delay time. Is it true?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Aug 03, 2010 12:32 pm     Reply with quote

I have used the LMD18200, which is an H-Bridge controller chip.
It contains the driver transistors in the package. It generates the
dead band time. (They refer to it as "no shoot-through current".)

Data sheet and appnote:
http://www.national.com/ds/LM/LMD18200.pdf
http://www.national.com/an/AN/AN-694.pdf

CCS program for the LMD18200:
http://www.ccsinfo.com/forum/viewtopic.php?t=40467
lokken



Joined: 21 Feb 2010
Posts: 17

View user's profile Send private message

PostPosted: Wed Aug 04, 2010 12:27 am     Reply with quote

Ok Thanks for your considering...
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