PIC16C74-04/P Microchip Technology, PIC16C74-04/P Datasheet - Page 63

MICRO CTRL 4K 4MHZ OTP 40DIP

PIC16C74-04/P

Manufacturer Part Number
PIC16C74-04/P
Description
MICRO CTRL 4K 4MHZ OTP 40DIP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheet

Specifications of PIC16C74-04/P

Core Processor
PIC
Core Size
8-Bit
Speed
4MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
POR, PWM, WDT
Number Of I /o
33
Program Memory Size
7KB (4K x 14)
Program Memory Type
OTP
Ram Size
192 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 6 V
Data Converters
A/D 8x8b
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
40-DIP (0.600", 15.24mm)
Lead Free Status / RoHS Status
Request inventory verification / Request inventory verification
Eeprom Size
-
7.3.1
The prescaler assignment is fully under software con-
trol, i.e., it can be changed “on the fly” during program
execution.
EXAMPLE 7-1:
To change prescaler from the WDT to the Timer0 mod-
ule use the sequence shown in Example 7-2.
EXAMPLE 7-2:
TABLE 7-1:
Lines 2 and 3 do NOT have to
be included if the final desired
prescale value is other than 1:1.
If 1:1 is final desired value, then
a temporary prescale value is
set in lines 2 and 3 and the final
prescale value will be set in lines
10 and 11.
Address
01h,101h
0Bh,8Bh,
10Bh,18Bh
81h,181h
85h
Legend: x = unknown, u = unchanged, - = unimplemented locations read as '0'. Shaded cells are not used by Timer0.
1997 Microchip Technology Inc.
Note:
CLRWDT
BSF
MOVLW
MOVWF
BCF
SWITCHING PRESCALER ASSIGNMENT
To avoid an unintended device RESET, the
following instruction sequence (shown in
Example 7-1) must be executed when
changing the prescaler assignment from
Timer0 to the WDT. This sequence must
be followed even if the WDT is disabled.
INTCON
TRISA
Name
TMR0
OPTION RBPU INTEDG
STATUS, RP0 ;Bank 1
b'xxxx0xxx' ;Select TMR0, new prescale value and
OPTION_REG
STATUS, RP0 ;Bank 0
REGISTERS ASSOCIATED WITH TIMER0
CHANGING PRESCALER (TIMER0 WDT)
CHANGING PRESCALER (WDT TIMER0)
Timer0 module’s register
Bit 7
GIE
;Clear WDT and prescaler
;clock source
PEIE
Bit 6
1)
2)
3)
4)
5)
6)
7)
8)
9)
10) MOVLW
11) MOVWF
12) BCF
PORTA Data Direction Register
BSF
MOVLW
MOVWF
BCF
CLRF
BSF
MOVLW
MOVWF
CLRWDT
T0CS
Bit 5
T0IE
STATUS, RP0
b'xx0x0xxx'
OPTION_REG
STATUS, RP0
TMR0
STATUS, RP1
b'xxxx1xxx'
OPTION_REG
b'xxxx1xxx'
OPTION_REG
STATUS, RP0
T0SE
INTE
Bit 4
RBIE
Bit 3
PSA
;Bank 1
;Select clock source and prescale value of
;other than 1:1
;Bank 0
;Clear TMR0 and prescaler
;Bank 1
;Select WDT, do not change prescale value
;
;Clears WDT and prescaler
;Select new prescale value and WDT
;
;Bank 0
Bit 2
T0IF
PS2
Bit 1
INTF
PS1
RBIF
Bit 0
PS0
PIC16C7X
xxxx xxxx
0000 000x
1111 1111
--11 1111
Value on:
POR,
BOR
DS30390E-page 63
other resets
Value on all
uuuu uuuu
0000 000u
1111 1111
--11 1111

Related parts for PIC16C74-04/P