Figure 423 option register 424 option registers bits

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: rupt, TMR0, and the weak pull-ups on PORTB. In other words, a certain function in the PIC16F84 can be ON or OFF depending on the state of the bits in the OPTION register. It is a readable and writable register freely changeable during programming, and so it differs from fuse setting that is fixed during Writing. Figure 4.2.3 OPTION Register 4.2.4 OPTION Register’s Bits Information TMR0 PIC16F84 has an 8-bit timer (called TMR0), which can count up to 256 (from 0 to 255). As a matter of fact, TMR0 can be used as a timer or a counter. In implementing a digital dice with the 7-segment LEDs, TMR0 is exploited to generate a random number between 1 and 6. That is, while continuing to increase TMR0 value in a regular interval, a digital dice device captures the time when the switch is ‘closed’, divides the captured time by 6, and then displays the remainder of the division on the 7-segment LED display. RTS (Bit 5; TMR0 Clock Source Select bit) Bit 5 RTS decides if TMR0 register is used as a timer or as a counter of pulses. That is, this pin enables a free-run timer to increment its value either from an internal oscillator (when the bit i...
View Full Document

Ask a homework question - tutors are online