0
1
2
3
4
#!
0!
1!
2!
3!
4!
!
!
!
!
!
!
CHIP SIZE!
16!
!
16!
!
32!
!
32!
!
16!
!
STARTING VALUE!
0!
!
16!
!
32!
!
64!
!
96!
!
512!
0!
0!
0!
0!
0!
256!
0!
0!
0!
0!
0!
128!
0!
0!
0!
0!
0!
64!
0*!
0*!
0*!
1*!
1*!
#!
0!
1!
2!
3!
4!
5!
6!
256!
0*!
0* !
1*!
0!
0!
0!
0!
CHIP SIZE!
64!
!
16!
!
256!
!
8!
!
64!
!
64!
!
64!
!
STARTING VALUE!
0!
!
64!
!
256!
!
512!
!
576!
!
640!
!
704!
!
!
!
!
!
!
!
!
!
512!
0*!
0*!
0!
1*!
1*!
1*!
1*!
128!
0!
0!
| X!
0*!
0*!
1*!
1*!
64!
0*!
1*!
X!
0*!
1*!
0*!
1*!
32!
0*!
0*!
1*!
0*!
1*!
16!
0*!
1*!
| X!
| X!
0!
8
|X
|X
X
X
|X
32!
| X!
0!
X!
0!
| X!
| X!
| X!
16!
X!
0!
X!
0!
X!
X!
X!
8
X
|X
X
0
X
X
X
IF SELECTED
/Y0/Y1/Y2/Y3/Y4/Y5/Y6/Y7
0 1 1 1 1 1 1 1
1 0 1 1 1 1 1 1
1 1 0 1 1 1 1 1
1 1 1 0 1 1 1 1
1 1 1 1 0 1 1 1
1 1 1 1 1 0 1 1
1 1 1 1 1 1 0 1
1 1 1 1 1 1 1 0
IF NOT SELECTED
1 1 1 1 1 1 1 1
A2 A1 A0
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
x
!
!
1111 = F!
1101 = D!
1110 = E
1100 = C
= 1,! !
= 0, ! !
!
!
=0
=1
OPTIONS:!
!
!
0101 = 5
0100 = 4
( WE - WRITE ENABLE )
( OE - OUTPUT ENABLE )
LSTRB# = 1
R/W# = 1
PORT B = 0x3F --> 0011 111[1]
!
ADDR[0] = 1
A = A18!!
!
!
!
!
B = A17
A17
A18!
= 0x60000
!
!
!
A13
= 0x63FFF
*Other Possibilities*!
!
!
!
0!
0!
!
!
!
1
0
PIFn = In order to know which pin an interrupt has occurred on, this register must be read.
RDRn = This register can be used to limit the amount of current supplied to a circuit connected to the corresponding port.
DDRn = Which register needs to be configured before ever outputting a value to a certain port pin.
PERn = Connect resistor from port pin to either Vcc or Vdd.
PTIn = Detects overloads and shorts.
PPSn = This register can determine whether the pull resistor is pull-up or pull-down.
1100 0000 = C0
0001 0110 = 16
0000 0000 = 0
0010 0001 = 21
!
!
!
!
RTICTL = 0x12
!
!
Counter Value =
RTICTL = 0x57
!
!
COUNTER VALUE
Seconds =
DIVISOR
__________________
CORE CLOCK x 10^6
!
2^(y-1) x (y+1) =
CORE FREQUENCY
_______________________
(RTI FREQUENCY) x (1024)
HIGHEST = 0xFFFF
PIN 1
PRE
BUS CLOCK =
CORE CLOCK
____________
2
BUS CLOCK
___________
2 ^ PRE
2 ^ 16
__________
ms =
sec
(2 ^ 16) x (2 ^ PRE)
________________ x 1000
BUS CLOCK
PRE
BUS CLOCK =
CORE CLOCK
____________
Count =
TCNT Rate =
BUS CLOCK
__________
2 ^ PRE
COUNT =
PERIOD! !
_______! !
2!
CORE CLOCK
_______________________
2 x (2 ^ PRE) x OVERFLOW
COUNT
PRE
CORE CLOCK !
BUS CLOCK
TIMER CLOCK FREQUENCY = ____________! = __________
2 x (2 ^ PRE)!
(2 ^ PRE)
* Units Cancel *
PRE
1!
_______!
!
PERIOD!
!
!
!
!
! = TIMER! CLOCK FREQUENCY
!
! =
!
!
!
!
!
BUS CLOCK =
BUS CLOCK
__________
(2 ^ PRE)
CORE CLOCK
____________
COUNT =
1001 1100
0100 1101
0110 0001
1101 0001
0 0!
0 1!
1!
0!
1
1
PTT!
0!
BIT 7:!
!
!
!
0!
1!
Opposite PTT!
!
!
0
0
PTT