Beginner's Post

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
ahduy
Posts: 5
Joined: Mon Sep 14, 2009 6:34 pm

Beginner's Post

Post by ahduy » Mon Sep 14, 2009 6:51 pm

Please, help me...

i am a beginner in c, assembly, and usb., everything i saw in this source code, it always make me want to cry at loud...

i started study assembly part of usb driver:
when i look into assembly part of this usb driver, in this case "usbdrvasm12.inc", in this piece:

rxLoop:
eor x3, shift ;1 [0] reconstruct: x3 is 0 at bit locations we changed, 1 at others
in x1, USBIN ;1 [1] <-- sample bit 0
st y+, x3 ;2 [3] store data
ser x3 ;1 [4]
nop ;1 [5]
eor x2, x1 ;1 [6]
bst x2, USBMINUS;1 [7]
bld shift, 0 ;1 [8]
in x2, USBIN ;1 [9] <-- sample bit 1 (or possibly bit 0 stuffed)
andi x2, USBMASK ;1 [10]
breq se0 ;1 [11] SE0 check for bit 1

source above branch to label "se0".. where can i find those label ?

pleeaaaseee... and thanks before

sorry, my english bad :mrgreen:

Grendel
Rank 4
Rank 4
Posts: 167
Joined: Sat Dec 16, 2006 9:53 pm
Location: Oregon, USA
Contact:

Re: Beginner's Post

Post by Grendel » Mon Sep 14, 2009 8:53 pm

It's defined in asmcommon.inc:

Code: Select all

;----------------------------------------------------------------------------
; Processing of received packet (numbers in brackets are cycles after center of SE0)
;----------------------------------------------------------------------------
;This is the only non-error exit point for the software receiver loop
;we don't check any CRCs here because there is no time left.
se0:
    subi    cnt, USB_BUFSIZE    ;[5]
    ....

ahduy
Posts: 5
Joined: Mon Sep 14, 2009 6:34 pm

Re: Beginner's Post

Post by ahduy » Tue Sep 15, 2009 2:07 am

oh my...
thanks very much., it's only my problems... hahahaha, i'm beginner., fyuuh
grendel, please help if i find any problems again.,
:D

Post Reply