I believe that Gecko has a mach3.XML file that will have all the correct ports and pins already assigned.
Actually, it's right here:
http://www.geckodrive.com/support/ap...-xml-file.html
download that and stick it in your mach3 folder and you'll see the "540B" as an option in the profile load window. That should get you started in the correct direction.