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

論壇索引


Board index » All Posts (tina)




請問開關彈跳
#11
中級會員
中級會員


各為大家好
想請教各位按鍵的彈跳問題要如何解決ㄋ
我使用的是PIC 16F873A
軟體上要如何寫程式 或
硬體要如何解決

謝謝


發表於: 2006/4/30 13:06
頂部


請教除錯時產生的訊息
#12
中級會員
中級會員


大家好
我使用PIC 16f873A Demoboard為PICDEM2 PLUS
產生這樣的錯誤 我不太清楚 請了解的人幫忙解釋 謝謝喔



MPLINK 3.80, Linker
Copyright (c) 2004 Microchip Technology Inc.
Error - section '.org_1' can not fit the absolute section. Section '.org_1' start=0x00000004, length=0x00000100
Errors : 1

BUILD FAILED: Sat Apr 15 17:47:25

發表於: 2006/4/15 17:52
頂部


PIC 16F873A 工作電壓
#13
中級會員
中級會員


大家好 請問一個簡單的問題
請問 PIC 16F873A 的工作電壓
是否可以給予3V以下 謝謝

發表於: 2006/1/4 9:19
頂部


請問儲存控制時間
#14
中級會員
中級會員


大家好
請問一下 如果要以按鈕的次數來儲存所需要的時間 要如何撰寫 例如每按一次按鈕增加十秒鐘 然後在輸出來控制LED
謝謝

我的程式如下
list p=16F873a
#include <p16f873a.inc> ; Include file locate at defult directory
;#define RA4 PORTA,4

VAL_500uS equ .250 ; 0.5ms delay value
VAL_1s equ .200 ; 10mS delay value
count_1m equ 0x22
count_5s equ 0x23
count_1s equ 0x24
count_us equ 0x25
Reg_time equ 0x26

;********************************************


;*********************************************
org 0x00
nop
initial:


banksel ADCON1 movlw b'11000110'
movwf ADCON1

banksel CMCON movlw b'00000111'
movwf CMCON
movlw b'00110000'
movwf TRISA

banksel TRISB ;定義TRISB設定PORTB為輸出模式
clrf TRISB

banksel PORTB
clrf PORTB



;***********************************************
Main
;***********************************************
start:
clrf Reg_time
movlw b'11111111' ;LED初始狀態
movwf PORTB
movlw .10
movwf Reg_time


;--------------------------------------------------------

key_time:
btfsc PORTA,4
goto add_time
btfsc PORTA,5
goto enter_mode
goto key_time

add_time:
movlw .10
addwf Reg_time,1
;goto key_enter
goto key_time

key_enter:
btfsc PORTA,5
goto key_time
;goto key_enter
goto enter_mode


enter_mode:
call delay_1s
movlw b'00000000'
movwf PORTB

decfsz Reg_time
goto enter_mode
goto clear_mode
clear_mode:
movlw b'11111111'
movwf PORTB
goto start

;-----------------------延遲1s-------------------------------------------
delay_1s:
movlw VAL_1s
movwf count_1s
loop_1s call delay_0.5ms
decfsz count_1s,F
goto loop_1s
return
;-----------------------延遲0.5ms----------------------------------------
delay_0.5ms:
movlw VAL_500uS
movwf count_us
dec_loop nop
nop`
nop
nop
nop
decfsz count_us,F
goto dec_loop
return
;---------------------------------------------------------------------------

end

發表於: 2005/12/21 20:04
頂部


Re: 16LF873A
#15
中級會員
中級會員


謝謝你

發表於: 2005/12/2 12:57
頂部


16LF873A
#16
中級會員
中級會員


請問一下各位
哪裡可以找到16LF873A的datasheet
THX

發表於: 2005/12/1 22:23
頂部


有關計時...
#17
中級會員
中級會員


大家好 有關之前按鍵與震盪器的問題已順利解決 謝謝大家的協助 目前遇到的困難是 當我想以按下按鍵的次數來累加LED發光的秒數 但是結果都只會計數原來暫存器存的10秒 並沒有累加的功能 以下是我的程式 請各位幫我看看 謝謝
list p=16F873a
#include <p16f873a.inc> ; Include file locate at defult directory

VAL_500uS equ .250 ; 0.5ms delay value
VAL_1s equ .200 ; 10mS delay value

count_1m equ 0x22
count_5s equ 0x23
count_1s equ 0x24
count_us equ 0x25
Reg_time equ 0x26

;********************************************


;*********************************************
org 0x00
nop
initial:

;bcf STATUS,RP0
;bcf STATUS,RP1
;clrf PORTA
;bsf STATUS,RP0
banksel ADCON1 ;定義ADCCON1,將PORTA第四個bit設為數位模式
movlw b'11000110'

movwf ADCON1

banksel CMCON ;定義CMCON將比較器功能關閉
movlw b'00000111'
movwf CMCON
movlw b'00011000'
movwf TRISA

banksel TRISB ;定義TRISB設定PORTB為輸出模式
clrf TRISB

banksel PORTB
clrf PORTB



;***********************************************
Main
;***********************************************
start:
clrf Reg_time
movlw b'11111111' ;LED初始狀態
movwf PORTB
movlw .10
movwf Reg_time


;--------------------------------------------------------

key_time:
btfsc PORTA,4
goto key_enter
;goto key_time
goto add_time

add_time:

addwf Reg_time,1
goto key_time

key_enter:
btfsc PORTA,5
goto key_time
;goto key_enter
goto enter_mode


enter_mode:
call delay_1s
movlw b'00000000'
movwf PORTB

decfsz Reg_time
goto enter_mode
goto clear_mode
clear_mode:



movlw b'11111111'
movwf PORTB
goto start

;-----------------------延遲1s-------------------------------------------
delay_1s:
movlw VAL_1s
movwf count_1s
loop_1s call delay_0.5ms
decfsz count_1s,F
goto loop_1s
return
;-----------------------延遲0.5ms----------------------------------------
delay_0.5ms:
movlw VAL_500uS
movwf count_us
dec_loop nop
nop`
nop
nop
nop
decfsz count_us,F
goto dec_loop
return
;---------------------------------------------------------------------------

end

發表於: 2005/11/28 22:04
頂部


蜂鳴器
#18
中級會員
中級會員


大家好
有哪裡可以找到有關蜂鳴器的範例程式
我使用PIC 16F873A
功用是用來警示時間到了
拜託好心人士提供
謝謝

發表於: 2005/11/22 20:47
頂部


Re: 簡單的開關問題
#19
中級會員
中級會員


不好意思 請問RA5要關閉 那我的ADCON1要如何設
我是把PORTA都變成digital的型態 這樣正確嗎 謝謝

發表於: 2005/11/15 12:26
頂部


Re: 簡單的開關問題
#20
中級會員
中級會員


謝謝你
我的程式如下
list p=16F873a
#include <p16f873a.inc> ; Include file locate at defult directory
VAL_500uS equ .250 ; 0.5ms delay value
VAL_1s equ .200 ; 10mS delay value
count_1m equ 0x22
count_5s equ 0x23
count_1s equ 0x24
count_us equ 0x25
Reg_time equ 0x26

;********************************************

;*********************************************
org 0x00
nop
initial:

banksel ADCON1 ;定義ADCCON1,將PORTA第四個bit設為數位模式
movlw b'11000110'
movwf ADCON1

banksel CMCON ;定義CMCON將比較器功能關閉
movlw b'00000111'
movwf CMCON
movlw b'00011000'
movwf TRISA

banksel TRISB ;定義TRISB設定PORTB為輸出模式
clrf TRISB

banksel PORTB
clrf PORTB



;***********************************************
Main
;***********************************************
start:
clrf Reg_time
movlw b'11111111' ;LED初始狀態
movwf PORTB
movlw .25
movwf Reg_time


;--------------------------------------------------------

key_time:
btfsc PORTA,4
goto key_time
goto add_time
;goto key_enter
add_time:
movlw .10
addwf Reg_time
goto key_enter

key_enter:
btfsc PORTA,5
goto key_time
goto enter_mode


enter_mode:
call delay_1s
movlw b'00000000'
movwf PORTB

decfsz Reg_time
goto enter_mode
goto clear_mode
clear_mode:
movlw b'11111111'
movwf PORTB
goto start

;-----------------------延遲1s-------------------------------------------
delay_1s:
movlw VAL_1s
movwf count_1s
loop_1s call delay_0.5ms
decfsz count_1s,F
goto loop_1s
return
;-----------------------延遲0.5ms----------------------------------------
delay_0.5ms:
movlw VAL_500uS
movwf count_us
dec_loop nop
nop`
nop
nop
nop
decfsz count_us,F
goto dec_loop
return
;---------------------------------------------------------------------------

end
參照:

mong 寫道:
PORTA,4為Open Drain~~~
故需要外接Pull Hi的線路~~~
另外PORTA,5則不用~~~
另外可否將你的程式一併附上~~~
這樣比較會知道問題在哪裡~~~

發表於: 2005/11/14 16:14
頂部



« 1 (2) 3 4 5 »



:::

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... ]

教育訓練中心

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