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


Browsing this Thread:   2 Anonymous Users






Re: 不好意思~關於RTCC的設定
#9
版主
版主


查看用戶資訊
時間快慢是由 32768Hz 石英晶體所決定的,再說 PIC24 是3.3V 的工作電壓,且電壓的變化對 Crystal 的影響很輕微。建議你先監測一下 32768Hz 的頻率誤差後再作時間變快、慢的 bug.

發表於: 2010/2/11 10:34
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#8
中級會員
中級會員


查看用戶資訊
QQ ,不好意思,請問一下。

昨天測試RTCC這個,在電腦接上USB之後,它的秒數是每8.7秒跳一次,且不會到達10就歸回原值。

但測試了ㄧ種直接由110V轉USB的變壓器供電,卻正常顯示
含每到59就進位,可是速度稍快。

約正常時間47秒,它就跑完一分鐘了。

且用示波器量測,電壓值是ㄧ樣的。

卻有兩種結果!!


發表於: 2010/2/11 9:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#7
版主
版主


查看用戶資訊
有問題,第一 RTCC 指有一個 Clock Source 就是 32768Hz 的輸入,踏是獨立也是唯一的輸入源。

你所指的 8MHz 是指內部的 8MHz FRC (Fast RC Oscillator with PLL
Module (FRCPLL)) 如果要是用 32MHz 可以選 8MHz 的輸出轉到 x4 PLL ( FRCPLL Mode) 後得到 32MHz 的輸出。

詳細的設定如下:
POSCMD1: POSCMD0 = 11
FNOSC2: FNOSC0 = 001

請參考 : PIC24F Family Reference Manual 裡的 Section 6. Oscillator

發表於: 2010/2/10 14:54
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#6
中級會員
中級會員


查看用戶資訊
不好意思,請問一下。

RTCC是使用兩個震盪器輸入源,上次程式裡面是是使用

8Mhz,請問要如何開始第二震盪器輸入32MHZ,

?

發表於: 2010/2/9 16:57
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#5
版主
版主


查看用戶資訊
依據 256GB110 Data Sheet 裡的 Config1 的設定暫存器裡:

CONFIG1 
bit 14 JTAGENJTAG Port Enable bit(1)
JTAG port is enabled
JTAG port is disabled
bit 13 GCP
General Segment Program Memory Code Protection bit
Code protection is disabled
Code protection is enabled for the entire program memory space
bit 12 GWRP
General Segment Code Flash Write Protection bit
Writes to program memory are allowed
Writes to program memory are disabled
bit 11 DEBUG
Background Debugger Enable bit
Device resets into Operational mode
Device resets into Debug mode
bit 10 Reserved
Always maintain as ‘1’
bit 9
-8 ICS1:ICS0Emulator Pin Placement Select bits
11 
Emulator functions are shared with PGEC1/PGED1
10 
Emulator functions are shared with PGEC2/PGED2
01 
Emulator functions are shared with PGEC3/PGED3
00 
Reserved; do not use
bit 7 FWDTENWatchdog Timer Enable bit
=.....


COE 應是工廠測試使用的位元,他並不存在於 Data Sheet,但在256GB110 的 h 檔裡卻有此宣告 Clip-on Emulation mode , 實際在 MPLAB IDE 下裡的 CONFIG 選項下也看不到此位元。所以還是建議使用 COE_OFF 的設定。

發表於: 2010/2/8 14:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#4
中級會員
中級會員


查看用戶資訊
_CONFIG1( JTAGEN_OFF & GCP_OFF & GWRP_OFF & COE_OFF & FWDTEN_OFF & ICS_PGx2)

_CONFIG2( FCKSM_CSDCMD & OSCIOFNC_ON & POSCMOD_HS & FNOSC_PRI )

請問COE 是指第二個震盪輸入,關閉嗎?

發表於: 2010/2/8 10:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 不好意思~關於RTCC的設定
#3
中級會員
中級會員


查看用戶資訊
謝謝 ,我會仔細看的。

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


Re: 不好意思~關於RTCC的設定
#2
版主
版主


查看用戶資訊
前帳未清又開了新的主題。

有關你所說的 RTCC 的 function source code 是對的,一般是不會直接拿SRC 目錄下的程式加到 Project 裡的,除非你要修改Microchip所提供的函數功能。

因為使用 RTCC 有佔存器鎖定的問題所以使用起來很如意出錯的,針對使用 RTCC Libraries Function 可以看一下底下的 COde Example 它是使用PIC24FJ256GB110 使用中斷模式所寫的時鐘。

Attach file:


Link only for registered users

發表於: 2010/2/5 10:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


不好意思~關於RTCC的設定
#1
中級會員
中級會員


查看用戶資訊
RTCC的設定是否用peripheral_24F-->SRC-->PMC-->RTCC

裡面的C檔,來設定呢?


如果是,我的想法是

RTCCInitClock.c ----開啟第二震盪
RtccWrOn.c----開啟寫入RTCCRCFGROL
RtccWriteTimeDate.c----開啟寫入RCFGCAL的值
RtccWriteAlrmTimeDate.c----開啟ALCFGPT的值
RtccSetChimeEnbl.c----開啟鬧鐘
RtccReadAlrmTimeDate.c---讀取鬧鐘時間
RtccReadTimeDate.c---讀取RTCC時間


~我使用的是APP026-3這塊板子

發表於: 2010/2/5 8:36
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... ]

教育訓練中心

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