Hello VDJ Community!
I am currently working on a personal project, it is about a HID controller for VDJ using Atmega16. I have the project almost finished but i have a problem with Pots resolution. Im using 10 bits ADC so max possible value is 1023 but i cant map values higher than 255. I tried everything on VDJPedia.
I designed it as a 8 Axes and 16 Buttons Joystick. Working fine.
My HID report is:
Byte 0: First 8 bits of ADC 0.
Byte 1: Two remaining bits of ADC 0 + Padding with zeros.
.
.
.
Byte 14: First 8 bits of ADC 7.
Byte 15: Two remaining bits of ADC 0 + Padding with zeros.
Byte 16: Buttons row 1 - 8.
Byte 17: Buttons row 9 - 16.
Sintax im using in XML File:
<slider byte="0" nbbits="16" max="1023" name="VOLUME" deck="1" />
<slider byte="2" nbbits="16" max="1023" name="VOLUME" deck="2" />
Any help would be nice. Thank you.
I am currently working on a personal project, it is about a HID controller for VDJ using Atmega16. I have the project almost finished but i have a problem with Pots resolution. Im using 10 bits ADC so max possible value is 1023 but i cant map values higher than 255. I tried everything on VDJPedia.
I designed it as a 8 Axes and 16 Buttons Joystick. Working fine.
My HID report is:
Byte 0: First 8 bits of ADC 0.
Byte 1: Two remaining bits of ADC 0 + Padding with zeros.
.
.
.
Byte 14: First 8 bits of ADC 7.
Byte 15: Two remaining bits of ADC 0 + Padding with zeros.
Byte 16: Buttons row 1 - 8.
Byte 17: Buttons row 9 - 16.
Sintax im using in XML File:
<slider byte="0" nbbits="16" max="1023" name="VOLUME" deck="1" />
<slider byte="2" nbbits="16" max="1023" name="VOLUME" deck="2" />
Any help would be nice. Thank you.
Mensajes Mon 15 Aug 11 @ 3:45 pm
Ok, you give the info for Bytes 0 and 1 but then show definition for 0 and 2 ?
So what is Byte 2 being used for on your controller?
So what is Byte 2 being used for on your controller?
Mensajes Mon 15 Aug 11 @ 5:22 pm
Hello again.
Thank you for your answer, and excuse me for my delay in reply.
Here is a detailed report of my device:
-----------------------------------------------------------------------------------------------------------------------
BYTE 0 | BYTE1 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 0 (first 8 bits) | ADC channel 0 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
BYTE 2 | BYTE3 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 1 (first 8 bits) | ADC channel 1 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
BYTE 4 | BYTE5 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 2 (first 8 bits) | ADC channel 2 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
What firmware does is sending 16 bits for each analog axis padding with zeros to complete two bytes of data for valid HID report.
what i was expecting here is telling VDj where to start and how long is data. Start on byte 0 and keep reading 16 bits expecting a max of 1023. Then go to byte 2 and do the same for second slider.
<slider byte="0" nbbits="16" max="1023" name="VOLUME" deck="1" />
<slider byte="2" nbbits="16" max="1023" name="VOLUME" deck="2" />
VDj is dropping the second byte of data, only reads values from 0 to 255.
Appreciate your help. Thank you.
Thank you for your answer, and excuse me for my delay in reply.
Here is a detailed report of my device:
-----------------------------------------------------------------------------------------------------------------------
BYTE 0 | BYTE1 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 0 (first 8 bits) | ADC channel 0 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
BYTE 2 | BYTE3 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 1 (first 8 bits) | ADC channel 1 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------
BYTE 4 | BYTE5 |
-----------------------------------------------------------------------------------------------------------------------
ADC channel 2 (first 8 bits) | ADC channel 2 (last 2 bits + padding to complete byte) |
-----------------------------------------------------------------------------------------------------------------------
What firmware does is sending 16 bits for each analog axis padding with zeros to complete two bytes of data for valid HID report.
what i was expecting here is telling VDj where to start and how long is data. Start on byte 0 and keep reading 16 bits expecting a max of 1023. Then go to byte 2 and do the same for second slider.
<slider byte="0" nbbits="16" max="1023" name="VOLUME" deck="1" />
<slider byte="2" nbbits="16" max="1023" name="VOLUME" deck="2" />
VDj is dropping the second byte of data, only reads values from 0 to 255.
Appreciate your help. Thank you.
Mensajes Mon 22 Aug 11 @ 5:37 pm