zq799879197 发表于 2013-10-20 14:00

dsp 12864串口方式 为什么显示不了

本帖最后由 zq799879197 于 2013-10-20 21:31 编辑

void main(void)
{

// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the DSP2833x_SysCtrl.c file.
   InitSysCtrl();

// Step 2. Initalize GPIO:
   Gpio_select();      

// Step 3. Clear all interrupts and initialize PIE vector table:
// Disable CPU interrupts
   DINT;

// Initialize PIE control registers to their default state.
// The default state is all PIE interrupts disabled and flags
// are cleared.
// This function is found in the DSP2833x_PieCtrl.c file.
   InitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
   IER = 0x0000;
   IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt
// Service Routines (ISR).
// This will populate the entire table, even if the interrupt
// is not used in this example.This is useful for debug purposes.
// The shell ISR routines are found in DSP2833x_DefaultIsr.c.
// This function is found in DSP2833x_PieVect.c.
   InitPieVectTable();


   delay_loop(632000); //80ms的延时 上电延时
   RST_1;
   RST_1;
   delay_loop(632000);
   LcmInit();
   LcmClearTXT();
   LcmClearBMP();

   for(;;)
   {   
      
      // lcd_set_dot(2,2);
         //显示图像
         LcmClearTXT();
       PutBMP(bmp1);
       DelayKey(20,5);
       /*
       //全屏间隔显示点
       DisplayDots(0x55);
       DelayKey(1,5);
      
       //全屏间隔显示点            
       LcmClearTXT();
       DisplayDots(0xaa);
       DelayKey(1,5);
      
            
       */
       //全屏显示文字
       LcmClearBMP();
       DelayKey(15,5);
       PutStr(0,0,str1);
       DelayKey(30,5);
      
       LcmClearTXT();
       DelayKey(15,5);
       PutStr(0,0,str2);
       DelayKey(30,5);
            //全屏间隔显示半型符号            
       LcmClearTXT();
       PutSign(0,0,sign);
       DelayKey(30,5);
//            while(1);
    }


}         

wangch_sh 发表于 2013-10-21 13:32

硬件有没有问题?时序?

zhangmangui 发表于 2013-10-21 13:58

网上好多代码你参考对比一下
你说的串口方式是指SPI?

zq799879197 发表于 2013-10-22 08:15

lvgyl 发表于 2013-12-22 13:29

你 这是模拟串口 并没有用到SPI啊

zhangmangui 发表于 2013-12-22 21:32

我也没看到配置SPI相关的代码
页: [1]
查看完整版本: dsp 12864串口方式 为什么显示不了