View Single Post
  #5   Spotlight this post!  
Unread 11-02-2006, 15:21
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Using CCP modules

Quote:
Originally Posted by steven114
Ok, a few more things:
I tried to read the contents of CONFIG3L and CONFIG3H, which have the information regarding microcontroller mode and the ECCP2 multiplexing.
Code:
char *CONFIG3L = 0x300004, *CONFIG3H = 0x300005;
printf("Init CONFIG3L=%d CONFIG3H=%d",(int)(*CONFIG3L),(int)(*CONFIG3H));
prints out two sets of 0. Any reason this wouldn't work? It seems that most of the registers have handy named variables, but none of the CONFIG registers do. The documentation says that they are mapped into the memory space, so I don't see why a pointer dereference wouldn't grab the value... any other way to read these registers?
Sorry, I don't really have time to research this. Try using the p18f8722.h header file for the memory-mapped variables.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org