<var id="fnfpo"><source id="fnfpo"></source></var>
<rp id="fnfpo"></rp>

<em id="fnfpo"><object id="fnfpo"><input id="fnfpo"></input></object></em>
<em id="fnfpo"><acronym id="fnfpo"></acronym></em>
  • <th id="fnfpo"><track id="fnfpo"></track></th>
  • <progress id="fnfpo"><track id="fnfpo"></track></progress>
  • <tbody id="fnfpo"><pre id="fnfpo"></pre></tbody>

  • x
    x
    查看: 32785|回復: 3
    打印 上一主題 下一主題

    [提問] ads1258接收過來的數據跑亂了

    [復制鏈接]
    跳轉到指定樓層
    樓主
    發表于 2010-12-11 17:25:43 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
    關鍵詞: 數據
    哪位高手大俠指導指導啊 從ads1258讀過來的數據跑亂,不正常,是不是設置錯了。用DRDY做外部中斷觸發寫的程序如下: 初始化void ads1258_init(void)
    {
       
    cs = 1;  
    cs = 0;
    spi_send_byte(0xc0);  //reset command
    START = 0;
                
    spi_send_byte(0x70);   //write registers/MUL=1¡£
    spi_send_byte(0x06);   //wait for 4096fclk then SPI reset/chopping = 1 /enable status
    spi_send_byte(0x33);   //standby mode/delay us/data rate
    spi_send_byte(0x00);
    spi_send_byte(0x00);    spi_send_byte(0x5a);   //single input 1.3.4.6
    spi_send_byte(0x55);   //single input 8.10.12.14
    spi_send_byte(0x00);
    spi_send_byte(0xff);
    spi_send_byte(0x00);
    spi_send_byte(0x8b);
        START = 1;
    } DRDY低電平觸發中斷到接收數據服務程序void int1_isr(void) interrupt 2
    {
    unsigned char status;
               
    spi_send_byte(0x30);  //register form
             
      status = spi_send_byte(0xee) ;       XBYTE[write_pointer++] = spi_send_byte(0xee);   XBYTE[write_pointer++] = spi_send_byte(0xee);   XBYTE[write_pointer++] = spi_send_byte(0xee);                       
    } 程序運行起來后,通道數據和狀態字節會混淆跑亂
    沙發
    發表于 2011-3-17 22:17:58 | 只看該作者
    下降沿觸發試一下
    板凳
    發表于 2012-9-26 15:24:12 | 只看該作者
    地板
    發表于 2013-4-8 13:30:13 | 只看該作者
    同步信號有問題?
    您需要登錄后才可以回帖 登錄 | 立即注冊

    本版積分規則

    關于我們  -  服務條款  -  使用指南  -  站點地圖  -  友情鏈接  -  聯系我們
    電子工程網 © 版權所有   京ICP備16069177號 | 京公網安備11010502021702
    快速回復 返回頂部 返回列表
    精品一区二区三区自拍图片区_国产成人亚洲精品_亚洲Va欧美va国产综合888_久久亚洲国产精品五月天婷