| ||
The Status Register The Status register contains the arithmetic status of the Arithmetic Logic Unit, the Reset status of the PIC and the Bank Selection bits, direct and indirect. The Status register is accessible from all 4 banks. The bits of the Status register as as follows:
The Status Register bits Bit 0 - C: Carry/-Borrow
This bit is Readable and Writable and after a reset it's value will be unknown. If an instruction executed has an effect on this bit, then this bit becomes automatically and temporarily Read Only. The Carry bit watches if a carry-out from the MSB bit occurs. The values it can get are: Bit 1 - DC: Digit Carry/-Borrow
This bit is Readable and Writable and after a reset it's value will be unknown. If an instruction executed has an effect on this bit, then this bit becomes automatically and temporarily Read Only. The Digit Carry bit watches if a carry out from the 4th lower order of the byte is occurred. The values it can get are: Bit 2 - Z: Zero
This bit is Readable and Writable and after a reset it's value will be unknown. If an instruction executed has an effect on this bit, then this bit becomes automatically and temporarily Read Only. The Zero bit watches if the result of an arithmetic or logic operation was zero. The values it can get are: Bit 3 - -PD: Power Down
This bit is Read Only and after a reset it will get the value 1. The Power Down bit watches if the 'SLEEP' instruction was executed. The values it can get are: Bit 4 - -TO: Time Out
This bit is Read Only and after a reset it will get the value 1. The Power Down bit watches if a Watchdog timer time out occurred. The values it can get are: Bit 6:5 - RP<1:0>: Register Bank Selection
Those bits are Readable and Writable and after a reset it will all get the value 0. Their task is to select the active Register Bank in use. The values it can get are: Bit 7 - IRP: Register Bank Selection used with indirect addressing
During the indeterminate pages of this book, the indirect addressing shall be discussed and explained. The indirect addressing is a way of accessing registers (General Purpose or Special Function Registers) without directly accessing their memory position, but throughout an indirect addressing register. When this register is used, the current bank selected is different than the indirect current bank selected. The values it can get are: Comments
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise without the prior written permission of the author. Read the Disclaimer
All trademarks used are properties of their respective owners.
Copyright © 2007-2009 Lazaridis Giorgos. All rights reserved. |
|
Contact
Forum
Projects
Experiments
Circuits
Theory
BLOG
PIC Tutorials
Time for Science
RSS
Site design: Giorgos Lazaridis © Copyright 2008 Please read the Terms of services and the Privacy policy |