Keil Logo

C51: BITS USED FOR BANK SELECTION

QUESTION

I want to use bits 2 and 7 of port 1 for bank selection. Is the C51 toolset able to do this?

ANSWER

You can't easily do this as the bits are required to be consecutive. Although the explicit statement is not in the book, these bits must be allocated sequentially. If you specify ?B_FIRST_BIT is bit 3 and ?B_PORT is P1 and the number of banks is 32, then the pin allocation for bank selection would be:

P1.3
P1.4
P1.5
P1.6
P1.7

There is no provision for gaps of any kind in the pin allocation. This is true for both I/O ports and XDATA latches.

Since the source code is provided for the bank selection algorithms, you may write your own code to support this, however, that will be more work on your part.

Last Reviewed: Saturday, May 8, 2004


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.