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

timer interrupts driving port pins low when inputs

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



Joined: 03 Jul 2008
Posts: 1

View user's profile Send private message

timer interrupts driving port pins low when inputs
PostPosted: Thu Jul 03, 2008 4:38 am     Reply with quote

Hi

i have written a peice of code for PIC16F687 where i am running a timer0 is used as a refresh rate on a segment display.

on PORTA pin 5 i have a switch that uses the internal pull up resistor and is used active low.

for some reason the interrupt of the timer is driving the pin low on the interrupt.

i look at the datasheet and the interrupt of the time and the pin use the same 5th bit but should be in different registers and should not effect each other.

Does anyone have any ideas to what is going on, and is there a way i can just read the registers direct rather than passing a value in to a function.

i tried using a different timer in the PIC but none of them are fast enough to uses with the segment display.
Ttelmah
Guest







PostPosted: Thu Jul 03, 2008 4:44 am     Reply with quote

What compiler version?.
What are you actually doing in the interrupt?.
The timer0 interrupt, _does not use bit 5 of any register_. It uses bit 2. The only thing using bit 5, for this interrupt, is the 'enable', which once set by you during the startup, is not changed in any way at all by the interrupt.

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