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 CCS Technical Support

how can I use interrupt and PWM on same port

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



Joined: 31 Aug 2006
Posts: 7
Location: Romania

View user's profile Send private message Yahoo Messenger

how can I use interrupt and PWM on same port
PostPosted: Mon Nov 27, 2006 4:50 am     Reply with quote

Hello

Please help me, how can I use interrupt and PWM on port B. For example I use PIC 16f88 and on pin RB3 I want to use PWM and on pin RB4 interrupts for an IR senzor. How can I do this. I use separatly PWM and Interrupts and works, but both doesn't.Pls hlep me.

Thanks
Ttelmah
Guest







PostPosted: Mon Nov 27, 2006 10:30 am     Reply with quote

You can't.
You need to use a seperate interrupt (RB0). The interrupt on the 'high' pins of port RB, is a 'port changed' interrupt. It triggers, whenever the state of a pin changes from the currently latched value. Unfortunately using a pin as a peripheral output, doesn't override this (hardware stupidity in the chip).

Best Wishes
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