On Tue, 6 Jul 2010, Justin Richards wrote: > extern volatile near unsigned char LATG; > > Ideally I would like reference registers by address something like this > > char *addr; //create a pointer that points to registers Start by declaring the pointer to be the same type as the thing you're trying to point to: volatile near unsigned char *addr; > addr = 0x0F8F; //location of LATG Why do you want to have the addresses of registers hard-coded when the compiler already provides them for you? If you need a pointer to the register, take its address just like any other object: addr = &LATG; > C:\MPLAB\MyMCHPTCP\src\pom_HTTPExecCmd.c:200:Error [1131] type mismatch in > assignment > > addr = 0x0F8F; //location of LATG That's the compiler telling you that what you're trying to do is a bad idea. It can be done, but why do you want to do it? -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist