CW5.1软件自带一个JB8的USB通讯代码例子,我想通过端口1发送8个16进制数(原例子中是发送一个数$FF),我把其中一句代码改成如下内容后,为什么在BUSHOUND中观察时发现好像一直在RSET呢?下面时我更改的部分(带星号的部分)。怎么才能通过端口1发送8个16进制数呢? IN_PROC3: cmp #SET_CONFIG ; is this IN packet for status stage bne IN_EXIT ; of SET_CONFIGURATION? mov #CONFIGURED,USB_State ; device in CONFIGURED state clr control ; end of control transfer ;lda #$02 ; get Port B value ;sta UE1D0 ; place in endpoint 1 data buffer mov #$28,UCR1 ; *********************************************** 原来是 mov #$21,UCR1
下面是BUSHOUND显示内容: 23.0 CTL 80 06 00 01 00 00 12 00 GET DESCRIPTOR 1.1.0 23.0 DI 12 01 10 01 00 00 00 08 57 0b 24 80 01 00 01 02 ........W.$..... 1.2.0 00 01 .. 1.2.16 23.0 CTL 80 06 00 02 00 00 09 00 GET DESCRIPTOR 2.1.0 23.0 DI 09 02 22 00 01 01 00 c0 00 .."...... 2.2.0 23.0 CTL 80 06 00 02 00 00 22 00 GET DESCRIPTOR 3.1.0 23.0 DI 09 02 22 00 01 01 00 c0 00 09 04 00 00 01 03 00 .."............. 3.2.0 00 00 09 21 00 01 00 01 22 17 00 07 05 81 03 08 ...!...."....... 3.2.16 23.0 CTL 00 09 01 00 00 00 00 00 SET CONFIG 4.1.0 23.0 CTL 21 0a 00 00 00 00 00 00 SET IDLE 5.1.0 23.0 USTS 04 00 00 c0 stall pid 5.2.0 23.0 CTL 81 06 00 22 00 00 57 00 GET DESCRIPTOR 6.1.0 23.0 DI 06 00 ff 09 01 a1 01 09 02 09 03 15 00 26 ff 00 .............&.. 6.2.0 75 08 95 01 81 02 c0 u...... 6.2.16 23 RSET 7.1.0 23 NSTS 00 00 00 00 success 7.2.0 23.1 RSET 8.1.0 23.1 USTS 04 00 00 c0 stall pid 8.2.0 23 RSET 9.1.0 23.1 DI ff . 10.1.0 23.1 USTS 00 03 00 80 bad parameter 10.2.0 23 NSTS 00 00 00 00 success 9.2.0 23.1 RSET 11.1.0 23.1 USTS 04 00 00 c0 stall pid 11.2.0 23 RSET 12.1.0 23 NSTS 00 00 00 00 success 12.2.0 23.1 RSET 13.1.0 |