The Option_Reg register is a Readable and Writable register that is used to control some modules of the PIC. This register is only available from bank 1 and bank 3. The bits of the Option_Reg register as as follows:
The Option_Reg Register bits
Bit <2:0> - PS<2:0>: Prescaller rate selection
Those bits are Readable and Writable and after a reset they will get the value '1'. They are used to set the Prescaller rate. The values it can get are:
Bit 3 - PSA: Prescaller Assignment
This bit is Readable and Writable and after a reset it will get the value 1. This bit is used to assign the prescaller to to the Watchdog timer or the Timer 0 module. The values it can get are:
0: The prescaller is assigned to the Timer 0 module (TMR0)
1: The prescaller is assigned to the Watchdog timer (WDT)
Bit 4 - TOSE: Timer 0 Source Edge Select
This bit is Readable and Writable and after a reset it will get the value 1. It is used to select the RA4/TOCKI pin clock edge (High to Low or Low to High) on which the Timer 0 will count. The values it can get are:
0: Increment on Low to High
1: Increment on High to Low
Bit 5 - T0CS: Timer 0 Clock Source Select
This bit is Readable and Writable and after a reset it will get the value 1. This bit will define the Timer 0 module clock source. It can be either the RA4/TOCKI pin or the Internal Instruction Cycle Clock (CLKO). The values it can get are:
0:Timer 0 clock source is the Internal instruction cycle clock (CLKO)
This bit is Readable and Writable and after a reset it will get the value 1. By altering this bit, you can select the RB0/INT pin pulse edge that the RB0/INT interrupt will occur. The values it can get are:
0: The RB0/INT interrupt will occur on the falling edge of the RB0/INT pin
1: The RB0/INT interrupt will occur on the rising edge of the RB0/INT pin
Bit 7 - -RBPU: PORTB Pull-up Enable
This bit is Readable and Writable and after a reset it will get the value 1. The RB ports have an internal programmable pull-up resistor to minimize the use of external pull-up resistors when needed. This bit will enable or disable those resistors. The values it can get are:
@kamran alam basically, i need to re-write this whole tutorial from the beginning, and make also more sophisticated videos. I'm not sure if i have the time to make for another PIC also, but the basic assembly programming can be applied for the 877 as well.
As for the "student", i do not see how can this happen. I have never tried teaching through internet. You live in India right? I live in Greece. But you can use the forum to ask your questions, and if i can answer be sure that i will:
hii buddy. i m really impressed from ur work. great job dude!
i have a request that plz publish pic tutorial of PIC16F877A. I'll hope u'll do so. i m eagerly waiting.......
i have a question for you.....
can i be ur student
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.