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


Browsing this Thread:   4 Anonymous Users




(1) 2 »


Re: 內部EEPROM在寫入時,遇到中斷
#14
高級會員
高級會員


查看用戶資訊
參照:

Ryang 寫道:
恭喜,看來漏資料的問題解決了。


也感謝您提供方法及指導

發表於: 2009/2/25 17:06
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 內部EEPROM在寫入時,遇到中斷
#13
版主
版主


查看用戶資訊
恭喜,看來漏資料的問題解決了。

發表於: 2009/2/25 16:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 內部EEPROM在寫入時,遇到中斷
#12
高級會員
高級會員


查看用戶資訊
忙過了一週後,這星期有空了,用VB寫了一個AP,每間隔10秒送進我板子的UART更改EEPROM內容,也讓板子回應一些參數.

經過了約60幾個小時,還發現沒有發現錯誤,對於EEPROM的寫入,會有錯誤應該是不用擔憂了.

發表於: 2009/2/25 16:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 內部EEPROM在寫入時,遇到中斷
#11
高級會員
高級會員


查看用戶資訊
我所接收的字組一次不超過16個字,我是用終端機手動的方式一次一次送給我的控制板,目前都還未漏接過.
我接著還會用VB寫一個應用程式,用密集的送出,來是是看.

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


Re: 內部EEPROM在寫入時,遇到中斷
#10
版主
版主


查看用戶資訊
請問 UART 接收正常嗎?

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


Re: 內部EEPROM在寫入時,遇到中斷
#9
高級會員
高級會員


查看用戶資訊
OK!已修改如上的只在解鎖時停止中斷,謝謝!

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


Re: 內部EEPROM在寫入時,遇到中斷
#8
版主
版主


查看用戶資訊
"一但寫入VERIFY後立即恢復中斷"

不是這樣的,如此一來經寫入EEPROM 後又差 4mS 了,只要在解鎖階段 Disable Interrupt 就可以了,在寫入及驗證時間中斷是要 Enable 的好讓他人能夠處理其他的事件。

bcf INTCON,GIE ; Disable Interrupt
;
movlw 0x55 ; Unlock
movwf EECON2
movlw 0xAA
movwf EECON2
;
BSF EECON1,WR ; Start to write EEPROM
;
BSF INTCON,GIE ; Enable the Interrupt 在這裡打開

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


Re: 內部EEPROM在寫入時,遇到中斷
#7
高級會員
高級會員


查看用戶資訊
謝謝!了解了.我安心了.
我已經在EEPROM寫入程式中只有在解鎖時禁能中斷,一但寫入VERIFY後立即恢復中斷.
接下來是做一個測試環境,來驗證一下.

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


Re: 內部EEPROM在寫入時,遇到中斷
#6
版主
版主


查看用戶資訊
UART 是有接收的 FIFO 所以可以應付一段時間 (1/Baud Rate) * 10-bit x 2 這長的時間。不過這是一個觀念問題,因為 Internal EEPROM 在寫入時只要 4 個指令週期的中斷禁止時間,在這段短時間裡並不會引響到 UART 的接收。除非你的程式裡對中斷的禁止是一直到完成 EEPROM 寫完後才開啟中斷的,這樣得架構將會關閉中斷 4mS 所以其他的中斷就會受到影響。
所以說要看你的程式寫法,關畢中斷只要在那 4 個週期就可以了,不要關到 EEIF 變成1 以後才將中斷打開。想一想其中的差異性為何?

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


Re: 內部EEPROM在寫入時,遇到中斷
#5
高級會員
高級會員


查看用戶資訊
謝謝!了解了,後來我再想了一想,PIC MCU中也還有一個接收緩衝,所以應該不至於漏接了接收的字元.

發表於: 2009/2/10 17:52
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... ]

教育訓練中心

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