• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   2 Anonymous Users






Re: TC74A 無法動作
#4
版主
版主


查看用戶資訊
APP001 電路板是使用I2C Module 來連接TC74A, SCL & SDA 會自動以 open drain 的方式連接,使用時也要接pull-up resister 的。

發表於: 2006/5/5 17:24
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: TC74A 無法動作
#3
資深會員
資深會員


查看用戶資訊
這種情形我也碰過,只不過我是用來控制PT2259,
我發現在送第一個BYTE時,SDA腳是整個拉到0,
因此構成一個STOP的條件,致使後面的信號都不被理會。

請看一下您用的那支IO的內部結構,
是不是有2個二極體做保護,
換一支沒有二極體的IO來當SDA腳試試看。

發表於: 2006/5/5 15:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: TC74A 無法動作
#2
版主
版主


查看用戶資訊
有關讀取 TC74A 的溫度請參考WAP002 Advance C18 Workshop 的教材範例,可以在教育訓練下找到,注意一下I2C Slave Address 的位址,不會很難寫的。

發表於: 2006/5/4 18:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


TC74A 無法動作
#1
初級會員
初級會員


查看用戶資訊
請教各位先進,小弟在APP001板上用I2C模式讀取TC74A的溫度,但始終無法收到正確的ACK,例如startbit後送出指令10011010 (9Ah)之後, 示波器上的第9bit (ACK),理應SCL=1,SDA=0,但總是顯示SDA=1; 但是while(ACKSTAT)還是會過,之後的comand(0x00)送出後的ACK,也是SDA=0而此住while(ACKSTAT)就hang住了,請問這問題是出在哪呢?謝謝
以下的CODE和程序存取24LC32並無問題:

void I2C_Read_Temp(void) //read temp from TC74A
{
char temp=0x00;
i2c_waitForIdle();
I2C_Startbit();
i2c_waitForIdle();
I2C_SendByte(0x9A);
i2c_waitForIdle();
I2C_SendByte(0x00); //hang up here
i2c_waitForIdle();
I2C_RepStart();
i2c_waitForIdle();
I2C_SendByte(0x9B);
i2c_waitForIdle();
temp=I2C_ReadByte();
i2c_waitForIdle();
I2C_Stopbit();
i2c_waitForIdle();

}

void I2C_SendByte(char byte)
{
i2c_waitForIdle();
SSPBUF = byte;
while(ACKSTAT);
return;
}

發表於: 2006/5/4 17:51
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------