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

📄 init_timers.c

📁 Using the ADSP-BF561 Blackfin Processor as a TFT-LCD Controller
💻 C
字号:
/*****************************************************************************
**																			**
**	 Project Name: 	LCD											**	
**																			**
******************************************************************************

(C) Copyright 2005 - Analog Devices, Inc.  All rights reserved.

File Name:		Init_Timers.c

Date Modified:	5/1/05		CL		Rev 1.0

Software:       VisualDSP++3.5

Hardware:		ADSP-BF561 EZ-KIT Lite

Special Connections:  None

Purpose:		This file initializes the timers.  Several of the general
			purpose timers are used in PWM_OUT mode to generate the 
			required timing waveforms that the LCD ordinarily requires
			from an external timing ASIC.  Because of the abundance of
			general purpose timers on the ADSP-BF561 Blackfin Processors,
			the timing ASIC was eliminated.
				
******************************************************************************/



#include "main.h"

void Init_Timers(){		
	
	
	*pTIMER10_PERIOD = 280;
	*pTIMER10_WIDTH = 1;
	*pTIMER10_CONFIG = 0x02AD;
	
	//Timer 9 used as LP
	//PPI_CLK:  Period = 246, Width = 1
	*pTIMER9_PERIOD = 6720;
	*pTIMER9_WIDTH = 24;
	*pTIMER9_CONFIG = 0x020d;
	
	*pTIMER8_PERIOD = 24;
	*pTIMER8_WIDTH = 12;
	*pTIMER8_CONFIG = 0x020d;
	
	//Timer 1 used as CLS
	*pTIMER1_PERIOD = 6720;
	*pTIMER1_WIDTH = 5832;
	*pTIMER1_CONFIG = 0x020D;
	
	//Timer 2 used as PS
	*pTIMER7_PERIOD = 6720;
	*pTIMER7_WIDTH = 5832;
	*pTIMER7_CONFIG = 0x0209;
	
	//Timer 6 used as SPS
	*pTIMER6_PERIOD = 2210880;
	*pTIMER6_WIDTH = 13440;
	*pTIMER6_CONFIG = 0x0209;

		
		
	ssync();
}

⌨️ 快捷键说明

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