Re: 讀取ADC
|
||||
---|---|---|---|---|
新會員
|
謝謝~原來是少這個東西
可以在請問一下嗎? 我看有些PIC MCU的memory map也是有分bank0 和 bank1 但是在參考討論區的程式時(好像也只有這邊有程式可以參考) 發現他們都沒有先選擇Bank 像是當我要讀取ADC時 ADRESH 和 ADRESL就分屬不同BANK 是否也要在讀取前選擇BANK? (讀完ADRESH後, 選擇BANK1 再讀ADRESL?) 還有一個問題 爬文看到有人建議用中斷旗標ADIF來判斷是否可以開始讀取 所以如果read adc這個副程式一直要用到 是不是要在call read_adc前把ADIF清零 還是GO之後他會自動變零? 謝謝 ps.MICROCHIP好像沒有每顆MCU都有範例程式 都是PDF檔的說明比較多?
發表於: 2008/1/25 16:45
|
|||
|
Re: PIC12F615燒錄失敗
|
||||
---|---|---|---|---|
資深會員
|
START
發表於: 2008/1/24 8:44
|
|||
|
Re: PIC12F615燒錄失敗
|
||||
---|---|---|---|---|
中級會員
|
PG4 與 GP5 和外部振盪是共用腳位,
建議你檢查一下 configuration bits 的設定, 如果要當作一般 I/O , 應該是選擇為 Internal RC NO Clock.
發表於: 2008/1/24 8:32
|
|||
|
Re: PIC12F615燒錄失敗
|
||||
---|---|---|---|---|
新會員
|
@@"
我換了一顆MCU後 又可以燒錄了 但是IO port(GP4, GP5)並沒有因此而變high 是我程式哪邊有寫錯了嗎?
發表於: 2008/1/23 21:35
|
|||
|
PIC12F615燒錄失敗
|
||||
---|---|---|---|---|
新會員
|
各位前輩好
我最近剛入門PIC 今天要用ICD2燒程式時(MPLAB IDE v8.0) 有下面錯誤 ICD0161: Verify failed (MemType = Program, Address = 0x1, Expected Val = 0x2802, Val Read = 0x2) 看了HELP還是不太懂 還是程式的問題?(現在只試著寫看看控制IO) _____list______p=12f615, r=DEC _____include___"p12f615.inc" ; _____org______0x00 _____NOP _____GOTO____START START _____BCF______STATUS,RP0__;Bank 0 _____CLRF_____GPIO________;Init GPIO _____CLRF_____ANSEL_______;digital I/O _____MOVLW___0x04 _____MOVWF___TRISIO______;GP2 as input _____MOVLW___0x30 _____MOVWF___GPIO _____END
發表於: 2008/1/23 17:19
|
|||
|