网站公告列表

  没有公告

加入收藏
设为首页
联系本站
您现在的位置: AnalogCN安诺电子 >> 文章 >> 技术交流 >> 文章正文
  BF533 EZ-KIT Main汇编源代码           ★★★ 【字体:
BF533 EZ-KIT Main汇编源代码
作者:佚名    文章来源:Internet    点击数:    更新时间:2008-3-27    

/*****************************************************************************************/
//
// 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:    Main.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:   Be aware that all the EZ-KIT LITE switches are off! Set the
                        jumpers on the extender card as follows:
                       
             JP1: Not populated
             JP2: 1-2
             JP3: 3-5; 4-6
             JP4: 7-8
             JP5: 1-2
             JP6: 3-5; 4-6
             JP7: Not populated
             JP8: Not populated
             JP9: 3-5; 4-6
            JP10: Not populated
           
         For connection of Omnivision sensor:
         Connect the EXT-KIT "Extender Card" to the ADSP-BF533 EZ-KIT LITE
      Connect also the Omnivision camera OV6630 or simular to the dedicated
                        header.   
      
                        For connection of ADV7183B from extender card please populate:
                        Make sure that no image sensor is connected to the board!
       JP3: 19-20
       
******************************************************************************************/

#include <defBF533.h>
 
/*****************************************************************************************/
// Program Variable Section
/*****************************************************************************************/
// place data in the section L1_data_a shown in the *.ldf
.section L1_data_a;

.var Recive_DMA_In_Progress = 0;
/*****************************************************************************************/
// Program Define Section
/*****************************************************************************************/
#define Omnivion_via_extender_card
//#define ADV7183A_via_EZ-KIT
//#define ADV7183B_via_extender_card

/*****************************************************************************************/
// Global and extern subroutines
/*****************************************************************************************/
.global  _main;
.global  Recive_DMA_In_Progress;
.extern     BF533_EZ_KIT_flash_setup;
.extern  BF533_EZ_KIT_Omnivision_reset;
.extern  Enable_ADV7183;
.extern  BF533_EZ_KIT_SDRAM_Config;
.extern  BF533_EZ_KIT_ISR_Config;
.extern  BF533_EZ_KIT_PPI_Input_Config;
.extern  BF533_EZ_KIT_DMA_Receive_Config;
.extern     Config_of_Omnivision;
.extern  Config_of_ADV7183;
.extern  Read_of_ADV7183_Config;
.extern  SCCB_In_Progress;
.extern  SCCB_Interface;
.extern  SCCB_DataOut;
/*****************************************************************************************/
// Main Program
/*****************************************************************************************/
// place code in the section L1_code shown in the *.ldf
.section L1_code;
_main:

 //some settings must be done to link the signals over the EZ-KIT to the EZ-Extender
    CALL BF533_EZ_KIT_flash_setup;   //setup the flashs GPIO pins
   
#ifdef ADV7183A_via_EZ-KIT
    CALL Enable_ADV7183;     // Enables the decoder output (OE) on the EZ-KIT
 CALL Config_of_ADV7183;     // Setup for all the SCCB registers
#endif

#ifdef ADV7183B_via_extender_card
 CALL Config_of_ADV7183;     // Setup for all the SCCB registers
#endif
 
#ifdef Omnivion_via_extender_card
 // Please be aware that the omnivision sensor cannot be read
 // via I2C because the senor is not 100% I2C compliant
 CALL Config_of_Omnivision;    // Setup for all the SCCB registers
#endif

 CALL SCCB_Interface;     // Start SCCB Communication

// Wait while the I2C com is in progress  
I2C_LOOP1:
 NOP;
  
 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 = [p0];  
    cc = r0 == 1;
if cc jump I2C_LOOP1;


#ifdef ADV7183A_via_EZ-KIT
    CALL Enable_ADV7183;     // Enable the decoder output (OE)
 CALL Read_of_ADV7183_Config;   // Setup for all the SCCB registers
 CALL SCCB_Interface;     // Start SCCB Communication
#endif 

#ifdef ADV7183B_via_extender_card
 CALL Read_of_ADV7183_Config;   // Setup for all the SCCB registers
 CALL SCCB_Interface;     // Start SCCB Communication
#endif 


// Wait while the I2C com is in progress  
I2C_LOOP2:
 NOP;
  
 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 = [p0];  
    cc = r0 == 1;
if cc jump I2C_LOOP2;

 p0.l = SCCB_DataOut;
 p0.h = SCCB_DataOut;
 r0 = [p0];

 CALL BF533_EZ_KIT_ISR_Config;   // Configure the Interrupt service routine for DMA interrupt
 
  // The SDRAM Config Routine can just be taken if the option "Use XML Values"
  // at Settings/Target Options is de-tagged.
//  CALL BF533_EZ_KIT_SDRAM_Config; 


 // The SDRAM will be filled with zeros for test purposes.   
 p2.h=0x27;
 p2.l = 0xDF92;
 p1 = 0;
 R1 = 0;
 LSETUP(SDRAM_Fill_Zero_Start, SDRAM_Fill_Zero_End) LC0 = P2;
SDRAM_Fill_Zero_Start:
SDRAM_Fill_Zero_End:  [p1++] = R1;


 
   //Configure DMA.
  CALL BF533_EZ_KIT_DMA_Receive_Config;
 
    //Configure and start the PPI finally
  CALL BF533_EZ_KIT_PPI_Input_Config; 

     

 idle;

END_TEST:
  NOP;
 NOP;
 JUMP END_TEST;

 

 

_main.END:     

//本代码Blackfin示例

文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    前置放大器在移动医疗服务系
    便携式多通道大容量生理信号
    防腐监测仪的设计与应用
    基于AD1674的酶标仪的设计
    基于C/S模式的JRTPLIB库的测
    ffmpeg与jrtplib相结合应用
    blackfin模拟摄像头驱动中的
    可编程逻辑在数字信号处理系
    发现VDSP4.5一个BUG:单步调
    VDSP5.0双核工程下sml3中的变
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    版权所有:AnalogCN安诺电子 湘ICP备06016315号