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. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    My Rudder pedals circuit works!

    Hi Frakk,

    Thanks for the encouragement, but my post above with the little .gif of the men drinking together :cheers: was meant to indicate that I have successfully completed the rudder circuit and it appears to work just fine.

    :cheers: :blush: :yes: :cheers:

    Salute,
    George.
  2. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    SVMapper

    Hi Sokol,

    With SVMapper, can I make a .bat file which goes something like:
    F:\Program Files\svmapper\SV Mapper.exe RedBaronSP.ini

    SVMapper loads successfully but it is ALWAYS with whatever the last ini file was. The only way to change to another ini file is to manually open SVMapper, open another ini file, close SVMapper and then re-open SV Mapper.

    That doesn't seem right to me.

    What am I doing wrong?

    Regards,
    George.

    P.S. Apparently I can use Autohotkey to do this:
    Run, LocationOfSVMapper.exe YourIniFileHere.ini ;open ini file with SVMapper
    so I should be able to do it with a .bat file or in a Run window
  3. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    dnlk did you get the error after you set the fuse bits? Everything was working fine before right? Do you have the 12MHz crystal in the circuit with the capacitors? Double check to connect them to the right pins. I ran into the same problem numerous times mis-programming the clock source fuses.

    George I know you did it and it all works great, and that's why I congratulated you. For me appears to work just fine is not enough, I have to know it really does what I want :D You can make a copy of your SVMapper shortcut, renam it to SVMapper RedBarron, then modify the Target with the ini file. That should do the trick.
  4. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    My most common mistake with Device missing or unknown device -24 error, was forgetting to use power supply to the ATmega16 (+5V and GND).

    Do make your self a serial programmer, following this PCB (you don't have to make a PCB, you can just follow it): download/file.php?id=3647. Printer ports may cause problems sometimes. They may have to be set on a specific mode through BIOS to operate, and are more prone to have 'noise' problems.
  5. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    SVMapper store last profile used in conf.ini.

    Think that better is make a copy to use only with Red Baron, as Frakk suggest.

    Sokol1
  6. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    OK, I made a serial programmer, same result. I am thinking it is a problem with the crystal. I did notice that in my PCB design, the caps were before the crystal, instead of after as per the schematic. Don't know if this is a problem, I see in Mindaugas' PCB he has the cap before the crystal on one pin, and after on the other. I did rearrange some parts to make the crystal before the caps, but same result.

    Is there a way to hard reset the chip? If not, any recommendations on what else to try.

    BTW, the crystal that I got, is a short one, not sure if that matters. it isn't the typical 3/4 or so that you usually see. this one is prob 3/16 tall.

    Thanks in advance for the help.

    DNLK
  7. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    I just did some more checking, and found some troubleshooting tips. Apparently, I should see a square wave on pin 13 when powered up. I am not seeing this, it appears that I have about .8 v DC on both the xtal pins.

    I happen to have a 4mhz crystal, so I tried it out to see if I could get an waveform, but I still only appear to get just under .8v DC (slightly less than with the 12mhz).

    Any ideas why I am not getting an waveform? something I should check in my layout?
  8. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    It doesn't matter where you put the caps, as long as they connect XTAL1 and XTAL2 to GND. No difference between the tall and short packages either. I assume you are powering the device, your parallel and/or serial programmers work as they should, and you are following instructions closely.

    Are you trying to measure a square wave with a DC Voltmeter? That just won't happen, a square wave is not DC. Only way to measure is with an oscilloscope or a frequency counter. Post your layout and any additional information that might help.
  9. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    Probably the crystal is locked in 1 MHZ, due remove LP1 cable before USB cable (power source) after programing.

    A friend unlock one ATMEGA16 using one hibrid oscilator:

    http://mobiledevdesign.com/hardware_des ... or-092806/
    http://www.cerne-tec.com.br/osciladorhibrido.jpeg

    He did (Google translation):

    I see another cases of locked clock due remove cables in inverse order.
    In Mindaugas page no one alert about this.

    Sokol1
  10. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Thanks for the replies. I am at work, so I can't try anything at the moment, but I have got a few ideas.

    I was measuring for the square wave with a scope.

    On my initial programming I may have removed the LPT cable before the USB, didn't know it mattered till I started digging around to find some answers.

    I have a function generator I can hopefully use to provide a clock and get back into the programming. Let me know it this should work, here is what I am thinking. Remove the crystal from the circuit, and probe pin 13 with the function generator. Do i need the ground side of the function generator.

    I will try to post my layout tonight if I have time.

    Thanks again for any advice.
  11. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    One more question, is there a certain type capacitor I should be using?
  12. Sokol1

    Sokol1 Member

    Joined:
    Jul 6, 2009
    Messages:
    126
    Balance:
    14Coins
    Ratings:
    +1 / 1 / -1
    10uFx16v is polarized electrolytic
    0.1uf and 15pF is ceramic

    Sokol1
  13. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    That might be part of my prob...I only had Tantalum for the 15pf and .1uf. I'll dig around work here, I am sure we have some ceramics.
  14. NuMcA_[.gr]

    NuMcA_[.gr] New Member

    Joined:
    Jul 12, 2009
    Messages:
    66
    Balance:
    3Coins
    Ratings:
    +0 / 0 / -0
    If you have accidentally locked the ATmega16, it has been said that it can be unlocked with a serial programmer. Look into this if you find out it is locked..
  15. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    It is probably not locked, only the clock-source could be missing. Connect the function generator to XTAL1, pin 13, set it to 1MHz or more. Make sure you don't go over 5V peak on it. See if the programmer works then with the uC powered up.
  16. dnlk21

    dnlk21 New Member

    Joined:
    Dec 7, 2009
    Messages:
    8
    Balance:
    0Coins
    Ratings:
    +0 / 0 / -0
    Thanks to all that gave me advice on what to check. It turned out the caps I was using were the problem. Put in a pair of 15pF ceramics, plugged in the USB, and it worked. I didn't even have to reprogram it.

    I did smoke a pot while testing...I saw some discussion about that previously in the forum, will have to look back at it.

    Thanks again. I will try to keep on eye on this forum in the future, maybe I'll get a chance to give back when someone else is having a problem.

    DNLK
  17. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    Nice to hear dnlk! And it is also nice to find out about these problems and solutions as we go.

    You either used too small value pot if it burned out over a period of time, or you connected the wiper across the supply if it went out when turned it to one extreme. I recommend 10K pots, they are a lot smoother than 47K or 100K (reduced noise and spikes) and still consume very little power (0.5mA). Connect Vcc to one end, Gnd to the other, and make sure the wiper is connected to the input of the IC.
  18. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    SVMapper Help again.

    Hello again, Gentlemen,

    SVMapper Help:

    In Over Flanders' Fields (which is a Microsoft Combat Flight Sim 3 based game):

    I would like to map buttons 38 and 40 (i.e. outside of Windows XP's recognized 32 buttons) to ] and [ (zoom in and zoom out respectively).

    I would like them to repeat slowly while I hold the button down.

    :?
    All I can get is:
    a) a complete string of 50 * [[[[[[[[[[[[[[[[ etc. using repeat
    b) a single [ or ] by using the Continuous set to yes.

    Is there anything else I should be trying? (Unfortunately, Autohotkeys does not recognize these buttons even with SVMapper on, because I can make AHK do this for other buttons.)

    With thanks,
    George.
  19. Sokol1

    Sokol1 Member

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

    In IL-2 I use SVMapper do manual landing gear automation (F-4F and i16), this require 52 key press to lover or raise gear.

    In SVMapper I put a Key, ie. [ (one time only) and in repeat box I put 52.
    Adjusting delay I can synchronize gear movement to cockpit crank animation.

    Continuous hold key pressed, ie. PTT in Teamspeak.

    Sokol1
  20. GeorgeBoles

    GeorgeBoles Member

    Joined:
    Apr 27, 2009
    Messages:
    66
    Balance:
    4Coins
    Ratings:
    +2 / 1 / -2
    SVMapper: I do not understand

    Hi Sokol,

    Now I understand why you have the 51 extra button pushes! :)

    But in CFS3 (or OVer Flanders Fields), if I push the keyboard character ] the view zooms in for as long as I push the button.

    With SVMapper, using Button 38 (for example), mapped to the ] key, I only get one zoom per button push. Setting the Continuous option to Yes appears to have no effect.

    Regards,
    George.