Jump to content
Sign in to follow this  
Bo_DK

Absolute Addressing

Recommended Posts

Hello

 

Started on a new MCU last night, the 16F876 to be precise, since I wanted to use the ADC functionality. However, my question is quite general I think, and not just related to the ADC registers (ADCON0 and ~1 and ADRESL and ~H).

 

Do I really need to switch bank to access a variable that has already been assigned to an absolute address? I have tried for several hours without success until I found out that selecting the bank might do the trick. It sure did, but am I missing out on something. I mean why can I not get access to the absolute addressed variable without selecting the bank? Is there a trick I have not yet discovered - quite new to PIC programming.

 

Bo_DK

Share this post


Link to post
Share on other sites
Guest Pavel

No need to set bank for variables with absolute addresses. Compiler will do it for you.

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Hello

 

Hmm, I thought so but could not get it to work. Believe me I tried for at least ten hours without bank selection. Then I tried to comment it out and then it still worked.

 

I must add, however, that I upgraded from 2.1.6 to 2.1.8 in between without removing 2.1.6 but just installed 2.1.8 ontop. Then I removed everything and installed 2.1.8 from scratch and now everything works the way it is supposed to.

 

Bo_DK

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...