8-Bit Microcontroller for Monitor (32K OTP ROM Type)
Features
n Operating voltage range: 4.5V to 5.5V
n CMOS technology for low power consumption
n 6502 8-bit CMOS CPU core
n 8 MHz operation frequency
n 32K bytes of OTP (one time programming) ROM
n 512 bytes of RAM
n One 8-bit base timer
n 13 channels of 8-bit PWM outputs with 5V open drain
n 4 channel A/D converters with 6-bit resolution
n 25 bi-directional I/O port pins (8 dedicated I/O pins)
n Hsync/vsync signals processor for separate &
composite signal, including hardware sync signals
polarity detection and freq. counters with 2 sets of
Hsync counting interval
n Hsync/Vsync polarity controlled output, 5 selectable
free run output signals and self-test patterns, automute function, half freq. I/O function
n Two built-in I2C bus interfaces support VESA
DDC1/2B+
NT68P62-01
n Two layers of interrupt management
NMI interrupt sources
- INTE0 (External INT with selectable edge trigger)
- INTMUTE (Auto Mute Activated)
IRQ interrupt sources
- INTS0/1 (SCL Go-low INT)
- INTA0/1 (Slave Address Matched INT)
- INTTX0/1 (Shift Register INT)
- INTRX0/1 (Shift Register INT)
- INTNAK0/1 (No Acknowledge)
- INTSTOP0/1 (Stop Condition Occurred INT)
- INTE1 (External INT with Selectable Edge Trigger)
- INTV (VSYNC INT)
- INTMR (Base Timer INT)
- INTADC (AD Conversion Done INT)
n Hardware watch-dog timer function
n 40-pin P-DIP and 42-pin S-DIP packages
General Description
The NT68P62 is a new generation of monitor µC for autosync and digital control applications. Particularly, this chip
supports various and efficient functions to allow users to
easily develop USB monitors. It contains the 6502 8-bit
CPU core, 512 bytes of RAM used as working RAM and
stack area, 32K bytes of OTP ROM, 13-channel of 8-bit
PWM D/A converters, 4-channel A/D converters for keys
detection which can save I/O pins, one 8-bit pre-loadable
base timer, internal Hsync and Vsync signals processor,
and a watch-dog timer which prevents the system from
abnormal operation and two I2C bus interface. The user
can store EDID data in the 128 bytes of RAM for DDC1/2B,
so that user can reduce a dedicated EEPROM for EDID.
And Half frequency output function can save external oneshot circuit. All of these designs are committed to offer our
user saving component cost. The 42 pin S-DIP IC provides
two additional I/O pins – port40 & port41, Part number
NT68P62U represents the S-DIP IC. For future reference,
port40 & port42 is only available for the 42 pin S-DIP IC.
DAC0OOpen drain 5V, D/A converter output 0, shared with A/D
[ P ]
[OTP ROM program control]
converter channel 3 input
converter channel 2 input
[OTP ROM program output enable]
I
Schmitt Trigger input pin, low active reset with internal
pulled down 50K Ω register *
[OTP ROM program supply voltage]
Bi-directional I/O pin with internal pulled up 22KΩ register,
shared with input pin of external interrupt source0 (NMI),
with schmitt trigger, selectable triggered, and internal pulled
up 22K Ω register
1011P14/PATTERN
[ A15/CE ]
1112P13/HALFI
[ A11 ]
1213P12/HALFO
[ A10 ]
1314P11/ADC1
[ A9 ]
1415P10/ADC0
[ A8 ]
1516P16/INTE1P16I/O
P13I/O
P12I/O
P11I/O
P10I/O
I/O
[ I ]
[ I ]
[ I ]
[ I ]
[ I ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with the output of self test pattern
[ OTP ROM program address buffer & chip enable ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with half hsync input, shared with A/D converter
channel 3 input
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with half hsync output
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with A/D converter channel 1 input
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with A/D converter channel 0 input
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22KΩ register,
shared with input pin of external interrupt source1, with
Schmitt Trigger, selectable triggered, and an internal pulled
up 22K Ω register
3
Pin Description (continued)
NT68P62-01
Pin No.
DesignationReset Init.I/ODescription
40 Pin42 Pin
16 - 2317 - 24P27 – P20
[ DB7 ] – [ DB0]
2425P30/SDA0
[ A12 ]
2526P31/SCL0
[ A13 ]
2627P00/DAC7
[ A0 ]
2728P01/DAC8
[ A1 ]
2829P02/DAC9
[ A2 ]
2930P03/DAC10
[ A3 ]
I/O
[ I/O ]
P30I/O
[ I ]
P31I/O
[ I ]
P00I/O
[ I ]
P01I/O
[ I ]
P02I/O
[ I ]
P03I/O
[ I ]
Bi-directional I/O pin, push-pull structure with high current
drive/sink capability
[ OTP ROM program data buffer ]
Open drain 5V bi-directional I/O pin P30, shared with SDA0
pin of I2C bus Schmitt Trigger buffer
[ OTP ROM program address buffer ]
Open drain 5V bi-directional I/O pin P31, shared with SCL0
pin of I2c bus Schmitt Trigger buffer
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 8
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 9
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 10
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 11
[ OTP ROM program address buffer ]
3031P04/DAC11
[ A4 ]
3132P05/DAC12
[ A5 ]
3233P06/VSYNCO
[ A6 ]
3334P07/HSYNCO
[ A7 ]
3435CREGOOn chip voltage regulator output, external regulating
3536DAC6
[RESET]
3638DAC5/SDA1
[ MODE2 ]
P04I/O
[ I ]
P05I/O
[ I ]
P06I/O
[ I ]
P07I/O
[ I ]
O
[ I ]
O
[ I ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 12
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with open drain 5V D/A converter output 13
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with vsync out
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22K Ω register,
shared with hsync out
[ OTP ROM program address buffer ]
cap.(10µF ~ 100µF) should be connected here
Open drain 5V, D/A converter output 6
[ OTP ROM reset ]
Open drain 5V, D/A converter output 5, shared with open
drain SDA1 line of I2C bus, Schmitt Trigger buffer
[ OTP ROM mode select ]
4
Pin Description (continued)
Pin No.DesignationReset Init.I/ODescription
40 Pin42 Pin
NT68P62-01
3739DAC4/SCL1
[ MODE1 ]
3840DAC3
[ MODE0 ]
3941HSYNCIIDebouncing & Schmitt Trigger input pin for video horizontal
4042VSYNCI/INTV
[ A14 ]
-6P40I/O
-37P41I/O
* This RESET pin must be pulled high by external pulled-up register (5KΩ suggestion), or it will remain in low voltage to
continually rest system.
VSYNCII
O
Open drain 5V, D/A converter output 4, shared with open
drain SCL1 line of I2C bus, Schmitt Trigger buffer
[ I ]
[ OTP ROM mode select ]
O
Open drain 5V, D/A converter output 3
[ I ]
[ OTP ROM mode select ]
sync signal, internal pull high, shared with composite sync
input
Debouncing & Schmitt trigger input pin for video vertical
sync signal, internal pull high, shared with input pin of
[ I ]
external interrupt source intv with Schmitt Trigger,
selectable triggered, and internal pulled up 22KΩ register
[ OTP ROM program address buffer ]
Bi-directional I/O pin with internal pulled up 22KΩ register,
only 42 pin S-DIP available
Bi-directional I/O pin with internal pulled up 22KΩ register,
only 42 pin S-DIP available
5
NT68P62-01
Functional Description
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 and variable length stack, a wide selection of addressable memory ranges,
and interrupt input options.
The CPU clock cycle is 4MHz (8MHz system clock divided by 2). Please refer to the 6502 data sheet for more detailed
information.
07
Accumnlator A
7
Index Register Y
70
Index Register X
Program Counter PCH
PCL
70
7
Stack Pointer SP
NV
B
ZID
0
815
0
07
C
Status Register P
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.1. The 6502 CPU Registers and Status Flags
6
2. Instruction Set List
Instruction CodeMeaningOperation
NT68P62-01
ADCAdd with carry
ANDLogical AND
ASLShift left one bit
BCCBranch if carry clears
BCSBranch if carry sets
BEQBranch if equal to zero
BITBit test
BMIBranch if minus
BNEBranch if not equal to zero
BPLBranch if plus
BRKBreak
BVCBranch if overflow clearsBranch on V = 0
BVSBranch if overflow setsBranch on V = 1
CLCClear carry0 → C
CLDClear decimal mode
A + M + C → A, C
A•M → A
C ← M7 …M0 ← 0
Branch on C = 0
Branch on C = 1
Branch on Z = 1
A•M, M7 →N, M6 →V
Branch on N = 1
Branch on Z = 0
Branch on N = 0
Forced Interrupt PC+2↓ PC↓
0 → D
CLIClear interrupt disable bit
CLVClear overflow
CMPCompare Accumulator to memory
CPXCompare with index register X
CPYCompare with index register Y
DECDecrement memory by one
DEXDecrement index X by one
DEYDecrement index Y by one
EORLogical exclusive-OR
INCIncrement memory by one
INXIncrement index X by one
INYIncrement index Y by oneY + 1 → Y
0 → I
0 → V
A - M
X - M
Y - M
M - 1 → M
X - 1 → X
Y - 1 → Y
A ⊕ M→A
M + 1 → M
X + 1 → X
7
Instruction Set List (continued)
Instruction CodeMeaningOperation
NT68P62-01
JMPJump to new location
JSRJump to subroutine
LDALoad accumulator with memory
LDXLoad index register X with memoryM → X
LDYLoad index register Y with memory
LSRShift right one bit
NOPNo operationNo operation (2 cycles)
ORALogical OR
PHAPush accumulator on stack
PHPPush status register on stack
PLAPull accumulator from stack
PLPPull status register from stackP ↑
ROLRotate left through carry
RORRotate right through carry
RTIReturn from interrupt
RTSReturn from subroutine
(PC+1)→ PCL, (PC+2)→ PCH
PC+2↓, (PC+1)→ PCL, (PC+2)→ PCH
M → A
M → Y
0 → M7 …M0 → C
A + M → A
A ↓
P ↓
A ↑
C ← M7 …M0 ← C
C → M7 …M0 → C
P ↑, PC ↑
PC ↑, PC+1 → PC
SBCSubtract with borrowA - M - C → A, C
SECSet carry
SEDSet decimal mode
SEISet interrupt disable status
STAStore accumulator in memory
STXStore index register X in memoryX → M
STYStore index register Y in memory
TAXTransfer accumulator to index X
TAYTransfer accumulator to index Y
TSXTransfer stack pointer to index X
TXATransfer index X to accumulatorX → A
TXSTransfer index X to stack pointer
TYATransfer index Y to accumulator
* Refer to 6502 programming data book for more details.
1 → C
1 → D
1 → I
A → M
Y → M
A → X
A → Y
S → X
X → S
Y → A
8
NT68P62-01
3. RAM: 512 X 8 bits
The built-in 512 X 8-bit SRAM is used for data memory and stack area. The RAM addressing range is from $0080 to $027F.
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 S register to FFH when starting the program.
as; LDX#$FF
TXS
$0000
$003D
$0080
System Registers
Unused
$01FF
$027F
$0280
$7FFF
$8000
( 32 K Bytes )
RAM
( 512 Bytes )
Unused
OTP
ROM
stack pointer
$FFFANMI-L
$FFFB
$FFFCRST-L
$FFFD
$FFFE
$FFFF
NMI-H
RST-H
IRQ-L
IRQ-H
NMI vector
RESET vector
IRQ vector
4. ROM: 32K X 8bits
NT68P62 provides 32K ROM space for programming. The ROM space is located from $8000 to $FFFF.
The addresses, from $FFFA to $FFFF, are reserved for the 6502 CPU vectors, thus users must arrange them by
themselves.
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 which will be provided to the OSCI pin generates
system timing. It generates 8MHz system clock, 4MHz for
the CPU. Although internal circuits have a feedback resister
NT68P62-01
and compacitor included, users can externally add these
components for proper operating.
The typical clock frequency is 8MHz. Different frequencies
will affect the operation of those on-chip peripherals whose
operating frequency is based on the system clock.
OSCI
8MHz
OSCO
(1)
NT68P62
Figure 6.1. Oscillator Connections
7. RESET
The NT68P62 can be reset by the external reset pin or by
the internal watch-dog timer. This is used to reset or start
the microcontroller from a POWER DOWN condition.
During the time that this reset pin is held LOW (*reset line
must be held LOW for at least two CPU clock cycles),
writing to or from the µC is inhibited. When a positive edge
is detected on the RESET input, the µC will immediately
begin the reset sequence.
After a system initialization time of six CPU clock cycles,
the mask interrupt flag will be set and the µC will load the
program counter from the memory vector locations $FFFC
and $FFFD. This is the start location for program control.
An internal Schmitt Trigger buffer at the RESET pin is
provided to improve noise immunity.
External Clock
Unconnected
The reset status is as follows:
1. PORT0、PORT1、PORT2、PORT3 (& PORT4) pins
will act as I/O ports with HIGH output
5. Various Interrupt sources are disabled and cleared
6. A/D converter is disabled and stopped
7. DDC1/2B+ function is disabled
8. PWM DAC0 – DAC6 output 50% duty waveform and
DAC7 - DAC12 is disabled
9. Watch-dog timer is cleared and enabled
OSCI
OSCO
NT68P62
(2)
13
NT68P62-01
8. A/D Converters
The structure of these analog to digital converters is 6-bit
successive approximation. Analog voltage is supplied from
external sources to the A/D input pins and the result of the
conversion is stored in the 6-bit data latch registers ($0011
& $0014). The A/D channels are activated by clearing the
correspondent control bits in the ENADC control register.
When users write '0' into one of the enable control bits, its
correspondent I/O pin or DAC will be switched to the A/D
converter input pin (ADC0 & ADC1 shared with PORT10 &
PORT 11; ADC2 & ADC3 shared wit DAC0 & DAC1).
(CONVERSION START) in the ENADC control register.
When conversion is finished, system will set this INTADC
bit. Users can monitor this bit to get the valid A/D
conversion data in the AD latch registers ($0011 - $0014).
Users can also open interrupt sources to remind users to
get the stable digital data. Notice that only at the activated
A/D channel, its latched data are available.
The analog voltage to be measured should be stabled
during the conversion operation and the variation will not
Note: It is strongly recommended that the ADC’s input signal should be allocated in the ADC’s linear voltage range
(1.5V~3.5V) to obtain a stable digital value. Do not use the outer ranges (0V~1.4V & 3.6V~5.0V) in which the
converted digital value is not guaranteed.
There are 13 PWM D/A converters with 8-bit resolution in NT68P62. All of these D/A (DAC0 - DAC12) converters are opendrain output structure with external 5V applied maximum. DAC0 – DAC6 are dedicated PWM channels, and DAC7 - DAC12
are shared with I/O pins. Those shared PWM channels are activated by clearing the correspondent control bits in the
ENDAC control register ($000F). When users write '0' into one of the enable control bits, its correspondent I/O pin will be
switched to PWM output pin.
The PWM refresh rate is 62.5KHz operating on 8MHz system clock. There are 13 readable DACH registers corresponding to
13 PWM channels ($0030 - $003D). 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 every
1 bit addition will add 62.5ns pulse width. After reset, all DAC outputs are set to 80H (1/2 duty output). (Please refer to Figure
9.1 for the detailed timing diagram of PWM D/A output.)
Fosc
8MHz
00
01
02
03
m
255(FF)
255012m
3m-10
Figure 9.1. The DAC Output Timing Diagram and Wave Table
255
1PWM value :
15
NT68P62-01
ENDK7
PWM DACs (continued)
DAC0 & DAC1 are shared with ADC2 & ADC3 input pins respectively. If ENADC2/ 3 bit in the ENADC control register is
cleared to LOW, A/D converters will activate simultaneously. After the chip is reset, ENADC2/ 3 bits will be in HIGH state
and DAC0 & DAC1 will act as PWM output pins.
DAC4 & DAC5 are shared with SCL1 & SDA1 I/O pins respectively. If users clear the ENDDC bit in the CH1CON control
register to LOW, channel 1 of DDC will be activated. When used as DDC channel, the I/O port will be an open drain structure
and include 'Schmitt Trigger' buffer for noise immunity. After the chip is reset, ENDDC bits will be in HIGH state and DAC4 DAC5 will act as PWM output pins.
DAC control register ($000F) and DAC value register ($0030 - $003D)
W
W
16
NT68P62-01
10. Watch-Dog Timer (WDT)
The NT68P62 implements a watch-dog timer reset to avoid
system stop or malfunction. The clock of the WDT is from
on-chip RC oscillator which does not require any external
components. Thus, the WDT will run, even if the clock on
the OSCI/OSCO pins of the device have been stopped.
The WDT time interval is about 0.5 second. The WDT must
The system provides two kinds of interrupt sources: NMI &
IRQ. The NMI can not be masked and if enabling NMI
interrupt sources, users will execute the NMI interrupt
vector anytime when sources are activated. The IRQ
interrupts can be masked by executing a CLI instruction or
setting the interrupt mask flag directly in the µC status
register. In process IRQ interrupt, if the interrupt mask flag
is not set, the µC will begin an interrupt sequence. The
program counter and processor status register will be
stored in the stack. The µC will then set the interrupt mask
flag HIGH so that no further interrupts may occur. At the
end of this cycle, the program counter will be loaded from
addresses $FFFE & $FFFF, then transferring program
control to the memory vector located at these addresses.
For NMI interrupt, µC will transfer execution sequence to
the memory vector located at addresses $FFFA & $FFFB.
be cleared within every 0.5 second when the software is in
normal sequence, otherwise the WDT will overflow and
cause a reset. The WDT is cleared and enabled after the
system is reset, and can not be disabled by the software.
Users can clear the WDT by writing 55H to CLRWDT
register ($0020).
When manipulating various interrupt sources, NT68P62
divides them into two groups for accessing them easily.
One is NMI group and the other is IRQ group.
- The NMI group includes INTE0, INTMUTE.
- The IRQ group includes subgroup of IRQ0, IRQ1,RQ2:
IRQ0: DDC1/2B+ Channel 0 interrupt sources; It
includes INTS0, INTA0, INTTX0, INTRX0,
INTNAK0 and INTSTOP0 interrupts.
IRQ1: DDC1/2B+ Channel 1 interrupt sources; It
includes INTS0, INTA1, INTTX1, INTRX1,
INTNAK1 and INTSTOP1.
IRQ2: It includes INTADC, IN TV, INTE1 and INTMR
interrupt sources.
Below are the interrupt sources.
Nonmaskable Interrupt Group:
InterruptMeaningAction
INTE0 INTExternal 0 INTIt will be activated by the rising edge or falling edge of external interrupt pulse.
The triggered edge can be selected by EDGE0 bit.
INTMUTEAuto MuteIt will be activated when the mute condition occurres (Hsync frequency
change). Please refer the synprocessor section for more detailed explanation.
Maskable Interrupt Group:
InterruptMeaningAction
INTADCA/D Converion
Done
INTV INTVsync INTIt will be activated as the rising edge of every vsync pulse.
INTE1 INTExternal 1 INTIt will be activated by the rising edge or falling edge of external interrupt pulse.
INTMR INTTimer INTIt will be activated as the rising edge of every when the Base Timer counter
User activates the ADC by clearing the CSTART bit. When AD conversion is
done, this bit will be set.
The triggered edge can be selected by EDGE1 bit.
overflows and counting from $FF to $00.
17
Loading...
+ 39 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.