Jump to content
Sign in to follow this  
rgammage

Debug Error With Pic12F1822

Recommended Posts

Bug description:
When using debug the port is not shown correctly

Steps to reproduce:

 

main()

{

trisa = 0x00;
porta = 0x3f;

}


Expected behaviour:

This should show 0x37 for porta instead it shows 0x1f

(I suspect confusion between port_bit and chip pin number .... RA3 is input only and is pin 4, RA4 is R/W on pin 3)

Is the problem 100% reproduceable:

Yes

IDE version: SourceBoost IDE version 7.12 and 7.20
Compiler: Compiler BoostC
Compiler version: Compiler version & ..... I think
Target device: PIC12F1822
OS: OS Windows XP

 

Share this post


Link to post
Share on other sites

Hi

 

Your code doesn't show the config fuses.

Are you sure that there is no special functions on those pins that are afected by the configs?

Note that RA4 (pin3) is also, among many other functions, OSC2 (for external clock source) and CLKOUT, features that are controled by the _CONFIGs.

 

As for the RA3 (pin4) it is indeed only input, but I found nothing in the datasheet that says that the bit doesn't exist in the output latch.

 

 

Best regards

Jorge

Edited by JorgeF

Share this post


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...
Sign in to follow this  

×
×
  • Create New...