Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Virtual USB-port for AVR
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 20, 21, 22  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 303
Location: Delano, MN

usa.gif
PostPosted: Fri Mar 25, 2011 3:48 pm    Post subject: Reply with quote

Have the up most respect for people that are multi-lingual. I am not.

I tried running this through a translator but not working. I tried Google's.

So is there an English translation of the Klava_primer.bas or a procedure to convert this to English?

Seems to have multiple languages in that .bas but Const_swusb-includes.bas is very English.

TIA,

Mark
Back to top
View user's profile
AndersL

Bascom Member



Joined: 25 Jan 2010
Posts: 89
Location: KragerÝ,Norway

norway.gif
PostPosted: Sat Mar 26, 2011 3:27 pm    Post subject: Reply with quote

Hi mmarlette,
try to open the bas file in eg ms words with encoding cyrilic(windows)
The russian letters are now visible and a copy paste into google translate
will give a reasonable translate.
Notice that during translate, som characters are "translated" in such a way that the code needs to be modified before compile.

See attached file.

_________________
Anders
Back to top
View user's profile
atlab

Bascom Member



Joined: 11 Jul 2009
Posts: 1
Location: Russia

russia.gif
PostPosted: Sat Mar 26, 2011 4:43 pm    Post subject: Reply with quote

Translated from russian to english with google.

P.S. translations: english -> russian -> english Very Happy
Back to top
View user's profile
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 303
Location: Delano, MN

usa.gif
PostPosted: Sun Mar 27, 2011 3:08 am    Post subject: Reply with quote

Anders,

Perfect process, works like a champ!

Just doing the comments one at a time as needed.

Thanks for the GREAT tip!

Regards,

Mark
Back to top
View user's profile
mmarlette

Bascom Member



Joined: 30 Nov 2007
Posts: 303
Location: Delano, MN

usa.gif
PostPosted: Sun Mar 27, 2011 3:16 am    Post subject: Reply with quote

Anders and Atlab,

Now after my post I see they are done! Smile Even better.

Man this is some good stuff!

Thanks again, going to study.......

Mark
Back to top
View user's profile
Alex20q90

Bascom Member



Joined: 24 Sep 2007
Posts: 89

germany.gif
PostPosted: Sat Apr 23, 2011 4:37 pm    Post subject: Reply with quote

Hi Radan,

thats a great project with your code!

Question:

Is that able to make an USB2Serial-Converter?

I need some serial strings from PC for my PWM-Light-Mod. At Time, i use an USB2Serial -> ATMega8. I would like to integrate that in the Mega8 with you code. I only need 5 Bytes to send to the Mega8. How i have to modify your code to get the sendet 5 bytes?

I dont need any viritual com port!

Best regards
Alex
Back to top
View user's profile
ex4

Bascom Member



Joined: 13 Jan 2006
Posts: 1064
Location: indonesia

indonesia.gif
PostPosted: Sun Apr 24, 2011 3:22 am    Post subject: Reply with quote

Quote:
Is that able to make an USB2Serial-Converter?

I need some serial strings from PC for my PWM-Light-Mod. At Time, i use an USB2Serial -> ATMega8


that's contradictive with your next statement
Quote:
I dont need any viritual com port!


from my opinion use the HID mode, its more acceptable and fast between many OS-es (XP, WIN7,WIN VISTA, MAC, LINUX)
Back to top
View user's profile Visit poster's website AIM Address Yahoo Messenger
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Sun Sep 18, 2011 4:23 pm    Post subject: Reply with quote

ollopa wrote:
I'm still job-hunting full-time. I'm going to have to take a job out of the area and move, so it will be at least a few months before I do anything USB or BASCOM related. Sorry Sad

Mr.Ollopa, if you still job-hunting full-time, may be you will send sources (may be in private mode)?
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Sat Sep 24, 2011 1:28 am    Post subject: Reply with quote

Mrshilov,

Good news is that I found a job! I had to move some distance into a temporary apartment and I will be moving into a larger place soon. What's really exciting is that I now have access to a commercial, high-end USB analyzer though my job. I have many, many commitments now, so time is an issue, but I'm in a much better position to do USB work.

ex4,
The maximum packet size for low-speed USB 1.1 is 8 bytes. If you have more to send, then you must break it into 8-byte transactions. Also, according to the USB specifications, if you send an 8-byte packet then the host controller will be expecting more data to follow. In order to send n*8 bytes, you must finish the transaction by sending a 0byte data packet. I believe I checked for this in my example code.
Back to top
View user's profile
Petr_

Bascom Member



Joined: 24 Mar 2010
Posts: 66

blank.gif
PostPosted: Sat Sep 24, 2011 6:20 pm    Post subject: Reply with quote

Mr. Ollopa.
What to do with the freeze device when the package is more than one byte?
The problem described here http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=7537&start=165
I even wrote a special PC program that records the time the error occurred.
One byte in the package greatly reduces the already small data rate.
How to fix it so that you can transfer from computer to device any number of bytes, from 1 to 8 in a package?
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Sat Sep 24, 2011 10:01 pm    Post subject: Reply with quote

Peter_,

I will try to verify the problem you found. I may have already fixed it in my local copy of the library. I think we may be having trouble communicating our ideas to one another. Hopefully we can communicate in code Smile

The USB code can already send and receive packets from size 0 to size 8. This happens several times during enumeration of the USB device. The "USB packet" and the "HID report" are different things. It looks to me like your HID report is 8 bytes long ( size[8] (in bits), count[8] ). That should be broken into 2 USB packets: 1 8-byte packets and one 0-length packet. I have to examine your code further but from the screenshots it looks like there may be some confusion about how this works.

** edited to retract my miscalculation of the report size **
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Sat Sep 24, 2011 10:19 pm    Post subject: Reply with quote

Peter_,

I think this is the problem:

Code:
          For Count = 2 To 9
            _usb_tx_buffer2(count) = _usb_rx_buffer(count)
            Call Usb_send(_usb_tx_status2 , 8)
          Next Count


You need something like this:

Code:

          ' Copy receive buffer to send buffer (8 bytes)
          For Count = 2 To 9
            _usb_tx_buffer2(count) = _usb_rx_buffer(count)
          Next Count

          Call Usb_send(_usb_tx_status2 , 8) ' Send 8-bytes
          While _usb_tx_status2._usb_txc = 0 : Wend  ' Wait for transmit to complete
          Call Usb_send(_usb_tx_status2 , 0) ' Terminate transaction
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Sun Sep 25, 2011 2:12 am    Post subject: Reply with quote

Seems to be working better now.

I have send errors when using random data. I will investigate further...
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Thu Oct 06, 2011 8:58 pm    Post subject: Reply with quote

Mr. Ollopa, any changes?
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Fri Oct 07, 2011 1:51 am    Post subject: Reply with quote

I'm wondering if Petr_ can confirm my results...

Also under the latest compiler I'm having some issues with 12MHz but not 15MHz. I need to see if the asm has changed somewhere critical.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Goto page Previous  1, 2, 3 ... 13, 14, 15 ... 20, 21, 22  Next
Page 14 of 22

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum