Gambanishu Habbeba
Gambanishu Habbeba

Reputation: 418

PIC32CX register names not in header?

I'm trying to hack away using a PIC32CX BZ2. Since there's no code completion for some weird reason in MPLAB, I'm kinda forced to know the register names, or whatever is set declared in the header files. If they matched with the documentation and I could use TRISA and so on it would be fine. But there's only GPIOB_REGS->GPIO_TRIS and other things like that - that is completely unque. And again, without type ahead, I have to dig for these in the header files. That can't be the plan from Microchip, right? Is there any way to use normal register names? Thanks!

EDIT: Ok, just to clarify: This is a WBZ451 with a PIC32CX BZ2 on board. I'm using MPLAB, the correct compiler (XC32) is installed and works fine (compiles programs that work) and the correct device is selected. See screenshots.

enter image description here

enter image description here

Upvotes: 0

Views: 245

Answers (1)

Mike
Mike

Reputation: 4288

The PIC32CX is an ARM based 32 bit controller and the xc8 compiler is a compiler for 8-bit microchip controller.
If you want to work with the PIC32CX yout had install and select a suitable compiler:

  • xc32 compiler or
  • ARM 32-bit GNU toolchain

If you want to work with an 8-bit microchip controller, the xc8 compiler is a good choice to start. You can do this settings in your procect properties.
And never forget:

#include <xc.h>

The handling of the configuration register is total different in the microchip controller with MIPS core to the one with an ARM core:

MIPS: ASNSELA = 0x0000;

ARM: GPIOA_REGS->GPIO_ANSEL = 0x0000;

Upvotes: 0

Related Questions