1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Tutorial Mjoy16 USB AVR Joystick

Discussion in 'DIY peripherals' started by tronicgr, Jan 3, 2008.

  1. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Sokol1,

    I find your explanation about PIC based Joy.01 is really very interesting.
    But here atmega16 is around US$4.5 and PIC18F2550 is US$13.

    And can I use the same mj16 parallel programer w/ponyprog? or I have to make a different PIC programmer?
    If I have to. it also means more work to do.

    How significant is the responsiveness of mjoy16 (30Mhz) compared to PIC based Joy.0(200Mhz)?
    Can you really feel the difference?

    Since I am thinking of making a new usb controller, I find PIC based Joy.0 very tempting. ;P
    What do you think?
    Is the higher cost justified?
    And the more work?


    About renaming mjoy16:
    I have tried write(flash) several times, but it does not work.
    here are my steps:
    1. command > read(flash) the mjoy16 using ponyprog 2.07c beta.
    2. edit > edit buffer enabled
    3. edit 004000 with the name I want, I try MJ17
    4D = M
    4A = J
    31 = 1
    37 = 7
    4. command > write (flash)
    5. then I exit ponyprog.

    However, when I restart ponyprog, then read(flash) again,
    I find 004000 always goes back to FF FF FF FF.
    What is wrong here?
  2. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    No, PIC require appropriated program an programmer, for DIY are the relative simple do build JDM/JD2 - see links in previous page.

    In spite I have the two types, Mjoys and PIC based controller - in this case the famous BU0836 - I dont made a rigorous comparative test. And nome of my Mjoys use all/axis buttons possible to lower this operating frequency to 30MHZ.

    In Russian foruns the guys make comparatives and say that is like move from Gaz2705 Gazelle car to BMW E39M5... Well, I dont know none of these cars... :D


    I think that depend of the use you pretend.
    For something like X-plane, FS/FSX. No.
    For IL-2, Rise of Fligh, racing sim, Yes.

    Is just this. See: http://jarrod.elektroda.eu/index.php?page=mjoy-16

    After write new flash you unplug and plug again Mjoy16?

    Sokol1
  3. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Gaz2705 Gazelle car to BMW E39M5? :?
    well, I also do not know these cars, so I do some googling,
    and here is the result:
    http://www.flickr.com/photos/44400809@N07/4713534295/
    http://www.ultimatecarpage.com/car/54/BMW-E39-M5.html
    if this is true, this is very bad, :D
    I do not think that the difference is that much. :lol:


    yes, I do.
    and 004000 always goes back to FF FF FF FF.
    Do you know what is wrong here?
    I do not write the vendor ID and product ID.
    Do I have rewrite them too?
    Please advise.


    Since this is a thread about mjoy,
    I think we should discuss Joy.01 on willynovi thread.
    Please meet me there.
  4. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta,

    Try with Mjoy8_Mercury with 4 axis/20 buttons/HAT, this theoretically work at 120 MHZ.
    And implement in this Servio changes.

    No necessary, only you desire change the order of Mjoy appear in Windows Control Panel, typically is show at first device. Changing Vendor ID for high number Mjoy appear after another controller.

    In one case I have a Suncom HOTAS with BU0836 and Rudder Pedal with Mjoy8_Mercury (3 axis).
    In simulator like IL-2 this cause problem, dont allow adjust joystick curves in game setup, since only pedal is show. So I change Mjoy8_Mercury Vendor ID to high number.

    Sokol1
  5. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Sokol1,

    if I use mjoy16 only for the same 4 axis/20 buttons/HAT,
    does it also theoretically work at 120 MHZ? or higher since it is atmega16?

    should I put a jumper between input and grd for every unused axis?
    will it fasten the clock speed?

    and about the vendor ID and product ID, can I put any number?
    and according to the manual it is on reverse order?
  6. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta,

    This line of game controllers is based in ATMEGA microcontrolers (8 I think). ;)

    http://www.gametrix.ru/

    Instead potentiometers they use MaRS (magnetoresitor) in main axis.

    About Mjoy operation frequency - from spread-wings.ru

    Notice that Mjoy16 probably due ability to handle more axis and buttons work at lower frequency.

    Program to check - Joy Frequency Meter:
    http://mercury13.tut.su/?q=soft_freqmeter

    This PIC (18F2550) based USB 2.0 controller work at ~ 200Hz:
    http://spread-wings.ru/phorum/index.php ... 9042&st=80

    Use jumper to ground unused axis reduce noise pick (trembles) by these axis. I think that dont increase frequency speed...

    Put higher number than current (0777), ie 0888.
    Yes, put (in hexadecimal) 8880 and not 0888...
    Well, not sure about this, I did by trial and error. :D

    Sokol1
  7. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    there is 12 bit version on that page,
    is this also by willynovi?

    how many mS lag is 200Hz? 5mS?

    about MaRS,
    is there a DIY kit available?
  8. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Tirta,

    RedBaron USB 2.0 controller is not related with Joy.01, but both use PIC 18Fxxxx.

    This is not a freeware project since the sold assembled board. I think that have a 4 axis 12 buttons firmware version in topic.

    I dont know kit for MaRS - RedBaron and GLV0224 sold assembled versions for ~ 10 Euros,
    But in AviaForum are available electric circuits and PCB to build one. Is simple, the sensor, amplifier and some resistor and condenser.

    In use MaRS show similar precision to DIY HALL assembly, but is more easy to setup.
    Links about: http://avia-sim.ru/forum/viewtopic.php?t=481&start=0

    Sokol1
  9. tirta

    tirta Member

    Joined:
    Feb 4, 2010
    Messages:
    56
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Hi Sokol1,

    Thanks for all the replies. :thbup:
    It really broadens my knowledge about DIY hotas.

    I build a new mjoy16.
    However, when I test it, first it works fine, but after 1-2 minutes, it is gone, window can not detect it.
    But if I unplug then plug it again, windows can detect it again for another 1-2 minutes and then it is gone again. :?

    Does anyone ever have similar problem?
    Please let me know how to fix this.
  10. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
  11. chandran

    chandran New Member

    Joined:
    Jul 18, 2009
    Messages:
    4
    Balance:
    364Coins
    Ratings:
    +0 / 0 / -0
    Dear Sokol1

    Is it possible to use a usb avr programmer for mjoy16? or any other s/w extreme burner - AVR

    WILL IT WORK AND WHAT ARE THE CHANCES? awaiting your reply

    regards
    chandran
  12. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Chandran,

    I dont know if is possible write Mjoy firmware with USB programmer.
    I Sukhoi.forum someone say about modern motherboards USB ports not be
    able to provide 5V necessary tho this operation. Typically they provide 4,2...4,7V.
    Atmega8 and Atmega16 are old projects and maybe errors occur in the process.

    As an alternative to the LPT (eg, no more available in Laptops, modern motherboards) programmer you can use Serial one.

    Sokol1
  13. Jadran

    Jadran Member

    Joined:
    Sep 7, 2008
    Messages:
    44
    Occupation:
    Racing game:LFS,Simbin (Race07,GTREvo,RaceOn)
    Location:
    Osijek,Croatia
    Balance:
    3,207Coins
    Ratings:
    +7 / 0 / -0
    Hi all!

    I made a PCB MJoy16-C1 and I have a problem.

    [​IMG]
    [​IMG]
    [​IMG]




    All potentiometer work fine but none of the switch can not run (in control panel is everything is OK)
    [​IMG]
    [​IMG]




    Without jumper I get:

    [​IMG]
    [​IMG]




    When I put one jumper result is same:

    [​IMG]
    [​IMG]




    When I put two jumper result is:

    [​IMG]
    [​IMG]




    When I put two jumpers but different pin result is:

    [​IMG]
    [​IMG]




    When I put three jumpers result is:

    [​IMG]
    [​IMG]





    What should I do?

    THX

    p.s.
    SORRY for BIG pics
  14. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Hi Jadran,
    Try using Row A for your switches, it is the first row.
    You have used Row L which is used for the init button, mode and centre jumper and Hat switches.

    Matrix.pdf

    Senetor.
  15. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0
    Chandran,

    You can use the AMC Serial Programmer to program the Mjoy16, it is the same programmer that is on the AMC motor controller that THANOS designed.
    It works with Pony Prog, here are the files, you can use Sprint- Layout 5.0 to open the second file.

    AMC Serial Programmer.pdf
    AMC Serial Programmer 1.2mm.rar

    Senetor.
  16. Jadran

    Jadran Member

    Joined:
    Sep 7, 2008
    Messages:
    44
    Occupation:
    Racing game:LFS,Simbin (Race07,GTREvo,RaceOn)
    Location:
    Osijek,Croatia
    Balance:
    3,207Coins
    Ratings:
    +7 / 0 / -0
    Thanks guy,I will try!
  17. Jadran

    Jadran Member

    Joined:
    Sep 7, 2008
    Messages:
    44
    Occupation:
    Racing game:LFS,Simbin (Race07,GTREvo,RaceOn)
    Location:
    Osijek,Croatia
    Balance:
    3,207Coins
    Ratings:
    +7 / 0 / -0
    Hi!
    Without jumpers,pins (buttons) 1,2,7,8,9,10,15,16,17,18,23,24,25,26,,31 & 32 work OK.
    But pins 3,4,5,6,11,12,13,14,19,20,21,22,27,28,29 & 30 is ALWAYS ON - how to resolve this?

    p.s.
    For now I need only 24 buttons,2 potentiometer (e.k. dial & slider)
    Where can I find such a scheme PCB which works OK in case I do not fix the upper PCB?
  18. dj dicksy

    dj dicksy New Member

    Joined:
    Jun 2, 2009
    Messages:
    10
    Location:
    Romania/Bacau
    Balance:
    340Coins
    Ratings:
    +0 / 0 / -0
    I hope this could help you

    Attached Files:

  19. Jadran

    Jadran Member

    Joined:
    Sep 7, 2008
    Messages:
    44
    Occupation:
    Racing game:LFS,Simbin (Race07,GTREvo,RaceOn)
    Location:
    Osijek,Croatia
    Balance:
    3,207Coins
    Ratings:
    +7 / 0 / -0
    THX

    I will try to make one 8)
  20. Senetor

    Senetor Member

    Joined:
    Oct 23, 2008
    Messages:
    90
    Location:
    Australia
    Balance:
    594Coins
    Ratings:
    +1 / 0 / -0