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


Browsing this Thread:   1 Anonymous Users






Re: PIC16F687 RA1有問題
#3
初級會員
初級會員


查看用戶資訊
情況還是一樣
現在是RA的電壓不太對
H -> 4.9v
L -> 1.9v
煩請再幫我看一下
謝謝

void Init(void)
{
PORTA = 0x00;
PORTB = 0x00;
PORTC = 0x00;

ADCON0 = 0x00;
ANSEL = 0x00;
ANSELH = 0x00;
C1ON = 0;
C2ON = 0;
RABPU = 0;
WPUA = 0b00110111;
IOCA = 0x00;
WPUB = 0b11110000;
IOCB = 0x00;

TRISA = 0b11111111;
TRISB = 0b11111111;
TRISC = 0b00001000;

PORTC = PORTC & 0x0f;
}

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


Re: PIC16F687 RA1有問題
#2
版主
版主


查看用戶資訊
17F687 的 RA1 也具有 AN1/C12IN0-/VREF/ICSPCLK,
請在檢查一下 Aanlog Comparator & 參考電壓 這些模組 是否有 disable.

發表於: 2009/10/29 14:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


PIC16F687 RA1有問題
#1
初級會員
初級會員


查看用戶資訊
我用 PIC16F687 做了一個 RS-485 Protocol D 控制程式
但客戶最近發現了一個問題
用來當做 ID code 的接腳有 RA0 1 2 4 5
但 RA1 有時會出現電壓準位浮動的現象
我是設 RA1 為輸入接到一個10k ohm接地
同時再接 SW 到 VCC
SW ON 時 VCC 導通到 10k ohm 接地,RA1 端應可測得10k ohm 為5V Hi
SW OFF 時 RA1 端測得10k ohm 接地為 0V Lo
但是卻發生了有的板子有時候 RA1 Hi 時為1.xV,Lo 時為 0.4V
不知有什麼地方沒有設定好還是有什麼問題呢

謝謝

PS : initial function 如下

config bits = 0x0024

void Init(void)
{
PORTA = 0x00;
PORTB = 0x00;
PORTC = 0x00;

ANSEL = 0x00;
ANSELH = 0x00;
WPUA = 0x00;
IOCA = 0x00;
WPUB = 0x00;
IOCB = 0x00;

TRISA = 0b11111111;
TRISB = 0b11111111;
TRISC = 0b00001000;

PORTC = PORTC & 0x0f;
}

發表於: 2009/10/27 16:27
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... ]

教育訓練中心

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