Re: 12F508 的 TOCS 定義問題請教各位前輩
|
||||
---|---|---|---|---|
新會員
|
感謝 "寫上癮了" 及 "版主" 的回覆
原廠資料已看過, 但是我還是不能理解為何我現在使用開機預設值為 "1" 為何能正常輸入及輸出? 謝謝!
發表於: 2007/12/27 18:00
|
|||
|
Re: 12F508 的 TOCS 定義問題請教各位前輩
|
||||
---|---|---|---|---|
版主
|
注意看一下 PIC12F508 的 Data Sheet 第22頁有關 Option_Register 的說明。
T0CS 位元開機後的內定值為 "1" 如果要設為 GP2 的劃一定要將 T0CS 位元清除為 "0"
發表於: 2007/12/27 11:08
|
|||
|
12F508 的 TOCS 定義問題請教各位前輩
|
||||
---|---|---|---|---|
新會員
|
關於12F508 OPTION 中的 TOCS 定義問題請教各位前輩
在 12F508 的程式中我只作單純開關控制 LED 燈光亮和熄 且在程式中只寫了 TRIS 定義 GP2 接腳為輸入, GP0, GP1 腳位為輸出, 我沒有使用 TMR0 功能, 測試結果功能正常. 但是在原廠資料中發現 GP2 作 I/O 用途時必須先定義 OPTION 的 TOCS 為 0 才能作 I/O 用途, 請問必要這樣麼 若不定義的話會產生什麼後果呢... 謝謝!
發表於: 2007/12/27 5:36
|
|||
|