• slider image 514
  • slider image 516
  • slider image 517
  • slider image 518
  • slider image 519
:::


Browsing this Thread:   3 Anonymous Users






Re: 請教12F629使用內部4M震盪時,的問題
#9
資深會員
資深會員


查看用戶資訊
PS:
先 READ   MCU  一次 確認調校指令還在

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


Re: 請教12F629使用內部4M震盪時,的問題
#8
中級會員
中級會員


查看用戶資訊
了解了 感謝各位的指導

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


Re: 請教12F629使用內部4M震盪時,的問題
#7
資深會員
資深會員


查看用戶資訊
參照:

Eigen 寫道:
當你的 pic 的校正值不見之後,
你每次 call 0x3ff這個位置是不會return ,而會回到 0x00

也就是你做 校正的動作,結果對個程式一直在 3ff 0x000

這裏跑來跑去

重點:

看組合語言言最準


解說的好 , 受教了.........

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


Re: 請教12F629使用內部4M震盪時,的問題
#6
資深會員
資深會員


查看用戶資訊
當你的 pic 的校正值不見之後,
你每次 call 0x3ff這個位置是不會return ,而會回到 0x00

也就是你做 校正的動作,結果對個程式一直在 3ff 0x000

這裏跑來跑去

重點:

看組合語言言最準

發表於: 2009/8/7 4:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教12F629使用內部4M震盪時,的問題
#5
資深會員
資深會員


查看用戶資訊
我只會寫 組語 

DEBUGER 用 MPLAB  SIM  
,   VIEW --> PROGRAM MENORY 看 COMPILE 後的 組語 比較能確定程式的正確性

   祝 好運
....

發表於: 2009/8/6 0:27
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教12F629使用內部4M震盪時,的問題
#4
中級會員
中級會員


查看用戶資訊
感謝兩問前輩的指導

我的程式很簡單,程式如下
(配置伊和配置2只差在,配置2將
"OSCCAL = _READ_OSCCAL_DATA();" 做註解)
#include "pic.h"

void delay(int time)
{
int i;
for(;time>0;time--)
{
for(i=3000;i>0;i--)
;
}
}
void main(void)
{
// OSCCAL = _READ_OSCCAL_DATA();
TRISIO=0X00;//設為輸出
while(1)
{
GPIO = 0x01;
delay(20);
GPIO = 0x02;
delay(20);
GPIO = 0x04;
delay(20);
GPIO = 0x10;
delay(20);
GPIO = 0x20;
delay(20);
}
}

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


Re: 請教12F629使用內部4M震盪時,的問題
#3
資深會員
資深會員


查看用戶資訊
有無調整 OSCCAL 與內部振盪有無起振並無關連與外部 RESET 也無關係

所謂 _READ_OSCCAL_DATA
() 在組語應該就是  CALL 0X3FF 而傳回值(W) , 就是 OSCCAL 的校正值(於出廠時 寫入 RETLW (校正值),
而 校正值 只與頻率準確度有關
 
  
有可能是 PROGRAM 錯亂 而不曉得跑到那裡 而從外觀無從得知程式是否在執行,而以為是沒起振......  , 再檢查一下第一個程式吧 !

發表於: 2009/7/31 1:30

Edited by Beee on 2009年07月31日 01:56:58
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教12F629使用內部4M震盪時,的問題
#2
資深會員
資深會員


查看用戶資訊
由你的 1 2

可以得到 振盪器的校正值已經不見了

發表於: 2009/7/31 0:20
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教12F629使用內部4M震盪時,的問題
#1
中級會員
中級會員


查看用戶資訊
我配置如下(1)
1.使用12F629內部4M震盪(GP4=I/O)
2.MCLRE設為1(外部RESET)
3.程式在MAIN(使用PICC)下有加入OSCCAL = _READ_OSCCAL_DATA();
結果:程式沒動作,可能是CLOCK沒振起


我配置如下(2)
1.使用12F629內部4M震盪(GP4=I/O)
2.MCLRE設為1(外部RESET)
3.程式在MAIN(使用PICC)下沒加入OSCCAL = _READ_OSCCAL_DATA();
結果:程式正常執行



我配置如下(3)
1.使用12F629內部4M震盪(GP4=I/O)
2.MCLRE設為0(CPU內部RESET)
3.程式在MAIN(使用PICC)下有加入OSCCAL = _READ_OSCCAL_DATA();
結果:程式正常執行


請問:1.是否使用外部RESET時,程式就不能加上
OSCCAL = _READ_OSCCAL_DATA(); ?

發表於: 2009/7/30 23:53
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... ]

教育訓練中心

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