⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcb_ptx23a21.h

📁 车载 液晶显示器的主控程序(主要使用芯片为 MYSON MTV512 单片机、RealTek 2323 Scare 芯片、TVP5147(视频解码)。配Sharp 8寸液晶显示器 )。
💻 H
字号:
//----------------------------------------------------------------------------------------------------
// PCB NAME		: PTX23A21.pcb
// DESIGNED BY	: Premier
//----------------------------------------------------------------------------------------------------
#if(_PCB_TYPE == _PCB_PTX23A21)

//--------------------------------------------------
// Definitions for GPIO Control
//--------------------------------------------------
#define _PANEL_ON                   0   // Power on  state for LCD panel 
#define _PANEL_OFF                  1   // Power off state for LCD panel

#define _LIGHT_ON                   0	// 1   // Power on  state for backlight inverter
#define _LIGHT_OFF                 1	// 0   // Power off state for backlight inverter

#define _VDC_ON                     0   // Power on  state for video decoder
#define _VDC_OFF                    1   // Power off state for video decoder

#define _LVDS_ON                    0   // Power on  state for LVDS Tx
#define _LVDS_OFF                   1   // Power off state for LVDS Tx

#define _LED_ON                    	0   // Power on  state for LED
#define _LED_OFF                   	1   // Power off state for LED

//--------------------------------------------------
// RTD2323 Internal Regulator Active
//   __FALSE: use external 3.3v-->1.8v regulator
//   __TRUE : use internal 3.3v-->1.8v regulator
//--------------------------------------------------
#define _INTERNAL_REGULATOR			_FALSE


//--------------------------------------------------
// RTD2323 Pin Share
//--------------------------------------------------

//*******************6bit TCON*************************//
//for TCON Pin Define
#if 0
#define _PIN_3                      (0 & 0x03)  // 0 ~ 3		// to power 3.3v
#define _PIN_4                      (0 & 0x03)  // 0 ~ 3		// to power 3.3v
#define _PIN_48                     (0 & 0x03)  // 0 ~ 3		//tcon 0
#define _PIN_49                     (3 & 0x03)  // 0 ~ 3		//tcon 1

#define _PIN_50_51                  (1 & 0x01)  // 0 ~ 1	//tcon 4,tcon 9
#define _PIN_52_53                  (0 & 0x01)  // 0 ~ 1	//tcon 13,tcon 7
#define _PIN_54                     (0 & 0x03)  // 0 ~ 3		//tcon 11
#define _PIN_55_56_57               (0 & 0x01)  // 0 ~ 1	//tcon 0,tcon 12,tcon 3
#define _PIN_122_FUNC               (0 & 0x01)  // 0 ~ 1	// NC pin
#define _PIN_110                    (0 & 0x01)  // 0 ~ 1		//NC pin

#define _PIN_111                    (3 & 0x03)  // 0 ~ 3		//tcon 2
#define _PIN_112_113_114            (0 & 0x03)  // 0 ~ 3	//tcon 10,tcon 8,tcon 5
#define _PIN_115_118_119            (0 & 0x01)  // 0 ~ 1	//SDIO3,SCSB,SCLK
#define _PIN_120_121                (1 & 0x03)  // 0 ~ 3		//NC pin
#define _PIN_122                    (0 & 0x01)  // 0 ~ 1			//NC pin
#endif
//*******************6Bit TCON*************************//

//*******************8Bit TTL*************************//
//for TTL Pin Define
#if 1
#define _PIN_3                      (0 & 0x03)  // 0 ~ 3		// to power 3.3v
#define _PIN_4                      (0 & 0x03)  // 0 ~ 3		// to power 3.3v
#define _PIN_48                     (2 & 0x03)  // 0 ~ 3		//tcon 0
#define _PIN_49                     (2 & 0x03)  // 0 ~ 3		//tcon 1

#define _PIN_50_51                  (0 & 0x01)  // 0 ~ 1	//tcon 4,tcon 9
#define _PIN_52_53                  (1 & 0x01)  // 0 ~ 1	//tcon 13,tcon 7
#define _PIN_54                     (2 & 0x03)  // 0 ~ 3		//tcon 11
#define _PIN_55_56_57               (1 & 0x01)  // 0 ~ 1	//tcon 0,tcon 12,tcon 3
#define _PIN_122_FUNC               (0 & 0x01)  // 0 ~ 1	// NC pin
#define _PIN_110                    (0 & 0x01)  // 0 ~ 1		//NC pin

#define _PIN_111                    (1 & 0x03)  // 0 ~ 3		//tcon 2
#define _PIN_112_113_114            (1 & 0x03)  // 0 ~ 3	//tcon 10,tcon 8,tcon 5
#define _PIN_115_118_119            (0 & 0x01)  // 0 ~ 1	//SDIO3,SCSB,SCLK
#define _PIN_120_121                (0 & 0x03)  // 0 ~ 3		//NC pin
#define _PIN_122                    (0 & 0x01)  // 0 ~ 1			//NC pin
#endif
//*******************8Bit TTL*************************//

/********************************************************/
//for RSDS and LVDS Pin Define
#if 0
#define _PIN_3                      (0 & 0x03)  // 0 ~ 3
#define _PIN_4                      (0 & 0x03)  // 0 ~ 3
#define _PIN_48                     (3 & 0x03)  // 0 ~ 3		2: DHS; 3: TCON0
#define _PIN_49                     (3 & 0x03)  // 0 ~ 3		2: DVS; 3: TCON1

#define _PIN_50_51                  (1 & 0x01)  // 0 ~ 1
#define _PIN_52_53                  (0 & 0x01)  // 0 ~ 1
#define _PIN_54                     (0 & 0x03)  // 0 ~ 3		TTL Output should be 2
#define _PIN_55_56_57               (0 & 0x01)  // 0 ~ 1		TTL Output should be 1
#define _PIN_122_FUNC               (0 & 0x01)  // 0 ~ 1
#define _PIN_110                    (1 & 0x01)  // 0 ~ 1

#define _PIN_111                    (1 & 0x03)  // 0 ~ 3
#define _PIN_112_113_114            (1 & 0x03)  // 0 ~ 3
#define _PIN_115_118_119            (0 & 0x01)  // 0 ~ 1
#define _PIN_120_121                (2 & 0x03)  // 0 ~ 3
#define _PIN_122                    (0 & 0x01)  // 0 ~ 1
#endif
/*******************************************************/

#if(_MCU_TYPE == _MYSON_MTV512)

//--------------------------------------------------
// MCU Pin Assignment
//--------------------------------------------------
sbit bI2CSCL                        = P1^0;
sbit bI2CSDA                        = P1^1;
sbit bSCALERSCLK                    = P1^6;
sbit bSCALERSCSB                    = P1^5;
sbit bSCALERSDIO3                   = P1^4;

#if(_HOST_INTERFACE == _PARALLEL_PORT)
sbit bSCALERSDIO2                   = P1^3;						// no use parallel mode
sbit bSCALERSDIO1                   = P1^4;
sbit bSCALERSDIO0                   = P1^5;
#endif

sbit bSCALERRESET                   = P1^7;
sbit bLIGHTPOWER                    = P3^4;
sbit bPANELPOWER                    = P1^3;
#if(_POWER12VUSE == _ON)				// evan 050512
sbit bPANELPOWER12V					= P1^2;
#endif

sbit bIR_GPIO						= P3^2;

#if(_VIDEO_SUPPORT == _ON)		//define for Video. Add by zhang_dc
#define bVIDEORESET			MCU_PORT6_F38[7]			//Video reset pin, low active.
#define bVIDEOPOWER		MCU_PORT6_F38[5]
#endif

#define bLEDGREEN					MCU_PORT7_F76[1]
#define bLEDRED                     MCU_PORT6_F38[4]

#define bDVICONNECT                 (MCU_PORT6_F38[2] & 0x01)
#define bVGACONNECT                 (MCU_PORT6_F38[1] & 0x01)

#define BL_BRIGHT_PORT				MCU_DAC_F20[2]
#define VOLUME_PORT					MCU_DAC_F20[1]

#define ADCHANNEL0		0x81
#define ADCHANNEL1		0x82
#define ADCHANNEL2		0x84
#define ADCHANNEL3		0x88

#endif  // End of #if(_MCU_TYPE == _MYSON_MTV512)

#endif  // End of #if(_PCB_TYPE == _PCB_PTX23A21)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -