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

Viewing I/O ports with debugger

 
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go
View previous topic :: View next topic  
Author Message
Jim McBride



Joined: 24 Mar 2004
Posts: 21

View user's profile Send private message

Viewing I/O ports with debugger
PostPosted: Thu May 27, 2004 4:28 pm     Reply with quote

Can you use the debugger to view I/O ports while stepping through your code? I have tried but don't seem to be getting the syntax correct. How is this done?
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Thu May 27, 2004 5:24 pm     Reply with quote

Let's say you are trying to watch PORT B. Define a byte variable like this:

#byte PORTB=0x06 //The address depends on the PIC you are using

And then add PORTB (or PORTB,b or PORTB,h) to the watch window. You can also use it as a normal variable; for example for setting RB0 and clearing the rest you can use
PORTB=0b00000001;
Guest








PostPosted: Fri May 28, 2004 9:11 am     Reply with quote

I can't seem to find the syntax you came up with. Am I correct in assuming that PORTB,b would give you binary, PORTB,h would give you hex?
Thanks for the help!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> CCS ICD / Mach X / Load-n-Go 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