Page 1 of 1

PORT D bug on DSPIC33FJ64(128)MC804

Posted: Wed Jan 27, 2010 12:16 am
by rmikio
Hi Lubin and group,

I am new user for DSPIC and actually I am trying to use your very useful blockset (just downloaded it today).
However I have problems regarding the Digital Input. When I try to compile to DSPIC33FJ128MC804, the following error occurs:

dsPIC_33f_Explorer16.c:165: error: 'PORTDbits' undeclared (first use in this function)

Looking into the .h files, I could notice that DSPIC33FJ128MC804 does not present any definition for PORTDbits.
It seems that the digital Input for DSPIC33FJ128MC804 is made in a different way, but I am not quite sure about that.

However it seems that this is the only error so far.

Can you enlighten me here, please?

I imagine I can use the Analog Input as a digital Input, just by configuring it correctly. But then I guess if the Analog Input is also implemented for this specific DSPIC.

Thank you and regards,
Mikio

Re: PORT D bug on DSPIC33FJ64(128)MC804

Posted: Wed Jan 27, 2010 1:26 am
by LubinKerhuel
I checked 33fj MC804 definition either on microchip h file, and in the blockset, it's coherent.

Could you check you select the correct dsPIC in the master block ?
Check then that your simulink model does not contain any port D.

Lubin

Re: PORT D bug on DSPIC33FJ64(128)MC804

Posted: Wed Jan 27, 2010 2:08 am
by Bobes
hello I am using 804 as well, I do not think there is any PORTD at all. at least I cant see any pin on the Pin Diagram.
Josef

Re: PORT D bug on DSPIC33FJ64(128)MC804

Posted: Wed Jan 27, 2010 2:54 pm
by rmikio
Greetings all,

Thank you for your prompt reply.
Ok, my LACK of knowledge (or I shall say my dumbness and ignorance) is responsible for this mistake.
Actually dsPIC33fj64(128)MCx04 does NOT present any PORT D, but only PORT A, B or C.

Thank you again and sorry for bothering!
Regards,
Mikio