chipKIT® Development Platform

Inspired by Arduino™

PORTA with ChipKit32

Created Sun, 20 Nov 2011 02:58:38 +0000 by svaha


Sun, 20 Nov 2011 02:58:38 +0000

I'm programming the Chipkit Max32 with the C32 compiler. I can successfully set PortD high with:

TRISD = 0x00; PORTD = 0xFF;

but when I try to set PORTA I get 'TRISA' undeclared...

I'm using the #include <p32xxxx.h>

Is there something I need to do to see PORTA? I see that ChipKit pins 70-73 and 80-81 assigned to them, but I wondered why TRISA is undeclared.

Jacob Christ

Sun, 20 Nov 2011 06:26:39 +0000

I have very little experience with the C32 compiler, but my gut feeling is that somewhere you need to set the processor your using and you have not set it. So it is set to some PIC32 part that does not have a PORTA.



Sun, 20 Nov 2011 07:31:37 +0000

Interesting. Thanks.

I tried it on a PC in MPLab 8.50 w/ C32 v1.12 and it works fine, but in MPLABX on OSX it gives an error.


Sun, 20 Nov 2011 08:07:07 +0000

...oops.. after further investigation I didn't have the MPLABX set to PIC32MX795F512L for the MAX32.

Works now.