All trademarks mentioned in this document http://www.DigitalCoreDesign.com
are trademarks of their respective owners. http://www.dcd.pl
Copyright 1999-2003 DCD – Digital Core Design. All Rights Reserved.
RAM Controller – It performs interface func-
tions between Data memory and
DRPIC1655X internal logic. It assures correct
Data Memory addressing and data transfers.
The DRPIC1655X supports two addressing
modes: direct or indirect. In Direct Addressing
the 9-bit direct address is computed from
RP(1:0) bits (STATUS) and 7 least significant
bits of instruction word.
Indirect addressing is possible by using the
INDF register. Any instruction using INDF reg-
ister actually accesses data pointed to by the
file select register FSR. Reading INDF register
indirectly will produce 00h. Writing to the INDF
register indirectly results in a no-operation. An
effective 9-bit address is obtained by concate-
nating the IRP bit (STATUS) and the 8-bit
FSR register.
portao
portdo
portco
portbo
ramdatai
clk
ramdatao
RAM
Controller
I/O
Ports
Hardware
Stack
Control
Unit
Interrupt
Controller
int
por
sleep
ramwe
rdaddr
mclr
portai
portbi
Timer 0
t0cki
LU
prgdata
prgaddr
wraddr
Watchdog
Timer
clkwdt
portci
portdi
trisa
trisd
trisc
trisb
ramoe
Interrupt Controller – Interrupt Controller
module is responsible for interrupt manage
system for the external and internal interrupt
sources. It contains interrupt related register
called INTCON. There are three interrupt
sources:
¨ External interrupt INT
¨ TMR0 overflow interrupt
¨ PORTB change interrupt (pins B7:B4)
The interrupt control register INTCON records
individual interrupt requests in flag bits.
A global interrupt enable bit, GIE enables all
unmasked interrupts. Each interrupt source
has an individual enable bit, which can enable
or disable corresponding interrupt.
When an interrupt is responded to, the GIE is
cleared to disable any further interrupt, the
return address is pushed into the stack and
the PC is loaded with 0004h. The interrupt flag
bits must be cleared in software before re-
enabling interrupts.
Timer 0 – Main system’s timer and prescaler.
This timer operates in two modes: 8-bit timer
or 8-bit counter. In the “timer mode”, timer
registers are incremented every 4 CLK peri-
ods. When the prescaler is assigned into the
TIMER prescale ration can be divided by 2, 4
.. 256. In the “counter mode” the timer register
is incremented every falling or rising edge of
T0CKI pin, dependent on T0SE bit in OPTION
register.
Watchdog Timer– it’s a free running timer.
WDT has own clock input separate from sys-
tem clock. It means that the WDT will run
even if the system clock is stopped by execu-
tion of SLEEP instruction. During normal op-
eration, a WDT time-out generates a Watch-
dog reset. If the device is in SLEEP mode the
WDT time-out causes the device to wake-up
and continue with normal operation.
I/O Ports – Block contains DRPIC1655X’s
general purpose I/O ports and data direction
registers (TRIS). The DRPIC1655X has four
8-bit full bi-directional ports PORT A, PORT B,
PORT C, PORT D. Each port’s bit can be indi-
vidually accessed by bit addressable instruc-
tions. Read and write accesses to the I/O port
are performed via their corresponding SFR’s
PORTA, PORTB, PORTC, PORTD. The read-
ing instruction always reads the status of Port
pins. Writing instructions always write into the
Port latches. Each port’s pin has an corre-
sponding bit in TRISA, B, C and D registers.
When the bit of TRIS register is set this
means that the corresponding bit of port is
configured as an input (output drivers are set
into the High Impedance).