| 数据搜索系统,热门电子元器件搜索 |
|
ST9 数据表(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST9 数据表(HTML) 16 Page - STMicroelectronics |
|
16 / 146 page ![]() 16/146 ST9 USER GUIDE 3.1.4 Working Registers To further improve coding efficiency, a special mechanism has been created: the concept of working registers. This reduces to just 16 bytes the register space accessible by the instruc- tions in the so-called working register addressing mode. Only four bits are required to address this space, allowing both the source and the destination of a data move to be coded in a single byte, thus saving both code size and execution time. 256 registers, when split into groups of 16, give 16 groups. The group used is indicated in a special register, called the Working Register Pointer. The register address is made up of the group number and the register address within the group, as follows: Figure 6 . Register Group Addressing Scheme 3.1.5 Peripheral Register Pages All internal peripherals are mapped into the register space. Most of them have a multitude of features and can be configured in different ways. This implies that they have a large number of registers. Since only the last group of 16 registers is allocated for peripherals, a special scheme must be used to overcome this problem. It is called paging. The last group of registers actually addresses one pack of sixteen registers that belongs to the peripheral itself. Which pack of which peripheral depends on the value of a register called the Page Pointer Register. There can be as many as 64 different pages, providing plenty of space for accessing periph- erals. Here are more details on these two mechanisms. 3.1.6 Working Registers and Register Pointers The working registers offer a workspace of 16 bytes. This is sufficient for most applications, and much more convenient than a single accumulator. However, in some applications, this is still not enough. In this case you can easily allocate more than one register group to a partic- ular program module. Since any register can be accessed directly, it is up to you to decide whether you want to switch working register groups or not to access the other groups of reg- isters. Since changing the current group involves only one instruction, the concept of working regis- ters can greatly reduce context switching time, for example in the case of an interrupt service 7 6 5 4 3 2 1 0 Register Address Group Number (16 Register Groups) Register Number within Group Number |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |