参数资料
型号: 668-0003-C
厂商: Rabbit Semiconductor
文件页数: 87/228页
文件大小: 0K
描述: IC CPU RABBIT2000 30MHZ 100PQFP
标准包装: 100
系列: Rabbit 2000
处理器类型: Rabbit 2000 8-位
速度: 30MHz
电压: 2.7V,3V,3.3V,5V
安装类型: 表面贴装
封装/外壳: 100-BQFP
供应商设备封装: 100-PQFP(14x20)
包装: 托盘
其它名称: 316-1004
668-0003
第1页第2页第3页第4页第5页第6页第7页第8页第9页第10页第11页第12页第13页第14页第15页第16页第17页第18页第19页第20页第21页第22页第23页第24页第25页第26页第27页第28页第29页第30页第31页第32页第33页第34页第35页第36页第37页第38页第39页第40页第41页第42页第43页第44页第45页第46页第47页第48页第49页第50页第51页第52页第53页第54页第55页第56页第57页第58页第59页第60页第61页第62页第63页第64页第65页第66页第67页第68页第69页第70页第71页第72页第73页第74页第75页第76页第77页第78页第79页第80页第81页第82页第83页第84页第85页第86页当前第87页第88页第89页第90页第91页第92页第93页第94页第95页第96页第97页第98页第99页第100页第101页第102页第103页第104页第105页第106页第107页第108页第109页第110页第111页第112页第113页第114页第115页第116页第117页第118页第119页第120页第121页第122页第123页第124页第125页第126页第127页第128页第129页第130页第131页第132页第133页第134页第135页第136页第137页第138页第139页第140页第141页第142页第143页第144页第145页第146页第147页第148页第149页第150页第151页第152页第153页第154页第155页第156页第157页第158页第159页第160页第161页第162页第163页第164页第165页第166页第167页第168页第169页第170页第171页第172页第173页第174页第175页第176页第177页第178页第179页第180页第181页第182页第183页第184页第185页第186页第187页第188页第189页第190页第191页第192页第193页第194页第195页第196页第197页第198页第199页第200页第201页第202页第203页第204页第205页第206页第207页第208页第209页第210页第211页第212页第213页第214页第215页第216页第217页第218页第219页第220页第221页第222页第223页第224页第225页第226页第227页第228页
171
17.3 Shadow Registers
Many of the registers of the Rabbit’s internal I/O devices are write-only. This saves gates
on the chip, making possible greater capability at lower cost. Write-only registers are eas-
ier to use if a memory location, called a shadow register, is associated with each write-
only register. To make shadow register names easy to remember, the word shadow is
appended to the register name. For example the register GOCR (Global Output Control
register) has the shadow GOCRShadow. Some shadow registers are defined in the BIOS
source code as shown below.
char GCSRShadow; // Global Control Status Register
char GOCRShadow; // Global Output Control Registe
r
char GCDRShadow; // Global Clock Doubler Register
If the port is a write-only port, the shadow register can be used to find out the port’s con-
tents. For example GCSR has a number of write-only bits. These can be read by consult-
ing the shadow, provided that the shadow register is always updated when writing to the
register.
k=GCSRShadow;
17.3.1 Updating Shadow Registers
If the address of a shadow register is passed as an argument to one of the functions that
write to the internal or external I/O registers, then the shadow register will be updated as
well as the specified I/O register.
A NULL pointer may replace the pointer to a shadow register as an argument to WrPortI()
and WrPortE(); the shadow register associated with the port will not be updated. A pointer
to the shadow register is mandatory for BitWrPortI() and BitWrPortE().
17.3.2 Interrupt While Updating Registers
When manipulating I/O registers and shadow registers, the programmer must keep in
mind that an interrupt can take place in the middle of the sequence of operations, and then
the interrupt routine may manipulate the same registers. If this possibility exists, then a
solution must be crafted for the particular situation. Usually it is not necessary to disable
the interrupts while manipulating registers and their associated shadow registers.
17.3.2.1 Atomic Instruction
As an example, consider the parallel port D data direction register (PDDDR). This register
is write only, and it contains 8 bits corresponding to the 8 I/O pins of parallel port D. If a
bit in this register is a “1,” the corresponding port pin is an output, otherwise it is an input.
It is easy to imagine a situation where different parts of the application, such as an inter-
rupt routine and a background routine, need to be in charge of different bits in the PDDDR
register. The following code sets a bit in the shadow and then sets the I/O register. If an
interrupt takes place between the set and the ldd, and changes the shadow register and
PDDDR, the correct value will still be set in PDDDR.
相关PDF资料
PDF描述
668-0011 IC MPU RABIT3000A 55.5MHZ128LQFP
6PAIC3106IRGZRQ1 IC AUDIO CODEC STEREO 48-QFN
70001851 DEVICE SERVER 1PORT SRL-ETHERNET
73M1822-IM/F MICRODAA VOICE DATA/FAX 42-QFN
73M1866B-IM/F MICRODAA SGL PCM HIGHWAY 42-QFN
相关代理商/技术参数
参数描述
6680005578829 制造商: 功能描述: 制造商:undefined 功能描述:
6680008268807 制造商: 功能描述: 制造商:undefined 功能描述:
6680-00-882-0965 制造商: 功能描述: 制造商:undefined 功能描述:
6680008912796 制造商: 功能描述: 制造商:undefined 功能描述:
6680009296667 制造商: 功能描述: 制造商:undefined 功能描述: