• 0
cyclemat

Lwclone On Arduino Mega 2560

Question

Here comes the LWClone on Arduino MEGA 2560

 

How to Compile

Windows Prerequisites

On Windows, you will need a copy of the latest Atmel Toolchain, either downloaded 
and installed as a standalone package, or installed as part of Atmel Studio. 
You will need to ensure that the "bin" directory of the toolchain is available 
in your system's PATH environment variable.

In addition, you will need to install a ported version of the ZSH or BASH *nix shells, 
and a standard set of *nix utilities such as cut, find and sed. 
These can be found in the "basic" system package of the of the MinGW installer (http://www.mingw.org). 
Once installed, add the "msys\1.0\bin" of the MinGW installation folder is added 
to your system's PATH environment variable.

The bootloaders currently also require the "bc" application, 
which can be installed from http://gnuwin32.sourceforge.net/downlinks/bc.php. 
Once installed add the "GnuWin32\bin" path of the GnuWin32 installation folder 
to your system's PATH environment variable.

Linux Prerequisites

On Linux systems you will need to install the latest Linux distribution 
of the standalone Atmel Toolchain from the Atmel website for general development, 
or use the latest avr-libc and avr-gcc packages for your chosen distribution's package 
manager. For full device support, the Atmel standalone package is recommended.

How 2 Flash

Connect your Arduino to USB and look witch comport it has
Start Flash Main Chip Arduino Mega to LW.bat
enter your Comport e.g com2 or com32 what ever
Remove USB
Connect your USBASP to the ISP header behind the USB port
Start Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to LW.bat
Connect The USB port wait for reorgination the Device 
Start Change ArduLW ID.bat
Enter your LEDWIZ ID e.g. 1 or 2 up to 16
That is it test it with Visualpinball an Pinmame/DOF

 have make New packages 23.01.2016

 

https://mega.nz/#F!bdZHVaxK!3WmePgTED-3xQp8oj-ZfOA

 

one package with inverted LED ports so that High ist normal and low is on ( for the Relaisboards from ebay)

 

 

For Boards that say it gives problems with The STK500 Timeout Error Here ist a Short way to fix it !?!?

 

 

1. Connect the USBASP to the ISP connector behind the USB Port.

2.Start the  "0. Flash 8u2 - 16u2 Arduino Mega - with USBASP Dongle to Arduino.bat"

 

3. Connect the USBASP to the Second ISP port

4. Start the "Flash m2560 Unlock fuses, erase, verify - with USBASP Dongle.bat"

5. Start the "Flash m2560 Write the bootloader, set the lock fuse, verify  - with USBASP Dongle.bat"

 

 

Now you can flash it normaly

 

when the flash with the USB ASP didnt work test to bridge the GND point on the 10->6 Pole Converter

 

FOR HELP PLEASE POST YOUR PINMAP.H AS CODE AND WHEN YOU HAVE COMPILING PROBLEMS POST YOUR OUTPUT AS CODE SO I CAN BETTER

HELP

 

So have make a little Video tutorial don`t say anything about my english have do my best.

 

 

 

 

 

Share this post


Link to post

159 answers to this question

  • 0

Big Thx for sharing this :)

I was trying myself to find a way how to connect my mega to DOF but it´s a way to hard for me with my very limited coding skills so i really appreciate this one.

I downloaded the first Version from earlier today and managed to get it on my ardu and it seems to work fine.

So now i downloaded the new Version and try it later or is there no diff between the hex files and only an install bat + arduino soft added ? 

Another question is are you planning to release the source so that we can create the hex ourself´s and have the possibility to change the ID and the Portmapping ?

thanks for your great work and keep the balls rollin :)

 

 

Share this post


Link to post
  • 0

it the same as the first release i have make it easyier to flash the file with the batch file.

 

Next Step

we want to add a controller interface to the rest of the Digital pins and we would to create a firmware that can handle all ports for WS2801 chip leds and i would create an driver board ! 

Share this post


Link to post
  • 0

it the same as the first release i have make it easyier to flash the file with the batch file.

 

Next Step

we want to add a controller interface to the rest of the Digital pins and we would to create a firmware that can handle all ports for WS2801 chip leds and i would create an driver board ! 

ah nice to know so forget my question for the source ^^ when you planning to use the rest of the IO Pins i don´t have to remap the given ones i only have to solder my wiring a bit as i´m using other ports before. 

Also nice to see that you included a softpwm so that pwm control not only could used on the real pwm ports. 

Hope my China Order will arrive soon so that i can build the rest (currently it´s all on a breadboard ^^) and really looking forward to upcoming releases of your Code.

thanks again and keep your great work up :)

Share this post


Link to post
  • 0
 
Hello,
It's great it works very well.
A small question, is it possible to use the outputs from 22 to 53, rather than the other outputs?
Again thank you for your work.
:D

Share this post


Link to post
  • 0

you can change it in the source code but in the next update it comes with controlling functions and i would to use the real PWM outputs !

Share this post


Link to post
  • 0

Hello I know how to build the firmware for the atmega 16u2 but I dont know where to change to get another ID.

The original hex works but having only ID 4 makes my vptables crash.

Share this post


Link to post
  • 0

have you downloaded the update from the 30.11 ? there is an ID changer in the package open Commandline go to the folder and start the lwcconfig.exe

 

"lwcconfig -p 1"

 

for ID 1

Share this post


Link to post
  • 0

Thanks you are the man I had two downloads and none had the ID- changer but I downloaded again and there it was.....

Thank you

Share this post


Link to post
  • 0

so we added key sopport to the git 

 

next step WS 2801 IC support please help us and support the Project

 

Paypal: ardulw@googlemail.com

Share this post


Link to post
  • 0
Hi Cyclemat!

My Arduino Mega 2560 has the Atmega 16u2, has a 2560 16AU Atmega 1332.

This Atmega worth me for this? 

Share this post


Link to post
  • 0
Forget everything I said above, I'm half the fool in this Electronic :unsure: .

 

My problem is I can not put into DFU mode the Arduino mega r3, followed several tutorials and no way, any suggestions.

Share this post


Link to post
  • 0

show on my commits buy an USBASP Dongle/flasher und mnake it Direct  ebay helps search USB ASP 6 pol .

 

 

 

io have batch files for this method in my dropbox file !

 

 

you have a china clone without dfu bootloader

Share this post


Link to post
  • 0
Today I get the USBASP you buy, but do not know how to connect and has 10 pin arduino only 6 ..

I somehow could lead to program the 16u2.

 

I apologize .. but again I know nothing about electronics.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now