View previous topic :: View next topic |
Author |
Message |
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Fri Mar 25, 2011 3:48 pm Post subject: |
|
|
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 |
|
|
AndersL
Joined: 25 Jan 2010 Posts: 92 Location: Kragerø,Norway
|
Posted: Sat Mar 26, 2011 3:27 pm Post subject: |
|
|
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 |
|
|
atlab
Joined: 11 Jul 2009 Posts: 1 Location: Russia
|
Posted: Sat Mar 26, 2011 4:43 pm Post subject: |
|
|
Translated from russian to english with google.
P.S. translations: english -> russian -> english |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Sun Mar 27, 2011 3:08 am Post subject: |
|
|
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 |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Sun Mar 27, 2011 3:16 am Post subject: |
|
|
Anders and Atlab,
Now after my post I see they are done! Even better.
Man this is some good stuff!
Thanks again, going to study.......
Mark |
|
Back to top |
|
|
Alex20q90
Joined: 24 Sep 2007 Posts: 89
|
Posted: Sat Apr 23, 2011 4:37 pm Post subject: |
|
|
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 |
|
|
ex4
Joined: 13 Jan 2006 Posts: 1062 Location: indonesia
|
Posted: Sun Apr 24, 2011 3:22 am Post subject: |
|
|
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 |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Sun Sep 18, 2011 4:23 pm Post subject: |
|
|
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 |
Mr.Ollopa, if you still job-hunting full-time, may be you will send sources (may be in private mode)? |
|
Back to top |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Sat Sep 24, 2011 1:28 am Post subject: |
|
|
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 |
|
|
Petr_
Joined: 24 Mar 2010 Posts: 66
|
Posted: Sat Sep 24, 2011 6:20 pm Post subject: |
|
|
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 |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Sat Sep 24, 2011 10:01 pm Post subject: |
|
|
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
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 |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Sat Sep 24, 2011 10:19 pm Post subject: |
|
|
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 |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Sun Sep 25, 2011 2:12 am Post subject: |
|
|
Seems to be working better now.
I have send errors when using random data. I will investigate further... |
|
Back to top |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Thu Oct 06, 2011 8:58 pm Post subject: |
|
|
Mr. Ollopa, any changes? |
|
Back to top |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Fri Oct 07, 2011 1:51 am Post subject: |
|
|
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 |
|
|
|