1. 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!
  2. 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
  3. 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

I can not write the firmware on ATMEGA8535

Discussion in 'SimTools compatible interfaces' started by tonquites, May 7, 2011.

  1. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    Attach the second potentiometer to the ADC2 input right next to your first pot.
    FBch2 is short for FeedBack potentiometer on channel 2. The reason both pairs of LEDs are in unison is because of leakage between the floating ADC imputs. Once you attach the second pot you can control them independently, and more importantly, the game will also do so when the pot is set to #512 brake position, as I have explained to you already.

    R-eng
  2. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    Rookie!

    Look at the first and second picture...what is the difference???

    You should really pay attention to the device you use, especially the pinouts. From you picture here is what I observe. The LCD pcb is designed for pinouts with #1 on the left hand side, finishing with #14 near the right side. Your LCD is designed for pinouts with #14 on the left and #1 near the right; this is just the opposite. Then you assume [A, +] as VDD and [K, -] as VSS. But really, your whole wiring scheme is loved up.

    R-eng

    MGD1602B-FL-YBS-03 LCD.png
    pcb designed for LCD.png
    everton - wrong.png
    everton - right.png
  3. fermevc

    fermevc Member

    Joined:
    Jun 16, 2009
    Messages:
    126
    Occupation:
    Networking and telecomunication
    Location:
    Serbia
    Balance:
    5,907Coins
    Ratings:
    +38 / 0 / -0
    As we all thought, LCD wiring :)
    But I think that Frakk is right again (R/W should go to GND like in Rengs photo).
  4. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    Everton, here is your easy fix.

    Desolder the LCD, shift over 2 pins as shown, resolder, and hardwire the A, K from pcb to LCD...then all should be right.

    R-eng

    Parallel_LCD_sprint_combined.png

    everrton easy fix.jpg
  5. tonquites

    tonquites Member

    Joined:
    Jul 24, 2009
    Messages:
    42
    Location:
    Joinville, Brasil
    Balance:
    280Coins
    Ratings:
    +0 / 0 / -0
    R-eng, many thanks. :yippiee: :yippiee: :yippiee: :yippiee: yippieeeeeeeeeeeeeeeeeeeeeee :clap: :rofl: :rofl: :rofl:


    With this new connection wires fixed the problem. :eek:

    LCD_OK.jpg

    sistema_OK.jpg

    I managed to change the four sets of numbers from the first row. :lol:

    With potentiometers could trigger the two numbers on the right, pot1 0 to 1023 and Pot2 0 through 1023.
    With the Force-Profiler could trigger the two numbers on the left, axis1 0 to 255 and axis2 0 to 255.

    link_OK.jpg


    The next step would be to test the game rFactor, following their instructions ...

    Sorry for my many questions, as I said I'm new (noob, rookie, beginner) in electronics and have a great difficulty with many datasheets, I'm doing my best and thank you immensely for the help you have given me. May God bless you all.
    Really want to build this simulator and I know I can!


    Agradeço imensamente a todos vocês, R-eng, fermevc, rafael_design, reese, Frakk, pippo978 um caloroso abraço e novamente obrigado pela atenção a mim dispensada! Que Deus vos abençoem.
    Everton
  6. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @Everton, I told you that you were close. With those test LEDs you don't need an LCD, H-bridge, or motors to see if the AMC is functioning properly; You got to like that!

    ...but those pots are crap. Best to use conductive plastic type and not carbon based. They will be much smoother, more precise resolution, and last 10-100X longer for not much more money.

    I am hijacking your thread for a question I have, for anyone.

    I just began using USB2Ser converter and after much grief with drivers, I got my cable working with X-sim and the AMC, even hyperterminal. Ponyprog not so lucky. grrrr. Many times in this forum people have mentioned setting the serial printer option in Device Manager>Advanced tab. I run WinXP Home and Pro on 4 of my PCs, and not one of them has this come up when I open the advanced tab (provided in manual for Prolific driver for XP).

    adv sets miss.png

    Where The F**k is this???
    All I ever get is this,

    adv usb tab xp.PNG

    Is this a Win7 thing? WTF?

    R-eng
  7. bvillersjr

    bvillersjr Active Member

    Joined:
    Oct 11, 2008
    Messages:
    1,174
    Location:
    Ohio, USA
    Balance:
    437Coins
    Ratings:
    +21 / 1 / -0
    Tronic always recommended the serial printer option, but this was for the chips that came with their own drivers. The ATEN do not. They use the standard windows drivers. I have a couple of full / half-duplex ATEN adapters here in my scrap heap if anyone is interested. They were the very first adapter I tried, so I think it would be a 2008 or 2009 model. I'm not sure if there were any improvements since then, but based on your screenshot of the standard windows Serial POrt driver, I would guess not.
  8. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    Thanks Bernard. I was thinking this may be with the driver, but the driver I used (latest one from 2009) also provided this manual image out-take, and yet it did not appear under Advanced tab. And yes, it is the ATEN device repackaged by IOGear. I mean it works fine except with Ponyprog, but that is probably another issue.
  9. bvillersjr

    bvillersjr Active Member

    Joined:
    Oct 11, 2008
    Messages:
    1,174
    Location:
    Ohio, USA
    Balance:
    437Coins
    Ratings:
    +21 / 1 / -0
    Maybe the 2009 driver isn't Windows 7 compliant, so you get stuck with the standard Windows driver. BTW, I could have sworn that your original post said ATAN. Now it says Prolific ;)
  10. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    I always use FTDI based USB2Serial adapters!!! Maximum compatibility (even in win7) and works with ponyprog too! Only the FTDI based adapters have that serial printer option!

    Thanos
  11. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
  12. tonquites

    tonquites Member

    Joined:
    Jul 24, 2009
    Messages:
    42
    Location:
    Joinville, Brasil
    Balance:
    280Coins
    Ratings:
    +0 / 0 / -0
    Thanos Hello, :hi:
    I would like to thank you for the wonderful design of the hardware AMC, and also thank all the developers of X-Sim software, which is unique. :thbup:

    :yippiee:

    What is USB2Serial?
    Can I use my AMC?
    This improves the performace of communication? :brows:

    Regards to all friends of the forum here :hi:
  13. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Since new computers don't have COM ports anymore you need this kind of adapter:
    http://www.digitus.info/en/products/acc ... or-usb-20/

    The performance is the same as the old COM ports, same speed 115Kbps.
    If you need the AMC to run faster disable the updating of numbers on LCD by turning off the DIP1 switch !!

    Thanos
  14. tonquites

    tonquites Member

    Joined:
    Jul 24, 2009
    Messages:
    42
    Location:
    Joinville, Brasil
    Balance:
    280Coins
    Ratings:
    +0 / 0 / -0
    Hello Friends developers. :hi:

    I run the game rFactor, linking the rFactor>Force-Sender>LAN>Force-Profiler>AMC>littletool the way the R-eng suggested to # 512 brake position of the potentiometers.

    What should happen? :?

    While the game run at my LCD kept the same numbers, 128, 128, 512, 512, all static, I believe that this was not what should happen.

    run_rFactor.jpg

    I think that because a large amount of plugins in my rFactor attempt failed!

    plugins.jpg

    Almost there, almost! :yippiee:

    Regards
    Everton
  15. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
  16. tonquites

    tonquites Member

    Joined:
    Jul 24, 2009
    Messages:
    42
    Location:
    Joinville, Brasil
    Balance:
    280Coins
    Ratings:
    +0 / 0 / -0
    Hello Friend R-eng,

    I see that the data are coming to Force_Profiler. This means that the rFactor, the plugin and Force_Sender and are doing their job. I think the problem is in my setup, I study the more X-Sim manual to find the cause.

    data.JPG

    I did the steps of your file attachments X-startup sequence.doc yes but could not change the values ​​of 128/128 to 127/127 and from what I read in your post that is very serious!

    What should happen with the little tool, while the rfactor work? The LEDs should turn on and off?

    Everton
  17. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    As I mentioned, each motor outputs LED pair will show either < 512, 512, or >512 values by lighting left, both, or right LED (ok if this is inverted). So if the Motor1 is set to Long-G. then one LED (constant light) is acceleration, both LED is constant speed, and other LED is deceleration. And if Motor2 outputs are set for Lateral-G, then one LED is left turn, both LED is straight, and other LED is right turn. The LEDs will not be changing until you see X-sim values changing on the LCD screen.

    Very important to see 127 when the race in rFactor is begun and before the car moves out of the garage.

    I suspect you have a setup problem in Profiler. Give me a screen capture of the output setup page, and also each motors subpage.

    BTW--recheck your serial connections you earlier had problems with.
  18. tonquites

    tonquites Member

    Joined:
    Jul 24, 2009
    Messages:
    42
    Location:
    Joinville, Brasil
    Balance:
    280Coins
    Ratings:
    +0 / 0 / -0
    Hello Friend R-eng, :hi: :D

    Yesterday, I was about 4 hours doing tests and only once got the 127/127, on the whole time was 128/128. :no:

    I found that by starting the game with the shortcut of rFactor is sending data to the Force-Profiler. Starting the game with Play does not send data to the Force-Profiler.

    Without_sending_data.jpg

    I made a video of tests yesterday with our little tool on and off the LEDs, Sender inputs: #25 and #26.

    Video of the little tool in action as the game rfactor run with AI.
    http://www.youtube.com/watch?v=IKf83D121Uc

    http://www.youtube.com/watch?v=2zyMxXe4qTY

    Here are the screenshots of Force-Profiler while the video was made
    01_input_setup.jpg
    See how the blue line varies little, very small fins waves. I believe there is something wrong! :?
    02_math_setup_axis1.jpg
    03_math_setup_axis2.jpg
    04_output_setup_USO.jpg
    05_calibration_setup.jpg
    06_interface_setup.jpg
    07_program_settings.jpg

    Here my configuration files
    Myprofiles.zip

    I hope this information is useful to find out what's wrong. :thbup:

    Regards
    Everton
  19. tronicgr

    tronicgr

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
    Did you try to start sending data and press the reset button on the AMC? Sometimes comports send junk characters that may fill the serial buffer.
  20. R-eng

    R-eng Member

    Joined:
    Aug 4, 2008
    Messages:
    141
    Location:
    San Diego, CA, USA
    Balance:
    28Coins
    Ratings:
    +0 / 0 / -0
    @Everton, you appear to want to run before you learn how to walk. You need to read some things first, because all of this is covered in the manual or in the forum.

    The video shows the LEDs functioning appropriately. If the LED pair on the left of the video are not responding well, it is only because it must be the vertical force you chose to use. The LEDs are responding in tune with the values on the LCD. If the math setup values are not correct, then it will output very small values as the graph shows.

    I could just provide you with a generic profile which would work well, but making you do the changes can hopefully reinforce proper setup decisions. For starters, remove version 2.1.x community and install 2.0.x. If you are not connected online to a server, community will give you headaches (perhaps $), and in my initial usage, damaged H-bridges due to mis-communication such as the 128/128 phenomenon.

    Set things up as I present here. It works for me!

    R-eng

    profiler01.jpg
    profiler02.jpg
    profiler03.jpg
    profiler04.jpg
    profiler05.jpg
    profiler06.jpg
    profiler07.jpg
    profiler08.jpg
    profiler09.jpg