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

debugger stops running without breakpoint

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



Joined: 07 Sep 2003
Posts: 56

View user's profile Send private message Send e-mail

debugger stops running without breakpoint
PostPosted: Thu Mar 11, 2004 3:16 pm     Reply with quote

Hello
I run a program which reads buttons status.
this is a 4X4 button array connected to portb.

each time I press on a button which is located in column 3 of the array the debugger stops the running of the program. more then that, it always stops at the same line.
I cleared all breakp points but... no use... the debugger still stops at that line.
when I press on a button in column 1,2 the button is recognized.
when I press on a button in column 4 the press is igbored

after it stoped I can re-run it, allthough the problem stil occure.

here is the code if it helps:
Code:

void read_key(){

//this function sets bits 0-15 of "keys_flag" acording to the pressed buttons
//more then one button can be detected

#use fast_io(b)

   char temp;char i;

   trisb=0xf0;
   keys_flag=0;//zero all bits
   for (i=1;i<16;i*=2)//sets b0,b1,b2,b3 in turn
{
   portb=0|i;
   temp=portb ;;//read pins b7-4
   temp =temp >> 4//this is where it stops
   if (temp!=0) set_key_bit(i,temp);
}


chava
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Mar 11, 2004 3:46 pm     Reply with quote

Are you running your keypad on pins B4, B5, B6 and B7 ?
If so, pins B6 and B7 are used by the ICD2 debugger.

Don't press any keys that will put ground on those pins.
If you do, you will interfere with the operation of the ICD2.
wedilo



Joined: 16 Sep 2003
Posts: 71
Location: Moers, Germany

View user's profile Send private message

PostPosted: Fri Mar 12, 2004 1:34 am     Reply with quote

Hello chava,
If the program is finished, remove the 'ICD=True' behind the #device command and make a final compile of your code. Then program the PIC and you will have full access to the pins B4...B7.
The limitations are for debug use only.

73 Sven
chava



Joined: 07 Sep 2003
Posts: 56

View user's profile Send private message Send e-mail

thanks
PostPosted: Fri Mar 12, 2004 10:27 am     Reply with quote

"PCM programmer" and "wedolo" thank you both!
how come I didnt think about that....
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