n 40 pin DIP & 42 pin SDIP package
n Operating Voltage Range: 4.5V to 5.5V
n CMOS technology for low power consumption
n Crystal oscillator or ceramic resonator* available
n 6502 8-bit CMOS CPU core
n 8MHz operation of frequency
n 4/8/12/16/24K bytes ROM are available
n 256 bytes of RAM (which stores EDID for DDC1/2B)
n One 8-bit pre-loadable base timer
n 14 channels of 8 bit PWM outputs:
6 channel with 5V open drain and 8 channel with 12V
open drain
n 2 channel A/D converters with 6-bit re solution
General Description
NT6861 is a monitor component µC for auto-sync and
digital controlled applications. It contains a 6502
8-bit CPU core, 256 bytes of RAM used as working RAM
and stack area, 24K bytes of ROM maximum for
programming, 14-channel 8-bit PWM D/A converters, 2channel A/D converters for key detection saving I/O pins,
one 8 bit pre-loadable base timer, internal Hsync and
Vsync signals processor providing mode detection,
watch-dog timer preventing system from abnormal
operation, and an I2C bus interface.
n 24 bi-directional I/O port pins and 1 I/P pin
n Hsync/Vsync signal processor
n Hardware sync signals polarity & freq. evaluator
n Built-In I2C bus interface
n Supporting VESA DDC1/2B function
n Six-interrupt sources
- INTV (Vsync INT)
- INTE (External INT with rising edge trigger)
- INTMR (Timer INT )
- INTA (Slave Address Matched INT)
- INTD (Shift Register INT)
- INTS (SCL GO-LOW INT)
n Hardware watch-dog timer function
Users can store EDID data in the 128 bytes of RAM for
DDC1/2B, so that users can save the cost of dedicated
EEPROM for EDID. Half frequency output function can
save external one-shot circuit. All of these designs create
savings in component costs.
* The frequency deviation of ceramic resonator has
P07/HSYNCOP07I/OBi-directional I/O pin, shared with hsync out
DAC7OOpen drain 12V, D/A converter output
DAC5OOpen drain 12V, D/A converter output
DAC3OOpen drain 12V, D/A converter output
Debouncing & Schmitt trigger input pin for video horizontal
sync signal, internal pull high, shared with composite sync
input
Debouncing & Schmitt trigger input pin for video vertical sync
signal, intermally pull high, shared with external interrupt
source
4
NT6861
Functional Descriptions
1. 6502 CPU
The 6502 is an 8-bit CPU that provides 56 instructions, decimal and binary arithmetic, thirteen addressing modes, true indexing
capability, programmable stack pointer with variable length stack, a wide selection of addressable memory, and interrupt input
options.
The CPU clock cycle is 4MHz (8MHz system clock divided by 2). Refer to 6502 data sheet for more details.
07
Accumulator A
7
Index Register Y
70
Index Register X
Program Counter PCH
PCL
70
7
Stack Pointer SP
NStatus Register P
VBDIZ
0
815
0
07
C
Carry
Zero
IRQ Disable
Decimal Mode
BRK Command
Overflow
Negative
1 = TRUE
1 = Result ZERO
1 = DISABLE
1 = TRUE
1 = BRK
1 = TRUE
1 = NEG
Figure 1. 6502 CPU Registers and Status Flags
5
2. Instruction set list
Instruction CodeMeaningOperation
ADCAdd with carryA + M + C → A, C
ANDLogical ANDA • M → A
ASLShift left one bitC ← M7• • • M0 ← 0
BCCBranch if carry clearsBranch on C = 0
BCSBranch if carry setsBranch on C = 1
BEQBranch if equal to zeroBranch on Z = 1
BITBit testA • M, M7 → N, M6 → V
BMIBranch if minusBranch on N = 1
BNEBranch if not equal to zeroBranch on Z = 0
BPLBranch if plusBranch on N = 0
BRKBreakForced Interrupt PC+2 ↓ PC ↓
BVCBranch if overflow clearsBranch on V = 0
NT6861
BVSBranch if overflow setsBranch on V = 1
CLCClear carry0 → C
CLDClear decimal mode0 → D
CLIClear interrupt disable bit0 → I
CLVClear overflow0 → V
CMPCompare accumulator to memoryA − M
CPXCompare with index register XX − M
CPYCompare with index register YY − M
DECDecrement memory by oneM − 1 → M
DEXDecrement index X by oneX − 1 → X
DEYDecrement index Y by oneY − 1→Y
EORLogical exclusive-ORA ⊕ M →A
INCIncrement memory by oneM + 1 → M
INXIncrement index X by oneX + 1 → X
INYIncrement index Y by oneY + 1 → Y
LSRShift right one bit0 → M7 • • • M0 → C
NOPNo operationNo operation (2 cycles)
ORALogical ORA + M →A
PHAPush accumulator on stackA ↓
PHPPush status register on stackP ↓
PLAPull accumulator from stackA ↑
PLPPull status register from stackP ↑
NT6861
ROLRotate left through carryC ← M7 • • • M0 ← C
RORRotate right through carryC → M7 • • • M0 → C
RTIReturn from interruptP ↑, PC ↑
RTSReturn from subroutinePC ↑, PC+1 → PC
SBCSubtract with borrowA − M − C → A, C
SECSet carry1 → C
SEDSet decimal mode1 → D
SEISet interrupt disable status
STAStore accumulator in memoryA → M
STXStore index register X in memoryX → M
STYStore index register Y in memoryY → M
TAXTransfer accumulator to index XA →X
TAYTransfer accumulator to index YA → Y
TSXTransfer stack pointer to index XS → X
TXATransfer index X to accumulatorX → A
TXSTransfer index X to stack PointerX →S
1 → I
TYATransfer index Y to accumulatorY → A
* Refer to 6502 programming data book for more details.
7
NT6861
3. RAM: 256 X 8 bits
256 X 8-bit SRAM is used for data memory and stack. The RAM addressing range is from $0080 to $017F. From $0100 to
$017F is used as the EDID data buffer when activating DDC1/2B mode transmission. The contents of RAM are undetermined
at power-up and are not affected by system reset. Software programmers can allocate stack area in the RAM by setting stack
pointer register S. Because the 6502 default stack pointer is $01FF, programmers must set register S to FFH when starting the
program, so the stack area will map $01FF - $0180 to $00FF - $0080.
Note:The line above a writable signal name indicate an active low signal
The dash line in these control register indicate an undefined bit
The address of control register from $0026 to $007F are not used.
W
10
NT6861
5. Timing Generator
This block generates the system timing and control signal to be supplied to the CPU and on-chip peripherals. A crystal quartz,
ceramic resonator, or an external clock signal provided to the OSCI pin generates 8MHz system clock,
(4 MHz for CPU), Although internal circuits have a feedback resistor and compacitor included, components may be externally
added to ensure proper operation. The typical clock frequency is 8MHz. This frequency will affect the operation of on-chip
peripherals whose operating frequency is based on the system clock .
OSCI
8MHz
OSCO
(1)
NT6861
External Clock
Unconnected
OSCI
OSCO
(2)
NT6861
Figure 2. Oscillator Connections
6. A/D Converter
The analog to digital converter is a single 6-bit successive approximation converter. Analog voltage is supplied from external
sources to the A/D input pins and the results of the conversion are stored in the 6-bit data latch registers
($000D & $000E). The A/D converter is controlled by the control bits in the A/D control register ENDAC. Refer to the A/D
channel format table A/D input pins activation. A conversion is started by setting a '0' to the CONVERSION START bit ( CSTA)
in the A/D control register ($000D). This automatically sets the CONVERSION END bit ( CEND ) to '1'. When a conversion has
been finished, CEND bit automatically clears to '0'. The A/D conversion data in the AD LATCH registers ($000D & $000E) is
valid digital data.
The analog voltage to be measured should be stabled during the conversion operation. The variation should exceed
1/2 LSB for accuracy in measurement. Please refer Figure 3 for checking the linearity of A/D.
A/D Channel Format Table
ENAD1ENAD0
00AD1AD0
P11 lineP10 line
01AD1P10
10P11AD0
11P11P10
11
NT6861
A/D Channel Control Register
Addr.RegisterINITBit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
$000CENDACFFH
$000DAD0 REGC0H
$000EAD1 REG00H--AD15AD14AD13AD12AD11AD10R
ENAD1ENAD0ENDK13ENDK12ENDK11ENDK10ENDK9ENDK8
CEND
CSTA
AD05AD04AD03AD02AD01AD00
Input VoltageDigital ValueInput VoltageDigital ValueInput VoltageDigital Value
There are 14 PWM D/A converters with 8-bit resolution in NT6861. Eight of these D/A (DAC0 - DAC7) converters are opendrain output structures with 12V applied (maximum), and the other six D/A converters (DAC8 - DAC13) are
open-drain output structures with 5V applied (maximum). The PWM frequency is 31.25 KHz on 8 MHz system clock. Use of a
different oscillator frequency will result in different PWM frequency. As DAC8 - DAC13 are shared with I/O port pins, user can
write '0' to corresponding enable bit in the ENDAC control register to activate each of DACH8 - 13. There are 14-channel
readable DACH registers corresponding to 14 D/A converters. Each PWM output pulse width is programmable by setting the 8
bit digital to the corresponding DACH registers. When these DACH registers are set to 00H, the DAC will output LOW (GND
level) and each bit addition will add 125ns pulse width. After reset, all DAC outputs are set to 80H (1/2 duty output ). Refer to
Figure 4 for the detailed timing diagram of PWM D/A output.
8MHz Fosc
PWM value:
255 (FF)
255012mm+1m+225501
00
01
02
m
Figure 4. The DAC Output Timing Diagram and Wave Table