Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Virtual USB-port for AVR
Goto page Previous  1, 2, 3 ... , 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
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Fri Feb 08, 2013 2:40 pm    Post subject: Reply with quote

Hi,
no, new changes for array passing is not down compatible...

But at all i think, that your project is only usable for Bascom full version and those users can update bascom easily
Very Happy

thanks for your work!

best michael

_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Mon Feb 11, 2013 10:19 am    Post subject: Reply with quote

Hey guys,

I checked Mr Six's changes. The whole routines are different. This means the examples from opollas webite are not the latest?
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Mon Feb 11, 2013 5:14 pm    Post subject: Reply with quote

In the meanwhile I have read six1's attachments and it took a while for me to understand.

However two questions remain:

1) did I understand correctly that instead of the checks in the main loop (originally by opolla) I have to call these subs in the main loop??
Do
Resetcounter = 0
Call Usb_check_reset
some_variable = Usb_check_rx()
.
.
.
loop

2) check the attachment I get a compilation error when using opollas original usb setup from the hid keyboard. Can someone who knows about USB please explain what this constant is used for?
If I get that correctly that array should only be called if the constant is existing (maybe a bug??)
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Tue Feb 12, 2013 8:19 am    Post subject: Reply with quote

what bascom version are you using? this works only 2.0.7.6 and up!
_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Tue Feb 12, 2013 11:14 am    Post subject: Reply with quote

Hi Iam using 2.076, I unfortunately updated befor reading this here Sad

After adding Const _usb_Endp3Addr = 2
the code is compiled, but my PC still does not recognize.

I basically kept the schematics, only changed point is a 3V line regulator, which i added.

I also tried swapping D+/D- (in case i made some mistake)

I cannot see why the program wont work Sad Maybe someone with swusb experience can have a look?
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Tue Feb 12, 2013 11:26 am    Post subject: Reply with quote

did you use the new files from previous page (Array corrected)?
_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Tue Feb 12, 2013 11:45 am    Post subject: Reply with quote

Yes I used them,

I did not have the declarations and routines before - on opolla's page for example the hid keyboard is only one file.


Before that I had tried exchanging the array txstate.... but it also didnt work
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Tue Feb 12, 2013 12:50 pm    Post subject: Reply with quote

DAMN,

forget what I said.

It was a hardware problem. The crystal did not oscillate.
Why on earth didnt I get an errot message from the programmer?


73 de dl3seh
Back to top
View user's profile
six1

Bascom Expert



Joined: 27 Feb 2009
Posts: 553

germany.gif
PostPosted: Tue Feb 12, 2013 1:03 pm    Post subject: Reply with quote

Laughing because this is life...
_________________
For technical reasons, the signature is on the back of this message.
Back to top
View user's profile
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Tue Feb 12, 2013 1:04 pm    Post subject: Reply with quote

yes shit like that always happens to me Smile

Thanks for the updated sourcecode, anyway
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Wed Feb 13, 2013 4:39 pm    Post subject: Reply with quote

Sebastian.Heyn wrote:
DAMN,

forget what I said.

It was a hardware problem. The crystal did not oscillate.
Why on earth didnt I get an errot message from the programmer?


73 de dl3seh


because the internal oscillator was probably working. with the external osc. selected, and without good crystal you can not program!

_________________
Mark
Back to top
View user's profile Visit poster's website
Sebastian.Heyn

Bascom Member



Joined: 13 Apr 2005
Posts: 86

PostPosted: Wed Feb 13, 2013 5:31 pm    Post subject: Reply with quote

I was not blaming bascom for this, as I use the stk500.exe (avr isp mk2) Smile

I would never complain about bascom as it helped me so often not to use asm or c Smile (sometimes you have to use asm, but thats fine)


One Question:

Can I get it to act like 3 usb devices at the same time? I want it to be able to send 16 Key pushes simultaneously, but each usb hid keyboard can only push 6 keys at the same time.
If thats not possible, i need to process the 16 inputs seperately and make the program prioritize which buttons to use...
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Wed Feb 27, 2013 5:37 pm    Post subject: Reply with quote

Mr.Ollopa how can I add this strings to library?:
Code:

Period_number=8
COMPARE1A=Last_period
TIMER1=Shift_delay
 

Last_period & Shift_delay are constants.
It needs to synchronize with 8ms USB packets.
Back to top
View user's profile
ollopa

Bascom Member



Joined: 03 Sep 2007
Posts: 233
Location: California

usa.gif
PostPosted: Thu Feb 28, 2013 3:10 am    Post subject: Reply with quote

Mrshilov wrote:
Mr.Ollopa how can I add this strings to library?:
Code:

Period_number=8
COMPARE1A=Last_period
TIMER1=Shift_delay
 

Last_period & Shift_delay are constants.
It needs to synchronize with 8ms USB packets.


What are you trying to do?
Back to top
View user's profile
Mrshilov

Bascom LCD Guru



Joined: 24 Jan 2009
Posts: 314
Location: Russia

russia.gif
PostPosted: Thu Feb 28, 2013 4:55 am    Post subject: Reply with quote

It's a 18-LEDs Light Music Unit with 256-bit PWM: http://lightportal.at.ua/publ/kombinirovannye/koshachij_glaz_4_versija/11-1-0-64 (sorry, site is only in Russian, but program multilingual)
It works fine, I synchronize PWM with USB (to avoid interrupt conflict) in main circle after receiving packets with this three strings. But without this packets synchronization lost and interrupts conflict occurs, therefore I must disable PWM. Also it disable at the start.
However, without incoming data, every 8ms happens INT0 from USB. It will be fine to synchronize within library, independently of incoming data. This will allow to add Background Running LEDs effects in this unit and make more serious projects.
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 ... , 20, 21, 22  Next
Page 21 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