Re: PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
新會員
|
Truseme,
HID 還是需要driver 的只是OS已經內含而已!! 還有確定一下你的是HID device 沒有含別的裝置!!
發表於: 2008/9/19 11:57
|
|||
|
Re: PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
新會員
|
請教各位大大!!
为什么用proteus 仿真PIC18F4550 USB(HID)时候总是显示要驱动.HID不是不要驱动的吗!
發表於: 2008/9/7 9:44
|
|||
|
Re: PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
新會員
|
Thanks for calvin,
問題已解決! 我本身有兩個問題!(實際上的PIC是4553) 1. 在Proteus 上模擬不需要usb_bus_sense 所以我在實際的板子上忘了做這個!! 2. 就是中斷的問題了!! 謝囉!
發表於: 2008/8/28 11:06
|
|||
|
Re: PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
新會員
|
先謝謝囉!!
我目前的解法是HID device 可以上, PC to PIC18 UART 可以動但是就是PIC18 要傳data給PC 會有問題!!
發表於: 2008/8/22 23:35
|
|||
|
Re: PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
版主
|
這問題還是要找 Calvin Ho 來回答,但是他現在在南台科大上 16-bit 精英般的課,要到下週才會進辦公室。我會通知他的。
發表於: 2008/8/22 8:54
|
|||
|
PIC18F4550 USB(HID)與UART 的問題!!
|
||||
---|---|---|---|---|
新會員
|
請教各位大大!!
最近小弟用4550裝載USB(HID)device時, 因為有用到high priority 中斷去傳輸和接收uart的資料! 奇怪的是在proteus模擬的時候都是正常工作!! 實際上到板子卻是不行動作! MPLAB v8.1 c18 v3.14 //--------有問題的部分code----- extern void _startup (void); // See c018i.c in your C18 compiler dir #pragma code _RESET_INTERRUPT_VECTOR = 0x000800 void _reset(void) { _asm goto _startup _endasm } #pragma code _LOW_INTERRUPT_VECTOR=0x18 void _low_ISR(void) { _asm GOTO PIC18F_Low_isr _endasm } #pragma code _HIGH_INTERRUPT_VECTOR=0x8 void _high_ISR(void) { _asm GOTO PIC18F_High_isr _endasm } #pragma code #pragma interrupt PIC18F_High_isr void PIC18F_High_isr(void) { if(PIR1bits.TXIF==1){ PIR1bits.TXIF=0; TransCtr++; if(TransCtr==(TransSize)){ TXSTAbits.TXEN=0; FLAGbits.TxFlag=0; } else if(TransCtr<TransSize){ if(TransCtr==(TransSize-1)){ TransBuf[(TransSize-1)]=TransChksum; TXREG=TransBuf[(TransSize-1)]; } else{ TXREG=TransBuf[TransCtr]; TransChksum+=TransBuf[TransCtr]; } } } //-------------------------------------------- void main(void) { /*****************************************/ Init_UART(); RCONbits.IPEN=1; INTCONbits.GIEH = 1; INTCONbits.GIEL = 1; INTCONbits.PEIE = 1; /**************************************/ while(1){ //USBTasks(); // USB Tasks } 目前查到的現象是!! 1. disable USBTasks() UART 正常工作!! 2. 在proteus 看不到問題工作都正常!! 請問大大!! 這是否是USBTasks()一直在動作影響中斷得執行!!
發表於: 2008/8/20 14:17
|
|||
|