网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 61IC中国电子在线 >> DSP >> 代码示例 >> ADI DSP代码示例 >> Blackfin >> 文章正文
  BF533 EZ-KIT Omnivision Config汇编源代码         ★★★ 【字体:
BF533 EZ-KIT Omnivision Config汇编源代码
作者:61IC    文章来源:本站原创    点击数:    更新时间:2007-1-22    

/******************************************************************************/
//
// Name: BF533 EZ-KIT video ITU-656 receive mode (8bit) for the Omnivision chip OV6630
//
/*****************************************************************************************************************

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

File Name:    BF533_EZ-KIT_Omnivision_Config.asm

Date Modified:   08/12/05  TL  Rev 1.0

Software:         VisualDSP++4.0, Assembler 2.6.7.5, Linker 3.5.2.2

Hardware:    BF533 EZ-KIT Board (rev 1.7), Blackfin EZ-Extender (rev 1.2)

Chip:     ADSP-BF533 REV 0.4

Special Connections:   None

Purpose:    To configure the Omnivision devices via I2C
    
    
Program Parameters:

************************************************************************************************/

#include <defBF533.h>
     

/*****************************************************************************************/
// Global and extern subroutines
/*****************************************************************************************/
.global  Config_of_Omnivision;
.extern  SCCB_Control;
.extern  SCCB_Word_Count;
.extern  SCCB_DataIn;    
.extern  SCCB_DataOut;    
.extern     SCCB_Interface;
.extern     SCCB_Read_Count;
.extern  SCCB_In_Progress;

/****************************************************************/
// Program Define Section
/****************************************************************/

#define rd_cmd    0x1    // sccb interface read command
#define wr_cmd    0x2    // sccb inteface write command
#define Omnivision_WR  0xC0   // Device address to write to the chip
#define Omnivision_RD  0xC1   // Device address to read from the chip
#define dummy_addr   0x14   // dummy read to check the ACK
#define Omni_COMB   0x13   // Register address to change output format
#define Omni_8bit_Mode  0x21
#define Omni_8bit_Mode_ITU 0x31
#define Omni_16bit_Mode_ITU 0x11
#define Omni_16bit_Mode  0x01
#define dummy    0x0       


/*************** SCCB Start Settings**************************************/
/*Before Calling the SCCB_Interface the inputs to the SCCB_Taskmanager   */
/*must be done.                */
/* Write to the "SCCB_Control" a "1" for reading from the Device or   */
/* a "2" for writing to the Device.           */
/*                   */
/* Leave the number of bytes totaly in "SCCB_Wordcount". Device Addresses*/
/* and Word Addresses included.            */
/*                   */
/* Write all data to the "SCCB_DataIn".          */
/* e.g.Writing to the device:            */
/*                   */
/*   SCCB_DataIn    Device Address (LSB must be Zero)  */
/*         Word Address       */
/*         Data 1         */
/*           .          */
/*           .          */
/*************************************************************************/
/* (e.g.Reading from the device:           */
/*   SCCB_DataIn    Device Address (LSB must be zero)   */
/*         Word Address       */
/*         Device Address (LSB must be one)  */
/*         Data can be read via SCCB_DataOut  */
/*************************************************************************/
/* See below !!!!!!              */
/*************************************************************************/

/*****************************************************************************************/
// Program
/*****************************************************************************************/
.section L1_code;

// configure the Omnivision device via I2C
Config_of_Omnivision:

 p0.l = SCCB_DataIn;
 p0.h = SCCB_DataIn;
 r0 = Omnivision_WR (z);   //Device select
 [p0++] = r0;
 r0 = Omni_COMB (z);    //Device Subregister select
 [p0++] = r0;
 r0 = Omni_8bit_Mode_ITU (z);    //Data to transfer in the register
 [p0++] = r0;
 
 p0.l = SCCB_Word_Count;
 p0.h = SCCB_Word_Count;
 r0 = 3 (z);               // Number of transfers in total
 [p0] = r0;
 
 p0.l = SCCB_Control;
 p0.h = SCCB_Control;
 r0 = wr_cmd (z);          //controls whether to read or to write
 [p0] = r0;
 
 p0.h = SCCB_In_Progress;       //takes care that the next transfer will not start
 p0.l = SCCB_In_Progress;       //before the last one ends
 r0 = 1;
 [p0] = r0;
 
Config_of_Omnivision.END:

RTS;
/************************************************************************************/

               欢迎点击进入:TI德州中文网   (国内唯一针对TI应用的中文技术网站)    文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    BF533与PowerPC SPI通信调试…
    BF533 EZ-KIT Main汇编源代码
    BF533 EZ-KIT SDRAM Config汇…
    BF533 EZ-KIT PPI Config汇编…
    BF533 EZ-KIT ISR Config汇编…
    BF533 EZ-KIT ISR汇编源代码
    BF533 EZ-KIT Fash setup汇编…
    BF533 EZ-KIT DMA Config汇编…
    BF533 EZ-KIT video GP rece…
    BF533 EZ-KIT video ITU-656…
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    站长:61IC 湘ICP备05002478号