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


Browsing this Thread:   1 Anonymous Users






Re: 12F675使用問題
#8
版主
版主


查看用戶資訊
我在猜,Eigen 大大應該是沒用到的I/O 腳設定成輸入時沒有接地,造成 CMOS 輸入浮接所以不穩定有時就會掛掉。

發表於: 2009/8/25 15:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#7
中級會員
中級會員


查看用戶資訊
請問一下...Eigen 大大說的...這顆會掛掉是怎麼一回事??
我也是幫公司做產品...總不希望做出去的產品會掛掉一堆...
是否可以説一下為什麼這顆會掛掉???

發表於: 2009/8/24 9:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#6
資深會員
資深會員


查看用戶資訊
除比較器之外 :
     
GPIO 0x00  ;
     
NOP()  ;          試著 加入 這指令 看看 
     GPIO 
0xFF  ;

另  EIGEN   SHPENG  兩位大大 我想沒人有辦法將每顆 PIC 都玩透 所以每個人的經驗都是一大寶藏 希望大家都不吝傳授 ....

誠如 EIGEN 大大所言 ,  我知道有些人堅持用  16F87X 原因無它 ,  晶片較大 較耐干擾  ........

發表於: 2009/8/23 3:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#5
資深會員
資深會員


查看用戶資訊
和耗電流沒關係

沒用的 io 都要接 地,沒差

spec 上的耗電流都是有標測試的條件的

大多數人誰會拿他做比較器?

大都是 io 用途,所以才會對他的預設值感到疑惑

(這一顆的耗電量,我在四五年前可是深受其害,太省電,結果量產後才發現會掛掉)

發表於: 2009/8/23 2:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#4
資深會員
資深會員


查看用戶資訊
參照:

Eigen 寫道:
每個用 675/629 的人都會遇到第一次沒設定 CMCON ,導致 io 不會動。

我比較好奇 美國microchip 的工程師是以什麼樣的『思考羅輯』在設計?單純的硬體限制?還是有什麼特殊的目的?

為什麼io 的初始狀態不是 gpio 而是比較器?

能解釋一下嗎?很好奇~~


類比狀態 有雜訊時 IC耗電流較小

發表於: 2009/8/22 18:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#3
資深會員
資深會員


查看用戶資訊
每個用 675/629 的人都會遇到第一次沒設定 CMCON ,導致 io 不會動。

我比較好奇 美國microchip 的工程師是以什麼樣的『思考羅輯』在設計?單純的硬體限制?還是有什麼特殊的目的?

為什麼io 的初始狀態不是 gpio 而是比較器?

能解釋一下嗎?很好奇~~

發表於: 2009/8/22 17:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 12F675使用問題
#2
版主
版主


查看用戶資訊
CMCON<bit2-0> CM2:CM0: Comparator Mode bits 開機的初始值為 000 ,比較器的接腳動作,需設為 111 以關閉類比輸入功能。參考一下 Data Sheet -- Figure 6-2 shows the Comparator modes and CM2:CM0 bit settings

發表於: 2009/8/21 18:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


12F675使用問題
#1
中級會員
中級會員


查看用戶資訊
請教前輩, 我目前在寫PIC12F675的IC,
因為硬體一直不會動, 所以先用軟體模擬,在做測試,
程式閏始後先 initial 一些暫存器,
隨後進入 while 迴圏,
while 迴圏裡也只有改變GPIO的狀態,
但我用watch 看 GPIO的狀態是否有變,
確發現 GPIO0 和 GPIO1 怎麼設這二個IO
就是不會改變狀態, 一直維持0的狀態,
我看SPEC看的滿仔細的,能設的暫存器都設了...
實在不知道是怎麼一回事....是否可以幫我確認一下
....感謝先!!

#include <htc.h>

__CONFIG(UNPROTECT&BORDIS&MCLRDIS&PWRTDIS&WDTDIS&XT);

//Initial Function
//---------------------------------------------------------------
void Initial(void)
{
// Bank0
RP0=1; // Bank1
OPTION = 0b10000111;
TRISIO = 0b00000000;
PIE1 = 0b11000001;
OSCCAL = 0b10000000;
INTCON = 0b00000000; //disable all interrupt
ADRESL = 0x00; // clear A/D datas
ANSEL = 0b00000000; //6-4
// 000 A/D conversion clock Fosc/2
//3 ANS2 as a A/D input
WPU = 0x00;
IOCB = 0xFF;
// Bank0
RP0=0; // Bank0
}

//Interrupt Function
//---------------------------------------------------------------
void interrupt isr(void)
{

if(TMR1IF==1)
{
TMR1IF=0;
}
if(ADIF==1)
{
ADIF=0;
}
if(CMIF==1)
{
CMIF=0;
}
if(EEIF==1)
{
EEIF=0;
}
}

//Main Function
//---------------------------------------------------------------
void main(void)
{
Initial();
while(1)
{
GPIO = 0x00;
GPIO = 0xFF;

}
}

Attach file:


Link only for registered users

發表於: 2009/8/21 17:28
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... ]

教育訓練中心

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