View previous topic :: View next topic |
Author |
Message |
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Fri Feb 08, 2013 2:40 pm Post subject: |
|
|
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
thanks for your work!
best michael _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Mon Feb 11, 2013 10:19 am Post subject: |
|
|
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 |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Mon Feb 11, 2013 5:14 pm Post subject: |
|
|
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 |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Tue Feb 12, 2013 8:19 am Post subject: |
|
|
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 |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Tue Feb 12, 2013 11:14 am Post subject: |
|
|
Hi Iam using 2.076, I unfortunately updated befor reading this here
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 Maybe someone with swusb experience can have a look? |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Tue Feb 12, 2013 11:26 am Post subject: |
|
|
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 |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Tue Feb 12, 2013 11:45 am Post subject: |
|
|
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 |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Tue Feb 12, 2013 12:50 pm Post subject: |
|
|
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 |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Tue Feb 12, 2013 1:03 pm Post subject: |
|
|
because this is life... _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Tue Feb 12, 2013 1:04 pm Post subject: |
|
|
yes shit like that always happens to me
Thanks for the updated sourcecode, anyway |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Wed Feb 13, 2013 4:39 pm Post subject: |
|
|
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 |
|
|
Sebastian.Heyn
Joined: 13 Apr 2005 Posts: 86
|
Posted: Wed Feb 13, 2013 5:31 pm Post subject: |
|
|
I was not blaming bascom for this, as I use the stk500.exe (avr isp mk2)
I would never complain about bascom as it helped me so often not to use asm or c (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 |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Wed Feb 27, 2013 5:37 pm Post subject: |
|
|
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 |
|
|
ollopa
Joined: 03 Sep 2007 Posts: 233 Location: California
|
Posted: Thu Feb 28, 2013 3:10 am Post subject: |
|
|
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 |
|
|
Mrshilov
Joined: 24 Jan 2009 Posts: 314 Location: Russia
|
Posted: Thu Feb 28, 2013 4:55 am Post subject: |
|
|
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 |
|
|
|