| The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers. |
Programming Host Interface Mixed Signal Products SLAA052
Top Searches for this datasheetTVP5020 NTSC/P Video Decoder Programming Host Interface Mixed Signal Products SLAA052 IMPORTANT NOTICE Texas Instruments subsidiaries (TI) reserve right make changes their products discontinue product service without notice, advise customers obtain latest version relevant information verify, before placing orders, that information being relied current complete. products sold subject terms conditions sale supplied time order acknowledgement, including those pertaining warranty, patent infringement, limitation liability. warrants performance semiconductor products specifications applicable time sale accordance with TI's standard warranty. Testing other quality control techniques utilized extent deems necessary support this warranty. Specific testing parameters each device necessarily performed, except those mandated government requirements. CERTAIN APPLICATIONS USING SEMICONDUCTOR PRODUCTS INVOLVE POTENTIAL RISKS DEATH, PERSONAL INJURY, SEVERE PROPERTY ENVIRONMENTAL DAMAGE ("CRITICAL APPLICATIONS"). SEMICONDUCTOR PRODUCTS DESIGNED, AUTHORIZED, WARRANTED SUITABLE LIFE-SUPPORT DEVICES SYSTEMS OTHER CRITICAL APPLICATIONS. INCLUSION PRODUCTS SUCH APPLICATIONS UNDERSTOOD FULLY CUSTOMER'S RISK. order minimize risks associated with customer's applications, adequate design operating safeguards must provided customer minimize inherent procedural hazards. assumes liability applications assistance customer product design. does warrant represent that license, either express implied, granted under patent right, copyright, mask work right, other intellectual property right covering relating combination, machine, process which such semiconductor products services might used. TI's publication information regarding third party's products services does constitute TI's approval, warranty endorsement thereof. Copyright 1999, Texas Instruments Incorporated Contents Introduction Hardware Platform Block Diagram Schematic Diagram Microcontroller Interface Schematic Diagram TVP5020 NTSC/PAL Video Decoder Program Overview Microcontroller-Specific Macros Header File: REG652.H Source Code Modules Program Description Source Code Module: Main 4.1.1 Inclusion TVP5020 Microcode Files (Lines 11-14) 4.1.2 Function: Main() 4.1.3 Function: Power-Up Initialization() 4.1.4 Function: Patch TVP5020 Registers() Header File: Main.H Source File: MAIN.C Source Code Module: 4.4.1 Function: initia_i2c() (Lines 28-41) 4.4.2 Function: start_i2c() 4.4.3 Function: i2c_isr() (Lines 77-266) Header File: I2C.H Source File: I2C.C Source Code Module: Timer 4.7.1 Function: timer0_isr() (Lines 26-59) 4.7.2 Function: timer0_initialize() (Lines 61-94) 4.7.3 Function: ResetTickCount() (Lines 96-112) 4.7.4 Function: current_tick() (Lines 114-131) 4.7.5 Function: timer0_elapsed_count() (Lines 133-150) 4.7.6 Function: timer0_wait() (Lines 152-167) Header File: Timer.H Source File: TIMER.C 4.10 Source Code Module: I2C5020 4.10.1 Function: DecodeReset() (Lines 14-18) 4.10.2 Function: HandleDownload() (Lines 20-24) 4.10.3 Function: WriteTVP5020() (Lines 26-38) 4.10.4 Function: ReadSwitch() (Lines 40-65) 4.10.5 Function: ReadTVP5020() (Lines 67-89) 4.11 Header File: I2C5020.H 4.12 Source File: I2C5020.C 4.13 Source Code Module: I2C6000 4.13.1 Function: read_tvp6000() (Lines 23-40) 4.13.2 Function: write_tvp6000() (Lines 41-50) 4.13.3 Function: LoadTVP6000() (Lines 52-75) 4.13.4 Function: PatchTVP6000() (Lines 77-97) 4.14 Header File: I2C6000.H 4.15 Source File: I2C6000.C 4.16 TVP6000 Initialization Data NTSC with CCIR601 Sampling 4.17 TVP6000 Initialization Data NTSC with Square Pixel Sampling TVP5020 NTSC/PAL Video Decoder Figures 4.18 TVP6000 Initialization Data with CCIR601 Sampling 4.19 TVP6000 Initialization Data with Square Pixel Sampling List Figures TVP56000EVM Block Diagram Microcontroller Interface Schematic TVP5020 NTSC/PAL Video Decoder Schematic TVP56000EVM Board Layout Help-About Dialog from uVision/51 Windows Help-About Dialog Signum Systems In-Circuit Emulator TVP5020 Microcode Hex-ASCII Format TVP5020 Microcode After Conversion Standard-C Format TVP5020 Microcode After Modification List Tables Microcontroller Port Utilization Switch Settings TVP560000EVM Jumper Settings TVP56000EVM Using Sampling Rate Dependent Jumper Settings Source Code Module Relationships TVP5020 Register Patches Controller: Master Transmitter States Controller: Master Receiver States SLAA052 TVP5020 NTSC/PAL Video Decoder Programming Host Interface Michael Tadyshak ABSTRACT This application report provides complete working example C-language program initialize video decoder using interface. This Example Initialization Program executes TVP56000EVM evaluation module featuring TVP5020 video decoder TVP6000 video encoder. topics covered include TVP56000EVM hardware platform, microcontrollerspecific aspects, detailed description source-code modules. Introduction TVP5020 enables wide range applications providing support each following host interfaces: (Inter-Integrated Circuit) Bus© 1995 Philips Semiconductors (Video Interface Port)© 1994, 1996, 1997 Video Electronic Standards Association (Video Module Interface)© 1997 Cirrus Logic Software development time reduced utilizing this Example Initialization Program. user modify rebuild source code quick verification TVP56000EVM. Also, TVP5020-specific source-code modules used reference software development user's hardware platform. Hardware Platform Hardware Platform Block Diagram This program tested TVP56000EVM evaluation module. block diagram this shown Figure program executed Philips P80C652 microcontroller. This device derivative Intel 80C51 microcontroller, second-sourced Philips. P80C652 includes on-chip controller. program stored Atmel 29C512 flash memory device. Since this program scaled-down version complete microcode program, does support flash reprogramming serial port. install this program EVM, must programmed into flash memory device with PROM programmer. also static available program use. J3-Y J3-C Comp Comp S-Video In(Y) S-Video In(C) Y[7:0] TVP5020 TVP6000 Comp S-Video Out(Y) S-Video Out(C) XTAL Y[7:0] J5-Y J5-C Y[7:0] SCLK XTAL Philips P80C652 Microcontroller D+3.3 PLL+3.3 XTAL Voltage Regulator D1CLK Flash Memory J7-4 J7-5 J7-3 RS-232 Figure TVP56000EVM Block Diagram Schematic Diagram Microcontroller Interface schematic diagram showing microcontroller surrounding circuitry shown Figure Refer this diagram understand some hardwarespecific aspects program. P80C652 four eight-bit ports. Since this device configured external memory, port used multiplexed lower address data (AD[7-0]), port used output upper address bits A[15-8]. ports have some dedicated functions otherwise user-defined, illustrated Table SLAA052 Hardware Platform names signal name column shown exactly they would appear program. Each macro representing special-function register special-function defined P80C652. user-defined bits INTREQ, FLASHJMP, LED1, LED2 used this program. used read corresponding switches select video mode shown Table switch used. T6RESET provides software means reset TVP6000 Video Encoder. Notice that clock (SCL) data (SDA) signals must each pulled with resistor. programmable logic device (PAL1) controls access flash memory during flash reprogram operation, also enables TVP5020 interface mapped external data memory space. this program, PAL1's only function route signals straight from microcontroller flash memory. TVP5020 NTSC/PAL Video Decoder RBUS Normal ('H') Load ('L') HEADER T6RST T6RST RX2(in) TX2(out) INTREQ P3.3 INTREQ 74ALS05 P3.6/WR P3.7/RD XTAL2 XTAL1 P2.0/A8 P2.1/A9 P2.2/A10 P2.3/A11 P2.4/A12 P1.4 P1.3 P1.2 P1.1 P1.0 P0.0/AD0 P0.0/AD1 P0.0/AD2 P0.0/AD3 2NBS08-TJ2-103-ND RPACK Bourns SOIC /SYSRST Hardware Platform SLLA052 SW_PUSH CONTROL SENSE /RESIN RESET /RESET TLC7705 DIP-3 AD[7:0] A[0:1] 74F573 (socketed) I/O0 I/O1 I/O2 I/O3 I/O4 I/O5 I/O6 I/O7 Polarized cap-stripe marked P1.5 P1.6/SCL P1.7/SDA P3.0/RxD P3.1/TxD P3.2/INT0 P3.3/INT1 P3.4/T0 P3.5/T1 80C652 (socketed) P0.4/AD4 P0.5/AD5 P0.6/AD6 P0.7/AD7 PSEN P2.7/A15 P2.6/A14 P2.5/A13 /PSEN /FRD /FWR AT29C512 Byte Flash Memory A[15:8] 74ALS05 /TRD TVP5020 /TCE MCM6206DJ25 Byte /RAMWR RI(in) DTR(out) CTS(in) TX(out) RTS(out) RX(in) DSR(in) DCD(in) RI(in) DCD(in) CTS(in) DTR(out) TX1(out) RX1(in) RTS(out) DSR(in) 10.8 CONNECTOR PAL1 (socketed) /PSEN TX(out) RX1(in) TX1(out) RX(in) IO18 IO17 IO16 IO15 IO14 IO13 IO12 TX2(out) RX2(in) /RAMWR /RAMRD /FWR /FWD SN75185 HEADER TIBPAL16L8 Video Chip Evaluation System: Controller Figure Microcontroller Interface Schematic Hardware Platform Table Microcontroller Port Utilization NAME P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 SIGNAL NAME T6RESET INTREQ FLASHJMP LED1 LED2 DIRECTION Output Input Input Input Output Output Output Input Output Input Input Output Output Output Output FUNCTION Flash memory state switch switch switch Flash memory state TVP6000 reset clock data RS-232 receive data RS-232 transmit data TVP5020 interrupt request Flash memory jumper External memory write strobe External memory read strobe DEFINITION User-defined User-defined User-defined User-defined User-defined User-defined Dedicated Dedicated Dedicated Dedicated User-defined User-defined User-defined User-defined Dedicated Dedicated Table Switch Settings TVP560000EVM VIDEO STANDARD NTSC NTSC SAMPLING RATE CCIR601 Square pixel CCIR601 Square pixel INDIVIDUAL SWITCHES S3-3 S3-2 S3-1 Schematic Diagram TVP5020 NTSC/PAL Video Decoder schematic diagram TVP5020 surrounding circuitry shown Figure interface simple. TVP5020 (#79) input clock (SCL). connect from microcontroller TVP5020 pin, jumper JP12 must installed. TVP5020 (#78) data line (SDA). connect from microcontroller TVP5020 pin, must jumpered across pins TVP5020 (#76) input address select (I2CA). ground VC3, must jumpered across pins This sets TVP5020 device write read, this program requires. Figure shows TVP56000EVM board layout. Refer this figure location orientation jumpers, switches, connectors. jumper settings summarized Table setting irrelevant because this program does RS-232 serial port interface. Jumper settings select between CCIR601 square pixel sampling rates shown Table TVP5020 NTSC/PAL Video Decoder DVDD_3.3 RPACK 2NBS08-TJ2-103-ND RBUS DGND DVDD DGND DVDD 0.01 VBIAS_CH1 CH1_AGND VI_1B VI_1A CH1_AVDD REFM REFP CH2_AVDD VI_2A VI_2B CH2_AGND VBIAS_CH2 AOUT_P AOUT_N AFE_GND NSUB AFE_VDD DTO_AVDD DTO_AGND INTREQ LT1585CT-3.3 AVCC 0.01 EXT_DATA8 DGND DVDD_3.3 DGND DVDD_3.3 INTREQ RSTINB DGND DVDD_3.3 DGND DVDD_3.3 VBIAS_CH2 AOUT_P AOUT_M VI_1B VI_1A REFM REFP VBIAS_CH1 VI_2A VI_2B JP12 JUMPER Install JP12 I2C. Remove JP12 VMI. AVCC /TCE HEADER /RAMWR HEADER Selects /RAMWR Host VI_1A VI_1B VI_2A VI_2B Sets I2CA Chip Enable Host TVP5020 Figure TVP5020 NTSC/PAL Video Decoder Schematic VBIAS_CH1 AGND VI_1B VI_1A AVCC REFM AVCC AVCC VI_2A VI_2B AGND VBIAS_CH2 AOUTP AOUTN AGND AGND AVCC AVCC AGND DVDD_3.3 LT1585CT-3.3 GLCO HEADER JP10 PALI EXT_DATA8 HEADER JP11 HEADER Y[7:0] RSTINB XTAL1 XTAL2 /RAMWR /TCE HSYN AVID VSYN SCLK INTREQ RBUS D[7:0] /TRD RSTINB XTAL1 XTAL2 /RAMWR /TCE HSYN AVID VSYN SCLK INTREQ Hardware Platform SLLA052 Solid Tantalum mark polarization DGND 0.01 0.01 RPACK Selects TVP5020 Mode: GLCO PALI Mode MODE PCLK PREF SCLK XTAL2 XTAL1 PALI GLCO HSYN VSYN PLL_BYP AVID GPCL PLL_AVDD EXT_DATA8 EXT_DATA_8 DVDD DGND DVDD INTREQ TVP5020 PCLK PREF SCLK DGND XTAL2 XTAL1 DVDD PALI GLCO HSYN VSYN PLL_BYP AVID GPCL PLL_AVDD SCAN_CLK0 RSTINB GAN_EN TMODE 2NBS16-TG1-103-ND RPACK A[1:0] QFP80SOC PCLK PREF SCLK DGND XTAL2 XTAL1 DVDD_3.3 PALI GLCO HSYN VSYN PLL_BYP AVID GPCL PLL_AVDD DGND RSTINB DGND DGND Hardware Platform Composite Video S-Video Composite Video S-Video Composite Video Analog Regulator Power Connector TVP6000 Test Points -12V TVP5020 Test Points TVP5020 TVP6000 JP12 80C652 Microcontroller Regulator LEDs Digital Video Digital Video Reset Button PAL1 Flash Memory Switches RS-232 Port Figure TVP56000EVM Board Layout Table Jumper Settings TVP56000EVM Using JUMPER(s) POSITION DESCRIPTION NORMAL 1-3, STRAIGHT CABLE TVP6000: RCVR SCLK JP9, JP10, JP11 JP12 Table Sampling Rate Dependent Jumper Settings SAMPLING RATE CCIR601 Square pixel TVP5020 NTSC/PAL Video Decoder Program Overview Program Overview This complete working example C-language program initialize TVP5020 NTSC/PAL video decoder using interface. program compiled linked using uVision/51 Windows, software package compiling code 80C51-type microcontrollers, from Keil Software, Inc. Information about Keil Software found Internet www.keil.com. Help-About dialog this software package (Figure USP-51 from Signum Systems in-circuit emulator debugging P80C652-code. Information about Signum Systems found Internet www.signum.com. Help-About dialog USP-51 emulator software (Figure linker output standard Intel Intellec 8/MDS format, format that widely supported PROM programmers. program installed TVP56000EVM programming flash memory device (Atmel 29C512) using PROM programmer. TVP5020 microcode four video modes included program enable testing NTSC video standards using CCIR601 square pixel sampling rates. video mode selected setting DIP-switches shown Table Figure Help-About Dialog from uVision/51 Windows SLAA052 Program Overview Figure Help-About Dialog Signum Systems In-Circuit Emulator Microcontroller-Specific Macros Most source code standard C-language. main exception macros access special-function registers, special-function bits defined P80C652. complete macros defined P80C652 contained file REG652.H (see listing beginning page 10). shown Table there several user-definable pins assigned special EVM. These named ports sections header file. these user-definable pins, only SW2, SW3, T6RESET used this program. used read corresponding DIP-switches, T6RESET provides software reset TVP6000 video encoder. Many P80C652-specific special-function registers used control on-chip general-purpose timer interface. These localized TIMER source code. P80C652 provides bytes on-chip RAM, direct support external data memory (xdata space), read-only memory (code space). keywords xdata code sometimes required variable declarations specify type memory storage. example, arrays unsigned char, which hold TVP5020 microcode modules, declared with code keyword that they stored flash memory. TVP5020 NTSC/PAL Video Decoder Program Overview Header File: REG652.H REG652.H Header file Philips P80C652 Microntroller. BYTE Registers 0x80; 0x90; 0xA0; 0xB0; PCON TCON TMOD S0CON S0BUF S1CON S1STA S1DAT S1ADR 0xD0; 0xE0; 0xF0; 0x81; 0x82; 0x83; 0x87; 0x88; 0x89; 0x8A; 0x8B; 0x8C; 0x8D; 0xA8; 0xB8; 0x98; UART control 0x99; UART data buffer 0xD8; 0xD9; 0xDA; 0xDB; control register status register data register address register Register sbit 0xD7; sbit 0xD6; sbit 0xD5; sbit 0xD4; sbit 0xD3; sbit 0xD2; sbit 0xD0; TCON sbit sbit sbit sbit sbit sbit sbit sbit 0x8F; 0x8E; 0x8D; 0x8C; 0x8B; 0x8A; 0x89; 0x88; SLAA052 Program Overview Header File: REG652.H (continued) sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit sbit T6RESET sbit sbit sbit sbit sbit sbit sbit sbit LED2 sbit LED1 sbit FLASHJMP sbit INTREQ sbit sbit S0CON sbit sbit sbit sbit sbit sbit sbit sbit S1CON sbit sbit sbit sbit sbit sbit sbit ENS1 sbit 0xD8; 0xD9; 0xDA; 0xDB; 0xDC; 0xDD; 0xDE; 0xDF; 0x9F; 0x9E; 0x9D; 0x9C; 0x9B; 0x9A; 0x99; 0x98; 0xAF; 0xAD; interrupt enable 0xAC; UART interrupt enable 0xAB; 0xAA; 0xA9; 0xA8; 0xBD; 0xBC; 0xBB; 0xBA; 0xB9; 0xB8; 0x97; 0x96; 0x95; 0x94; 0x93; 0x92; 0x91; 0x90; 0xB7; 0xB6; 0xB5; 0xB4; 0xB3; 0xB2; 0xB1; 0xB0; TVP5020 NTSC/PAL Video Decoder Program Overview Source Code Modules Table summarizes relationships between various source-code modules. Each source-code module contained source file associated header file. timer modules described microcontroller-specific. order port these functions another hardware environment, equivalent functions, written specific processor, would need supplied created. Main, I2C5020, I2C6000 modules could used virtually unchanged. environment, TVP6000 software reset (T6RESET) reading DIP-switch lines would need implemented required. Table Source Code Module Relationships SOURCE CODE MODULE Main Timer I2C5020 I2C6000 DESCRIPTION Main program General-purpose timer routines routines TVP5020-specific routines TVP6000-specific routines MICROCONTROLLERSPECIFIC? TVP56000EVMSPECIFIC? (uses T6RESET) (uses SW3) CALLS FUNCTIONS THESE MODULES I2C5020, I2C6000, Timer None Timer I2C, Timer SLAA052 Program Description Program Description Source Code Module: Main 4.1.1 Inclusion TVP5020 Microcode Files (Lines 11-14) Header files containing TVP5020 microcode included. These provide support NTSC video standards with CCIR601 square pixel sampling. Each header file declares array type unsigned char. first byte each array subaddress writing TVP5020 program memory TVP5020 microcode supplied five-character Hex-ASCII format (Figure Conversion standard C-language header file done with utility called HexConv. output HexConv shown Figure necessary, #define constant code size (which includes sub-address byte well array name, given unique name. target processor 80C51 derivative, keyword code must inserted. also very helpful comment identifying microcode type version. resulting microcode file shown Figure 4.1.2 Function: Main() 4.1.2.1 Declaration TVP5020 Register Patch Data (Lines 16-24) After microcode downloaded TVP5020 restarted, registers initialized with their default values defined TVP5020 data manual) internal CPU. Some registers must patched with different value TVP5020 function properly TVP56000EVM. array g_pTVP5020Patch[ contains subaddress data three registers that must modified. Table describes these register changes. Table TVP5020 Register Patches SUBADDRESS DEFAULT DATA PATCHED DATA COMMENT Enable HSYN, VSYN, AVID, SCLK, PCLK outputs Bypass luminance processing during vertical blank Select 8-bit ITU-R BT.656 interface 80000 00000 303FC C3F80 Figure TVP5020 Microcode Hex-ASCII Format TVP5020 NTSC/PAL Video Decoder Program Description #define TVP5020_CODE_SIZE 0x27b8 unsigned char TVP5020_CODE[] 0x7E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0xFC, 0x0C, 0x3F, 0x80 Figure TVP5020 Microcode After Conversion Standard-C Format #define TVP5020_N601_CODE_SIZE 0x27b8 TVP5020 NTSC CCIR601 Version: unsigned char code T520_N601[] 0x7E, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0xFC, 0x0C, 0x3F, 0x80 Figure TVP5020 Microcode After Modification SLAA052 Program Description 4.1.2.2 Initialization (Lines 37-45) function call timer0_initialize() initializes on-chip general-purpose timer generate timer-tick interrupt every Next, timer0_wait() called produce delay allow things stabilize after reset. call DecoderReset() does nothing returns. This call included allow same main program used I2C, VIP, interfaces. 4.1.2.3 Video Mode Selection (Lines 47-72) current state switches read. lsbs used select video mode shown Table global variables g_nROMCodeSize g_pROMCode initialized with size selected microcode file bytes including sub-address byte) with starting address selected microcode data array. 4.1.2.4 Reset Timer Tick (Line call ResetTickCount() resets internal count timer-tick interrupts (which occur every ms). timer-tick count about seconds before rolling over. more complex program, with multiple uses general purpose timer, timer-tick count should reset only outermost loop. 4.1.2.5 Power-Up Initialization (Line call PowerUpInitialization() performs tasks downloading TVP5020 microcode, restarting TVP5020 internal CPU, patching TVP5020 registers, initializing TVP6000 video encoder. parameter passed PowerUpInitialization() indicate selected video mode. Upon return from PowerUpInitialization() program spins endless loop. 4.1.3 Function: Power-Up Initialization() 4.1.3.1 Microcode Download (Line call HandleDownload() calls specific routine which will download microcode video decoder. code size code pointer variables passed parameters. HandleDownload() routines have been written I2C, VIP, interfaces. source code module I2C5020.C contains version HandleDownload() Bus. 4.1.3.2 Restart Microprocessor (Lines 96-102) After microcode download completes, internal microprocessor restarted. This done writing byte (the data value) restart subaddress (7Fh). function WriteTVP5020() used whenever required write TVP5020 register. parameters passed WriteTVP5020() byte count (for I2C, this always pointer storage location subaddress data byte. wait inserted after restart command enable internal microprocessor complete initialization code. 4.1.3.3 Patch TVP5020 Registers (Lines 104-105) call PatchTVP5020Registers() implements register modifications described Section 4.1.2.1 Table TVP5020 NTSC/PAL Video Decoder Program Description 4.1.3.4 Reset TVP6000 Video Encoder (Lines 107-110) user-definable P1.5 used software-controlled reset TVP6000. T6RESET macro which allows control P1.5. TVP6000 reset input held active after TVP5020 initialized. This needed, since TVP6000 guaranteed have received clock from TVP5020 during power-up reset. 4.1.3.5 Initialize TVP6000 Video Encoder (Lines 112-113) call LoadTVP6000() initializes video encoder registers. parameter passed indicate selected video mode. register data located header file DATA6000.H. 4.1.4 Function: Patch TVP5020 Registers() 4.1.4.1 Loading Registers (Lines 120-123) loop used patch TVP5020 registers using data g_pTVP5020Patch array. This array global variable initialized lines 17-24. constant TVP5020_PATCH_SIZE holds number bytes array must changed number register writes changed. Header File: Main.H Main.H Header file main program initialize TVP5020 Video Decoder #define FALSE #define TRUE !FALSE #define TVP5020_RESTART_SUB_ADDR void void unsigned char void void unsigned void 0x7F main (void); DecoderReset( void ReadSwitch( void PowerUpInitialization( nSwitch HandleDownload( unsigned nCount, unsigned char* pInBuf WriteTVP5020(int nLength, unsigned char *pBuf PatchTVP5020Registers(void); SLAA052 Program Description Source File: MAIN.C COMPILER V5.10, COMPILATION MODULE MAIN OBJECT MODULE PLACED MAIN.OBJ COMPILER INVOKED C:\C51\BIN\C51.EXE MAIN.C LARGE stmt level source Main.C Main program initialize TVP5020 Video Decoder #include "Main.h" #include "Timer.h" #include "Reg652.h" #include "I2C6000.H" //TVP5020 microcode files #include "5020NSQP.H" #include "5020N601.H" #include "5020PSQP.H" #include "5020P601.H" Registers modify after TVP5020 startup #define TVP5020_PATCH_SIZE unsigned char code g_pTVP5020Patch[] subaddress, data 0x03, 0x19, 0x07, 0x10, 0x0D, 0x0F Size TVP5020 microcode file (defined 5020xxxx.H) unsigned g_nROMCodeSize TVP5020_N601_CODE_SIZE; Pointer TVP5020 microcode unsigned char* g_pROMCode T520_N601; TVP5020 NTSC/PAL Video Decoder Program Description Source File: MAIN.C (continued) void main(void) Switch value unsigned char nSwitch Initialize general purpose timer timer0_initialize(); Wait 100ms stabilization after reset timer0_wait(ONE_HUNDRED_MS); Bus, this configures TVP5020 interrupt output //(INTREQ) Bus, this sends reset code emulation FPGA DecoderReset(); LSBs switch select video mode nSwitch ReadSwitch() Point microcode selected switch switch( nSwitch case g_pROMCode T520_N601; g_nROMCodeSize TVP5020_N601_CODE_SIZE; break; case g_pROMCode g_nROMCodeSize break; case g_pROMCode g_nROMCodeSize break; case g_pROMCode g_nROMCodeSize break; Reset timer tick avoid rollover ResetTickCount(); Initialize video mode PowerUpInitialization( nSwitch After video initialized, nothing while(1) return; T520_NSQP; TVP5020_NSQP_CODE_SIZE; T520_P601; TVP5020_P601_CODE_SIZE; T520_PSQP; TVP5020_PSQP_CODE_SIZE; SLAA052 Program Description Source File: MAIN.C (continued) void PowerUpInitialization( nSwitch unsigned char buf[2]; Download video decoder microcode HandleDownload( g_nROMCodeSize, g_pROMCode //Restart microprocessor buf[0] TVP5020_RESTART_SUB_ADDR; buf[1] WriteTVP5020( Wait 10ms TVP5020 start-up timer0_wait(TEN_MS); Modify registers from default state required PatchTVP5020Registers(); Reset TVP6000 T6RESET timer0_wait(ONE_HUNDRED_MS); T6RESET Initialize TVP6000 LoadTVP6000( nSwitch void PatchTVP5020Registers (void) for( i=0; i<TVP5020_PATCH_SIZE; i+=2 WriteTVP5020( g_pTVP5020Patch+i return; COMPILATION COMPLETE. WARNING(S), ERROR(S) TVP5020 NTSC/PAL Video Decoder Program Description Source Code Module: This function initializes signals (SCL SDA) high level. internal P80C652 interrupt enabled given (normal) priority. P80C652 on-chip controller initialized master with baud rate 92.16 kHz. This frequency P80C652 oscillator frequency (11.0592 MHz) divided 120. 4.4.1 Function: initia_i2c() (Lines 28-41) 4.4.2 Function: start_i2c() This function called perform transaction bus. 4.4.2.1 Initialize Variables (Lines 54-64) current timer-tick count saved used later determine time-out condition occurred. macro used globally enable disable interrupts. global variables used interrupt service routine (ISR) are: b_counter Byte counter. Initialized 00h, counts terminal count value. num_b Number bytes. Holds terminal count value. slave_rw Slave device read/write bit. i2cbuf Pointer caller's data buffer. 4.4.2.2 Start Transaction (Lines 63-64) macro used start control register. Then, global interrupt control enables hardware interrupts. 4.4.2.3 Wait Transaction Complete (Lines 66-73) program remains loop waiting either transfer bytes, occurrence error condition. Meanwhile, interrupts occurring controlling data transfer. timer-tick count checked time-out condition comparing elapsed time with g_nI2Ctimeout. value g_nI2Ctimeout units timer ticks. timer tick programmed occur once every 4.4.3 Function: i2c_isr() (Lines 77-266) This interrupt service routine (ISR) interface. controller embedded P80C652. simple register interface provides access address, data, control status registers. Each time interrupt occurs, status register (S1STA) read obtain current state code from controller. state code used branch appropriate code segment handle interrupt. global variables updated data transferred to/from user's data buffer. states master transmitter master receiver described Tables last step interrupt handling writing following four codes back control register (S1CON) request specific action: I2C_RLS_STA -Release generate start condition I2C_RLS_ACK -Release acknowledge data transfer SLAA052 Program Description CONTROLLER STATE I2C_RLS_NACK -Release acknowledge data transfer I2C_STOP -Generate stop condition Table Controller: Master Transmitter States DEFINITION MASTER TRANSMITTER STATES Start condition been transmitted Repeat start condition been transmitted Slave address been sent received Slave address been sent received Data been transmitted been received Send slave address Send slave address Transmit first data byte Transmit first data byte. Flag error. Transmit next data byte. data been transmitted, issue stop condition. NEXT ACTION TAKEN Data been transmitted been received Transmit next data byte. data been transmitted, stop bus. Flag error. arbitration lost Flag arbitration lost error. Issue another start condition. Table Controller: Master Receiver States CONTROLLER STATE DEFINITION MASTER RECEIVER STATES Slave address been sent received transaction involves only data byte, signal controller next data byte received. Otherwise, signal controller acknowledge next data byte received. transaction involves only data byte, signal controller next data byte received. Otherwise, signal controller acknowledge next data byte received. Flag error. this previous NEXT-TO-LAST data byte, signal controller acknowledge next data byte received. this next-to-last data byte, signal controller next data byte received. NEXT ACTION TAKEN Slave address been sent received Data been received been transmitted Data been received been transmitted this previous LAST data byte, signal controller acknowledge next data byte received flag error. this last data byte, then issue stop condition. relevant state information available action required error detection illegal start stop Flag error condition, controller detected entry into illegal state. controller reported state which supported Flag unsupported state error interrupt service routine Other TVP5020 NTSC/PAL Video Decoder Program Description Header File: I2C.H I2C.H Header file routines #define FALSE #define TRUE !FALSE #define #define #define #define #define #define ERR_I2C_NOTACK ERR_I2C_ARBILOST ERR_I2C_GERROR ERR_I2C_TIMEOUT ERR_I2C_BUSERROR ERR_I2C_DEVID 0x01 0x02 0x04 0x08 0x10 0x20 void initia_i2c(void); unsigned start_i2c(unsigned char i2c_addrs, buf_length, unsigned char bufaddrs); SLAA052 Program Description Source File: I2C.C COMPILER V5.10, COMPILATION MODULE OBJECT MODULE PLACED I2C.OBJ COMPILER INVOKED C:\C51\BIN\C51.EXE I2C.C LARGE stmt level source I2C.C Routines #include "I2C.h" #include "Timer.h" #include "reg652.h" #define FALSE #define TRUE #define I2C_STOP !FALSE 0xD5 #define I2C_RLS_ACK 0xC5 #define I2C_RLS_NACK 0xC1 #define I2C_RLS_STA 0xE5 generated STOP condition I2C, kBps Release generate Release generate Release generate START Timeout unsigned g_nI2CTimeout TEN_SECONDS; Errors length send buffer number bytes that will sent/read number bytes that will sent/read unsigned char xdata slave_rw slave address plus read/write direction static unsigned char *i2cbuf (unsigned char*)0; pointer send/receiving buffer This function will initialize interface void initia_i2c(void) data high level clock high level enable interrupt interrupt PRIORITY level S1CON I2C_RLS_ACK; 80C652 master only, rate 92.16k unsigned unsigned unsigned unsigned xdata xdata xdata xdata error_i2c b_counter num_b num_b_minus_1 TVP5020 NTSC/PAL Video Decoder Program Description Source File: I2C.C (continued) This function transfers block data unsigned start_i2c( unsigned char i2c_addrs, buf_length, unsigned char *bufaddrs unsigned xdata start_point; unsigned test reference time start_point current_tick Disable interrupt b_counter num_b (unsigned)buf_length; num_b_minus_1 num_b slave_rw i2c_addrs; i2cbuf bufaddrs; initialized buffer point S1CON, start wait until data buffer have been sent while (b_counter num_b) error_i2c g_nI2Ctimeout) error_i2c ERR_I2C_TIMEOUT; return( b_counter interrupt service routine interrupt number=5, address=0x002Bh, using register bank2 static void i2c_isr (void) interrupt using unsigned char i2cst; unsigned char nDummy i2cst S1STA; SLAA052 Program Description Source File: I2C.C (continued) switch (i2cst) following section will MASTER transmit mode START condition been sent will send slave address case 0x08: S1DAT slave_rw; S1CON I2C_RLS_ACK; break; repeat START been transmitted will load SLA+R/W, return case 0x10: S1DAT slave_rw; S1CON I2C_RLS_ACK; break; slave address been send received will send byte data case 0x18: S1DAT *i2cbuf; load byte data register S1CON I2C_RLS_ACK; break; received, will send byte data anyway case 0x20: S1DAT *i2cbuf; load byte data register S1CON I2C_RLS_ACK; error_i2c ERR_I2C_NOTACK; break; continue sending data byte data been sent received data were sent, then transmit STOP else continue transmit next byte case 0x28: b_counter++; Last state b_counter will num_b b_counter num_b S1DAT *(i2cbuf+b_counter); send byte data S1CON I2C_RLS_ACK; else S1CON I2C_STOP; data were sent,stop break; TVP5020 NTSC/PAL Video Decoder Program Description Source File: I2C.C (continued) byte data been sent rcvd case 0x30: b_counter++; Last state b_counter will num_b b_counter num_b S1DAT *(i2cbuf+b_counter); send byte data S1CON I2C_RLS_ACK; else S1CON I2C_STOP; data were sent, stop error_i2c ERR_I2C_NOTACK; break; arbitration lost, release restart case 0x38: S1CON I2C_RLS_STA; error_i2c ERR_I2C_ARBILOST; break; following section will MASTER receive mode /*SLA+R been sent, received case 0x40: num_b Only byte will received, don't acknowledge This will signal slave transmitter stop S1CON I2C_RLS_NACK; else More than byte will received, acknowledge first S1CON I2C_RLS_ACK; break; SLAA052 Program Description Source File: I2C.C (continued) received SLA+R, will ignore case 0x48: num_b Only byte will received, don't acknowledge This will signal slave transmitter stop S1CON I2C_RLS_NACK; else More than byte will received, acknowledge first S1CON I2C_RLS_ACK; error_i2c ERR_I2C_NOTACK; break; byte been received, returned case 0x50: read byte from S1DAT *(i2cbuf b_counter) S1DAT; b_counter++; this prior next-to-last byte b_counter num_b_minus_1 Acknowledge next byte received S1CON I2C_RLS_ACK; this next-to-last byte else acknowledge next byte received (the last byte) This will signal slave transmitter stop S1CON I2C_RLS_NACK; break; TVP5020 NTSC/PAL Video Decoder Program Description Source File: I2C.C (continued) byte received returned This should last byte received case 0x58: read byte from S1DAT *(i2cbuf b_counter) S1DAT; b_counter++; this last byte error condition b_counter num_b S1CON I2C_RLS_ACK; error_i2c ERR_I2C_NOTACK; this last byte, then STOP else S1CON I2C_STOP; break; Relevant state information available action required case 0xF8: nDummy break; error illegal start stop condition SIO1 entered illegal state case 0x00: S1CON I2C_RLS_ACK; error_i2c ERR_I2C_BUSERROR; break; other cases will error this system default: S1CON I2C_RLS_ACK; error_i2c ERR_I2C_GERROR; break; WARNING(S), ERROR(S) COMPILATION COMPLETE. SLAA052 Program Description Source Code Module: Timer general-purpose timer used insert time delays determine when time-out condition occurred. timer programmed that timer-tick interrupt occurs every 4.7.1 Function: timer0_isr() (Lines 26-59) This general-purpose timer. timer stopped constant loaded into timer data registers (TL0 TH0). Then timer restarted. timer increments generates interrupt when reaches maximum count. Each time timer-tick interrupt occurs, global variable timer0_tick incremented constant calculated that time from timer restart until reaches maximum count equation calculating timer reload values (TH0, TL0) from desired timer-tick period shown below. calculated timer reload value with 11.0592 crystal timer-tick period F8CDh. TH0, 10000h fosc TH0, 10000h ((11059200 0.002) TH0, F8h, 4.7.2 Function: timer0_initialize() (Lines 61-94) This function initializes general-purpose timer. called once program startup. timer-tick count initialized zero timer stopped. timer mode 16-bit counter with prescaling timer reload value written. timer interrupt enabled given (normal) priority. Then timer restarted. global interrupt control (EA) enabled. this point, timer-tick interrupts start occurring. 4.7.3 Function: ResetTickCount() (Lines 96-112) call ResetTickCount() resets timer-tick count zero. timer-tick count about seconds before rolling over. program with multiple uses general-purpose timer, timer-tick count should reset only outermost loop. 4.7.4 Function: current_tick() (Lines 114-131) This function returns current timer-tick count. 4.7.5 Function: timer0_elapsed_count() (Lines 133-150) This function returns number elapsed timer-tick counts. parameter starting timer-tick count from which measure elapsed time. 4.7.6 Function: timer0_wait() (Lines 152-167) This function generates time delay. parameter number timer-tick counts delay. TVP5020 NTSC/PAL Video Decoder Program Description Header File: Timer.H Timer.H Header file P80C652 microcontroller general purpose timer routines #define TCLK 11059200 Clock speed TICK #define TEN_MS #define ONE_HUNDRED_MS #define ONE_SECOND #define TEN_SECONDS void unsigned unsigned void void 500u 5000u timer0_initialize (void); current_tick (void); timer0_elapsed_count (unsigned start_tick); timer0_wait (unsigned num_tick); ResetTickCount( void SLAA052 Program Description Source File: TIMER.C COMPILER V5.10, COMPILATION MODULE TIMER OBJECT MODULE PLACED TIMER.OBJ COMPILER INVOKED C:\C51\BIN\C51.EXE TIMER.C LARGE stmt level source Timer.C P80C652 microcontroller general purpose timer routines #include "Timer.h" #include "reg652.h" Constant Declarations Every TIMER0 OVERFLOW interrupt will occur once tick: 10000h ((11,059,200 Hz/12) 0.002) 0xF8CD #define TIMER0_HI (unsigned char) 0xF8 #define TIMER0_LO (unsigned char) 0xCD Local Variable Declarations static unsigned xdata timer0_tick; static void timer0_isr (void); This function interrupt service routine TIMER should never called assembly function. will executed automatically when TIMER overflows. TVP5020 NTSC/PAL Video Decoder Program Description Source File: TIMER.C (continued) static void timer0_isr (void) interrupt using Adjust timer counter that another interrupt stop timer TIMER0_LO; TIMER0_HI; start timer Increment timer tick. This interrupt should occur approximately every 2ms. timer0_tick++; void timer0_initialize (void); TIMER0 mode 16bit timer This function enables TIMER TIMER will generate synchronous Interrupt once every void timer0_initialize (void) disable interrupts timer0_tick TMOD ~0x0F; TMOD 0x01; TIMER0_LO; TIMER0_HI; priority timer register enable timer interrupt, register start timer TCON register enable interrupts stop timer clear timer mode bits timer into 16-bit prescale SLAA052 Program Description Source File: TIMER.C (continued) void ResetTickCount( void This function resets timer tick variable zero. function should used before each time timer used time event prevent incorrect operation timer0_tick variable rolling over zero. This will work maximum 2ms, seconds. void ResetTickCount( void timer0_tick unsigned current_tick (void); This function returns current timer0 tick count. unsigned current_tick (void) unsigned xdata timer0_tick; return (t); TVP5020 NTSC/PAL Video Decoder Program Description Source File: TIMER.C (continued) unsigned timer0_elapsed_count (unsigned count); This function returns number timer ticks that have elapsed since specified count. unsigned timer0_elapsed_count( unsigned start_tick return(current_tick() start_tick); void timer0_wait unsigned count This function waits 'count' timer ticks pass. void timer0_wait( unsigned num_tick unsigned xdata test1; unsigned xdata start_count; start_count current_tick while( test1 timer0_elapsed_count( start_count num_tick) COMPILATION COMPLETE. WARNING(S), ERROR(S) SLAA052 Program Description 4.10 Source Code Module: I2C5020 This module contains TVP5020-specific routines. 4.10.1 Function: DecodeReset() (Lines 14-18) This function does nothing returns. included compatibility with code other interfaces. 4.10.2 Function: HandleDownload() (Lines 20-24) This function called download microcode TVP5020 program memory. parameters passed this function. parameter nCount number data bytes write (plus subaddress byte). parameter pInBuf pointer data written. first byte data must subaddress microcode downloads (7Eh). case, this function simply passes parameters function WriteTVP5020(). 4.10.3 Function: WriteTVP5020() (Lines 26-38) This function called write TVP5020 register. parameters passed this function. parameter nData number data bytes write (plus subaddress byte). parameter pInBuf pointer data written. first byte data must subaddress. case, except microcode downloads, function only write register. this case, nData parameter function `start_i2c()' called perform data transfer. TVP5020 device writes passed parameter. number bytes actually written (including subaddress byte) returned. 4.10.4 Function: ReadSwitch() (Lines 40-65) This function TVP56000EVM-specific. reads logic levels switches through defined pins P80C652. result packed into 8-bit return value. 4.10.5 Function: ReadTVP5020() (Lines 67-89) This function called read from TVP5020 register. function used this program, included here reference. Three parameters passed this function. parameter `nLength' number data bytes read. parameter `pBuf' pointer caller's buffer where read data stored. parameter `nSubAddr' subaddress read from. case, except microcode uploads, only register read. this case, nData parameter function `start_i2c()' called first, with TVP5020 device writes, write subaddress value. Then, `start_i2c()' called again, with TVP5020 device reads, read requested number data bytes. TVP5020 NTSC/PAL Video Decoder Program Description 4.11 Header File: I2C5020.H I2C5020.H Header file TVP5020 #define FALSE #define TRUE !FALSE #define #define #define #define TVP5020_WRITE_DEVICE_ID TVP5020_READ_DEVICE_ID TVP5020_LOAD_SUB_ADDR BOARD_TVP56000EVM 0xB8 0xB9 0x7E void void unsigned unsigned char DecoderReset( void HandleDownload( unsigned nCount, unsigned char* pInBuf WriteTVP5020(int nLength, unsigned char *pBuf ReadSwitch( void SLAA052 Program Description 4.12 Source File: I2C5020.C COMPILER V5.10, COMPILATION MODULE I2C5020 OBJECT MODULE PLACED I2C5020.OBJ COMPILER INVOKED C:\C51\BIN\C51.EXE I2C5020.C LARGE stmt level source I2C5020.C Routines TVP5020 using #include "I2C.h" #include "I2C5020.h" #include "Reg652.h" Identify board unsigned char g_nBoardID BOARD_TVP56000EVM; Dummy function called from main() needed void DecoderReset( void return; void HandleDownload( unsigned nCount, unsigned char* pInBuf WriteTVP5020( nCount, pInBuf return; unsigned WriteTVP5020(int nData, unsigned char *pBuf unsigned nRtn Initialize initia_i2c(); Perform transaction return actual number bytes sent nRtn nData, pBuf); return( nRtn TVP5020 NTSC/PAL Video Decoder Program Description 4.12 Source File: I2C5020.C (continued) unsigned char ReadSwitch( void unsigned char nVal REG652.H SW1.SW3 definitions //MSB //LSB nVal nVal nVal return( nVal Note: This read TVP5020 register #if(0) unsigned ReadTVP5020(int nLength, unsigned char *pBuf, unsigned char nSubAddr nLength data bytes read pBuf Pointer where first byte read should stored nSubAddr subaddress read unsigned char* pSubAddr &nSubAddr; Initialize initia_i2c(); Write subaddress start_i2c( TVP5020_WRITE_DEVICE_ID, pSubAddr); Read data nLength, pBuf); return( #endif COMPILATION COMPLETE. WARNING(S), ERROR(S) SLAA052 Program Description 4.13 Source Code Module: I2C6000 This module contains TVP6000-specific routines initialization data TVP6000. 4.13.1 Function: read_tvp6000() (Lines 23-40) This function called read from TVP6000 register. function used this program, included here reference. parameter read_length number data bytes read. parameter sub_addrs subaddress read from. parameter output_buf pointer caller's buffer where data read stored. TVP6000, there restriction number bytes read transaction. function start_i2c() called first, with TVP6000 device writes, write subaddress value. Then, start_i2c() called again, with TVP6000 device reads, read requested number data bytes. 4.13.2 Function: write_tvp6000() (Lines 41-50) This function called write TVP6000 register. parameters passed this function. parameter write_length number data bytes write (plus subaddress byte). parameter input_buf pointer data written. first byte data must subaddress. TVP6000, there restriction number bytes written transaction. function start_i2c() called perform data transfer. TVP6000 device writes passed parameter. 4.13.3 Function: LoadTVP6000() (Lines 52-75) This function initializes TVP6000 registers. parameter nMode indicates video mode setup. register data selected video mode written TVP6000 passing array name proper register data write_tvp6000(). Finally, function PatchTVP6000() called. 4.13.4 Function: PatchTVP6000() (Lines 77-97) This function performs initialization step that necessary properly initialize interface. format momentarily changed 16-bit 4:2:2 mode, then back 8-bit ITU-R BT.656 interface mode. global variable g_nBoard tested determine value write into subaddress 3Ah: video port video port This inserted only make same code work prototype board that uses instead VP2. Normally, this statement should deleted. TVP5020 NTSC/PAL Video Decoder Program Description 4.14 Header File: I2C6000.H I2C6000.H Header file TVP6000 routines #define ENCODER_WRITE 0x42 writing address encoder #define ENCODER_READ 0x43 reading address encoder #define NUM_OF_REGISTER 0x65 TVP6000 registers load #define BOARD_TVP56000EVM #define BOARD_EVM3 #if(0) void read_tvp6000(int length_of_read, unsigned char first_subaddress, unsigned char* readout_buffer); #endif void write_tvp6000(int length_of_write, unsigned char *write_buf); void LoadTVP6000( nMode void PatchTVP6000( void SLAA052 Program Description 4.15 Source File: I2C6000.C COMPILER V5.10, COMPILATION MODULE I2C6000 OBJECT MODULE PLACED I2C6000.OBJ COMPILER INVOKED C:\C51\BIN\C51.EXE I2C6000.C LARGE stmt level source I2C6000.C Routines TVP6000 using #include "I2C.h" #include "I2C6000.h" #include "timer.h" #include "DATA6000.h" extern unsigned char g_nBoardID; static unsigned char patch1_6000[2] 0x3A, 0x0D //16-bit 4:2:2, color static unsigned char patch2_6000[2] 0x3A, 0x0F CCIR 656, #if(0) void read_tvp6000(int read_length, unsigned char sub_addrs, unsigned char *output_buf) unsigned char *sub_begin; sub_begin &sub_addrs; initia_i2c(); initialize this will write first subaddress TVP6000 after this, data will read start from this address start_i2c(ENCODER_WRITE, sub_begin); read registers TVP6000, them into temporary buffer start_i2c(ENCODER_READ, read_length, output_buf); return; #endif TVP5020 NTSC/PAL Video Decoder Program Description 4.15 Source File: I2C6000.C (continued) void write_tvp6000(int write_length, unsigned char *input_buf) initia_i2c(); initialize This will write first subaddress TVP6000 after this, data will read starting from this address subaddress will element input_buf start_i2c(ENCODER_WRITE, write_length, input_buf); return; void LoadTVP6000( nMode switch( nMode case write_tvp6000(NUM_OF_REGISTER, T600N601); break; case write_tvp6000(NUM_OF_REGISTER, T600NSQP); break; case write_tvp6000(NUM_OF_REGISTER, T600P601); break; case write_tvp6000(NUM_OF_REGISTER, T600PSQP); break; PatchTVP6000(); return; void PatchTVP6000( void unsigned nStartPoint write_tvp6000( patch1_6000 Delay 100ms nStartPoint current_tick while( timer0_elapsed_count( nStartPoint ONE_HUNDRED_MS g_nBoardID BOARD_TVP56000EVM video port TVP56000EVM patch2_6000[1] 0x1F; write_tvp6000( patch2_6000 return; WARNING(S), ERROR(S) COMPILATION COMPLETE. SLAA052 Program Description 4.16 TVP6000 Initialization Data NTSC with CCIR601 Sampling DATA6000.H Header file containing TVP6000 register initialization data. unsigned char code T600N601[] Register Name subaddress 0x3A, subaddress 0x0F, F_CONTROL RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 3B-3F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40-47 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48-4F 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50-57 0x00, 0x00, 58-59 0x00, C_PHASE 0x0E, GAIN_U 0x7D, GAIN_V 0xCE, BLACK_LEVEL 0xB8, BLANK_LEVEL 0x31, GAIN_Y 0x20, X_COLOR 0x0D, M_CONTROL 0x3A, BSTAMP 0x1F, S_CARR1 0x7C, S_CARR2 0xF0, S_CARR3 0x21, S_CARR4 0x00, LINE21_O0 0x00, LINE21_O1 0x00, LINE21_E0 0x00, LINE21_E1 0x12, LN_SEL 0x00, SYN_CTRL0 0x40, RCML21 0xF2, HTRIGGER0 0x00, HTRIGGER1 0xC0, VTRIGGER 0x89, BMRQ 0x39, EMRQ 0x61, BEMRQ 0x08, X2PH 0x90, X1PH 0x00, RESERVED 0xEA, BRCV 0x8A, ERCV 0x60, BERCV 0x0C, FLEN 0x06, 0x06, 0x22, FLAL 0x0E, SYN_CTRL1 RESERVED 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 80-87 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 88-8F Scaling Processor Registers 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 90-97 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 98-9D TVP5020 NTSC/PAL Video Decoder Program Description 4.17 TVP6000 Initialization Data NTSC with Square Pixel Sampling char code T600NSQP[] Register Name subaddress F_CONTROL RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, C_PHASE GAIN_U GAIN_V BLACK_LEVEL BLANK_LEVEL GAIN_Y X_COLOR M_CONTROL BSTAMP S_CARR1 S_CARR2 S_CARR3 S_CARR4 LINE21_O0 LINE21_O1 LINE21_E0 LINE21_E1 LN_SEL SYN_CTRL0 RCML21 HTRIGGER0 HTRIGGER1 VTRIGGER BMRQ EMRQ BEMRQ X2PH X1PH RESERVED BRCV ERCV BERCV FLEN FLAL SYN_CTRL1 RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, Scaling Processor Registers 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 unsigned 0x3A, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x7D, 0xCE, 0xB8, 0x31, 0x20, 0x0D, 0xBA, 0x55, 0x55, 0x55, 0x25, 0xA5, 0x50, 0xA5, 0x50, 0x14, 0x24, 0x40, 0xDE, 0x00, 0xDF, 0xBF, 0xBF, 0x50, 0x08, 0x90, 0x00, 0xD3, 0xD3, 0x50, 0x0C, 0x06, 0x06, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x00, subaddress 0x00, 0x00, 0x00, 0x00, 3B-3F 40-47 48-4F 50-57 58-59 80-87 88-8F 90-97 98-9D 0x00 0x00, 0x00, 0x00, SLAA052 Program Description 4.18 TVP6000 Initialization Data with CCIR601 Sampling char code T600P601[] Register Name subaddress F_CONTROL RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, C_PHASE GAIN_U GAIN_V BLACK_LEVEL BLANK_LEVEL GAIN_Y X_COLOR M_CONTROL BSTAMP S_CARR1 S_CARR2 S_CARR3 S_CARR4 LINE21_O0 LINE21_O1 LINE21_E0 LINE21_E1 LN_SEL SYN_CTRL0 RCML21 HTRIGGER0 HTRIGGER1 VTRIGGER BMRQ EMRQ BEMRQ X2PH X1PH RESERVED BRCV ERCV BERCV FLEN FLAL SYN_CTRL1 RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, Scaling Processor Registers 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 unsigned 0x3A, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x8C, 0xBC, 0xBC, 0x45, 0x20, 0x0E, 0x41, 0xCB, 0x8A, 0x09, 0x2A, 0xA2, 0x2A, 0xA2, 0x2A, 0x14, 0x00, 0x00, 0x16, 0x01, 0x80, 0x5F, 0x5F, 0x61, 0x08, 0x90, 0x00, 0x0E, 0xAE, 0x61, 0x70, 0x05, 0x35, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x00, subaddress 0x00, 0x00, 0x00, 0x00, 3B-3F 40-47 48-4F 50-57 58-59 80-87 88-8F 90-97 98-9D 0x00 0x00, 0x00, 0x00, TVP5020 NTSC/PAL Video Decoder Program Description 4.19 TVP6000 Initialization Data with Square Pixel Sampling char code T600PSQP[] Register Name subaddress F_CONTROL RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, C_PHASE GAIN_U GAIN_V BLACK_LEVEL BLANK_LEVEL GAIN_Y X_COLOR M_CONTROL BSTAMP S_CARR1 S_CARR2 S_CARR3 S_CARR4 LINE21_O0 LINE21_O1 LINE21_E0 LINE21_E1 LN_SEL SYN_CTRL0 RCML21 HTRIGGER0 HTRIGGER1 VTRIGGER BMRQ EMRQ BEMRQ X2PH X1PH RESERVED BRCV ERCV BERCV FLEN FLAL SYN_CTRL1 RESERVED 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, Scaling Processor Registers 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 subaddress 0x00, 0x00, 0x00, 0x00, 3B-3F 40-47 48-4F 50-57 58-59 80-87 88-8F unsigned 0x3A, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x8C, 0xBC, 0xBC, 0x45, 0x20, 0x0E, 0xC1, 0x0C, 0x8C, 0x79, 0x26, 0xA2, 0x2A, 0xA2, 0x2A, 0x14, 0x00, 0x00, 0x32, 0x01, 0x80, 0x5F, 0x5F, 0x61, 0x08, 0x90, 0x00, 0x28, 0x28, 0x71, 0x70, 0x05, 0x35, 0x22, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 90-97 98-9D SLAA052 Other recent searchesSeries - Series Series Datasheet PC133-compliant - PC133-compliant PC133-compliant Datasheet PC0882DG-21 - PC0882DG-21 PC0882DG-21 Datasheet DD709202AAD - DD709202AAD DD709202AAD Datasheet DS232A - DS232A DS232A Datasheet CY7C1041BN - CY7C1041BN CY7C1041BN Datasheet ANSI-13D - ANSI-13D ANSI-13D Datasheet
Privacy Policy | Disclaimer |