Jump to content

Boostc 18fxxx Port A Problem...?


Recommended Posts

Hi,

I've been using boostC for few months now and I'm still in the learning process, as well as refreshing my C coding concepts...

I'm not sure this is a bug in the compiler, or my lack of experience, but I would need help solving my problem.

I need to generate an application using a 18F4550 port A as a digital output.

All my attempts to get anything out of lower bits (bits 3 through 0...) failed...

 

Adcon configuration used and test code are as follows:

 

/* Turn all ports to DIGITAL IO */

adcon0 = 0B00000000;

adcon1 = 0B00001111;

adcon2 = 0B00000000;

 

trisa = 0B00000000;

porta = 11111111b;

 

 

I'm expecting this should set port A to digital outputs, but last code line of code produces a 0x30 output instead of 0x3F in the mplab watch window...

Sounds like bits 3-0 are still programmed as analog inputs instead of digital outputs...

 

getting desperate...please help.

thanks

pierre288

Link to post
Share on other sites

wow...thanks for the hint....

sounds like there a missing hook in mplab...works fine in boostC environment.

 

regads

pierre288

----------------------------------------

Hmm! Maybe MPLAB doesn't work correctly then.

 

BoostC debugger says it works for porta bits 0-3 using your code.

 

Cheers

 

Reynard

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...