PIC24FJ96GA0101 pin select problem

General discussion on mikroPascal for dsPIC30/33 and PIC24.
Post Reply
Author
Message
bfrancoeur
Posts: 50
Joined: 04 Feb 2008 16:14

PIC24FJ96GA0101 pin select problem

#1 Post by bfrancoeur » 11 Apr 2008 18:12

I am using a PIC24FJ96GA010 pic. My problem is that I want to use RA0 RA1, RA4, RA5 as outputs. Unfortunately they have multiple functions.

I don't know where to look in the data sheet to figure out how to disable those functions. For example how do I disable TDI function on RA4 so I can use RA4 as an output.

I need help figuring this out. (newbie) lol

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#2 Post by rmteo » 11 Apr 2008 18:58

TDI, TDO etc. are related to JTAG. Make sure you have "_JTAGEN_OFF" selected in CONFIG. Then try TRISA = 0 to make PORTA all outputs.

bfrancoeur
Posts: 50
Joined: 04 Feb 2008 16:14

#3 Post by bfrancoeur » 11 Apr 2008 19:11

rmteo thanks for replying to my post!

two things How the heck do I do that? and second I should have posted this in the MBASIC thread since I am using MBASIC for this.

Any help would be appreciated

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#4 Post by rmteo » 11 Apr 2008 19:22

Go to the PROJECT tab of mBASIC (which is what I also use) and select "Edit Project". While you are there, select your proper OSC configuration and proper clock speed. Also you want to select the following:

Code: Select all

_JTAGEN_OFF
_BKBUG_OFF
_FWDTEN_OFF

bfrancoeur
Posts: 50
Joined: 04 Feb 2008 16:14

#5 Post by bfrancoeur » 11 Apr 2008 19:36

Thanks rmteo your help was greatly appreciated. Today was a good day I learned something new!

What do

_BKBUG_OFF
_FWDTEN_OFF

do?

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#6 Post by rmteo » 11 Apr 2008 19:42

_BKBUG_OFF turns off background debugging.
_FWDTEN_OFF turns off the the watchdog timer.

Were you able to use PORTA as outputs?

bfrancoeur
Posts: 50
Joined: 04 Feb 2008 16:14

#7 Post by bfrancoeur » 11 Apr 2008 19:48

Yes I was all I used was the _JTAGEN_OFF because that is what is used for PORTA.

But I will implement the others. Thank you very much

bfrancoeur
Posts: 50
Joined: 04 Feb 2008 16:14

#8 Post by bfrancoeur » 11 Apr 2008 22:19

Is there a place to look up what all those configeration settings mean? That way I can have a better understanding of there use.

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#9 Post by rmteo » 11 Apr 2008 22:30

The only place I know is the device data sheet and the PIC24FJ Family Reference Manual. Unfortunately, they are scattered all over the place. However, I have found that if you turn off the 3 settings shown above, you should be OK.

Post Reply

Return to “mikroPascal for dsPIC30/33 and PIC24 General”