Jump to content
43oh

How i can understand about...


Recommended Posts

Look in the processor data sheet.

Since it mentions GPIO - look in the GPIO section,

check the table of register offsets, find the register at offset 0x100

see what the 7th6th bit does.

 

However this one is a little tricky - not listed in table.

But see section 10.2.1.2 "Data Register Operation" of the LM4F120h5qr data sheet (probably similar section if different processor).

It uses the low part of the address offset from portC base as a mask to select which data bits to read/write.

So this should be a way to access bit 6 of port C.

 

Edit: Addition - To understand the HWREG macro - search through the library source code (or the documentation) to find where

it is defined, or search for examples.

 

Edit: Correction - in the first paragraph I used bit numbering starting from 1 (as I tend to think in those terms),

then in the second paragraph I used numbering starting from 0 (as the data sheet does).

(So where I said 7th, and where the data sheet said 6th meant the same bit.  Was just using different reference.)

I have corrected my message, sorry for any confusion.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

×
×
  • Create New...