Jump to content

[SOLVED] MIOS32_AIN_CHANNEL_MASK


Underskor
 Share

Recommended Posts

Might be really obvious but it's not clicking for me.

// bit mask to enable channels

//

// Pin mapping on MBHP_CORE_STM32 module:

//   15       14      13     12     11     10      9      8   

// J16.SO  J16.SI  J16.SC J16.RC J5C.A11 J5C.A10 J5C.A9 J5C.A8

//   7        6       5      4      3      2      1       0

// J5B.A7  J5B.A6  J5B.A5 J5B.A4 J5A.A3 J5A.A2 J5A.A1  J5A.A0

//

// Examples:

//   mask 0x000f will enable all J5A channels

//   mask 0x00f0 will enable all J5B channels

//   mask 0x0f00 will enable all J5C channels

//   mask 0x0fff will enable all J5A/B/C channels

// (all channels are disabled by default)

		#define MIOS32_AIN_CHANNEL_MASK 0x0000

If 0x000f is 15, how does that relate to J5A.A0..A3?

Thanks in advance,

Tom

Edited by Underskor
Link to comment
Share on other sites

Ah my mistake, I was reading the pin numbers in place of the binary columns (for lack of better words).

J5A.A0 - 1

J5A.A1 - 2

J5A.A2 - 3

J5A.A3 - 4

J5B.A4 - 5

etc
instead of
J5A.A0 - 1

J5A.A1 - 2

J5A.A2 - 4

J5A.A3 - 8

J5B.A4 - 16

etc

Thanks for both of your replies. :) Obvious after all!

Link to comment
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.

Loading...
 Share

×
×
  • Create New...