想請問I2C應用範例
|
||||
---|---|---|---|---|
新會員
|
我有在範例程式那邊看到I2C的應用範例
可是因為是組語寫成的 請問有可能拿到c code 控制I2C的範例程式ㄇ 還有那是針對哪一個晶片所寫的 有I2C電路介面的PIC晶片目前台灣買的到ㄇ
發表於: 2005/8/3 23:23
|
|||
|
Re: 也是 dsPIC c30 Encoder 的問題
|
||||
---|---|---|---|---|
管理員
|
已經寄給你了啦 !
很抱歉現在才看到 , 藉口是有一點忙啦 :)
發表於: 2005/8/3 21:55
|
|||
|
Re: INT interrupt problem
|
||||
---|---|---|---|---|
管理員
|
Dear Customer,
Your program should works well if you are using PIC16F877A or other equivalent devices. The button connected to RB0 on PICDEM2 Plus is S3. So, you will get INT0 interrupt if you press S3. You can set breakpoint at statement >> INTF=0 if you are debug your code by using MPLAB ICD2 or MPLAB ICE2000. I copied your code and executed it , my program will stopped at INTF=0 if I pressed S3. Of course , breakpoint must be set. Finally , you don't have to call InitINT( ) in your while(1) { .. } loop. you can move it to the next line of InitIO( ) . Let us know if you still gain any problem during your code development. Thanks & Best Regards,
發表於: 2005/8/3 21:51
|
|||
|
Re: pic16f877問題請教
|
||||
---|---|---|---|---|
新會員
|
感謝您的回覆~
我是要將常數0x80~0x86存取到w暫存器,載來跟ad轉換的值相減,不過線在我卡在如何同時將上述七個常數同時存取呢? movlw 0x80 movlw 0x81 movlw 0x82 movlw 0x83 movlw 0x84 movlw 0x85 movlw 0x86 subwf ad轉換的值 w 可以這樣寫嗎? 我是初學者,麻煩您囉!
發表於: 2005/8/3 21:20
|
|||
|
Re: pic16f877問題請教
|
||||
---|---|---|---|---|
管理員
|
請問你是要將 Data Memory Address 0x80 ~ 0x85 的內容由 W 來存取 或是將常數值 0x80 ~ 0x85 寫入 W 呢 ? 若是要透過 W 存取 0x80 ~ 0x85 位址的 Data Memory : >> BANKSEL 0x80 >> movf 0x80,W ( 寫入 W ) >> ( or ) movwf 0x80 ( 由 W 寫入 0x80 ) 若是要將常數 0x80 寫入 W : >> movlw 0x80 ..... 祝你順利啦 !!
發表於: 2005/8/3 21:12
|
|||
|
Re: PIC18FXX31
|
||||
---|---|---|---|---|
管理員
|
你好 ,
基本上 , PIC18F4431 可以直接放在 APP001 EVM Board 上做實驗. 但若您要測試 Motor Control PWM module 就要注意以下幾點了 : 1. PIC18F4431 的 PWM0 .. PWM5 在 PORTB 的 RB0..RB5. 所以要將 DSW2 做適當的調整. 2. PWM6 & 7 在 RD6 & RD7 , 要用到它們也要調整 DSW3. 3. QEI 的腳位 RA2..RA4 , 須要的話要調整 DSW1. ( LCD 的 E 腳使用 RA2 , 若被 QEI 用掉的話就不能驅動 LCD 了 ) 使用 J1 ( 20X2 的 DIN COnnector, 在 CPU 右邊 ) 可以將信號外接. Best Regards,
發表於: 2005/8/3 21:02
|
|||
|
pic16f877問題請教
|
||||
---|---|---|---|---|
新會員
|
我現在想將0x80~0x85值存取到w暫存器,請問要如何撰寫呢?
我只知道若是c的話是寫0x80 to 0x85但組合語言要如何寫呢? 請各位高手提供點意見吧!! 感恩~~
發表於: 2005/8/3 20:18
|
|||
|
INT interrupt problem
|
||||
---|---|---|---|---|
新會員
|
I met a problem:
I use PICDEM 2 PLUS and write a INT interrupt test routin as follows. But I cannot go into the interrupt routine. Please give me a hand. Thanks a lot. # include <pic.h> void InitIO (void); void InitInt (void); void interrupt Isr (void); void main (void) { InitIO (); while (1) { InitInt (); if (RA4==0) PORTB=0b00000010; else PORTB=0b00000100; } } void InitIO (void) { PORTA=0x00; ADCON1=0b00001110; TRISA=0x11; PORTB=0x00; TRISB=0b11110001; } void InitInt (void) { INTEDG=0; INTE=1; GIE=1; } void interrupt Isr (void) { INTF=0; PORTB=0b00001000; }
發表於: 2005/8/3 18:09
|
|||
|
PIC18FXX31
|
||||
---|---|---|---|---|
高級會員
|
請問版主:PIC18FXX31適用於APP001的實習板嗎
發表於: 2005/8/3 17:52
|
|||
|