DiyLightAnimation

Hardware => Lynx USB DMX Dongle => Topic started by: NavyGator on March 18, 2011,

Title: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 18, 2011,
Hi everyone. I just wanted to post how I programmed the PIC on the dongle and verified its operation for my first build. It took me a while to get everything together to make sure I did it correct.

I attached the document I made so it might hopefully help someone else.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: urthegman on March 18, 2011,
Thank you Rich, That was very nice of you to do that for all of us.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: inzeos on March 18, 2011,
Nicely compiled.  Might want to consider porting it to a WIKI article as well.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: deanathpc on March 19, 2011,
Excellent!  I could have used that 2 weeks ago! lol

Saved and printing it out now! :)

Thanks so much!

Dean
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 19, 2011,
I uploaded a new pdf with active hyperlinks.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: RJ on March 19, 2011,
Thanks lets see if we can get it into the wiki where it belongs. Right now the wiki is locked from edits since Rick is gone and we do not have our watch dog keeping the spammers at bay. But he will be back in a few days.

RJ
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 19, 2011,
You are not allowed to view links. Register or Login
Thanks lets see if we can get it into the wiki where it belongs. Right now the wiki is locked from edits since Rick is gone and we do not have our watch dog keeping the spammers at bay. But he will be back in a few days.

RJ

Sounds good. It should be able to help more people that way.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: kbowen on March 19, 2011,
Following the instruction. Seemed simple enough except I keep getting this message after importing the hex.
New firmware must be downloaded for PICkit3 to work with the part selected.
When I click ok i get unhandled exception occured with these details:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
Microchip.PICkit3.ProtocolException: Expected command echo 0x003F, but received 0x1024
   at Microchip.PICkit3.PK3Control.ReceiveCommandResponse(UInt32 Command, Byte[]& DataReceived)
   at Microchip.PICkit3.PK3Control.SendCommandWithDataAndResponse(UInt32 Command, Byte[] Data)
   at Microchip.PICkit3.PK3Control.SendCommandWithResponse(UInt32 Command)
   at Microchip.PICkit3.PK3Control.UpdateSystemStatus()
   at Microchip.PICkit3.PK3Control.GetFailures()
   at Microchip.PICkit3.PK3Control.ReceiveCommandResponse(UInt32 Command, Byte[]& DataReceived)
   at Microchip.PICkit3.PK3Control.SendCommandWithDataAndResponse(UInt32 Command, Byte[] Data)
   at Microchip.PICkit3.PK3Control.SendCommandWithData(UInt32 Command, Byte[] Data)
   at Microchip.PICkit3.PK3Control.SetPower(PowerOptions Options, Int32 Voltage)
   at Microchip.PICkit3.Program.SetVdd(Boolean TurnOn, Boolean HoldTargetReset, Int32 Voltage)
   at Microchip.PICkit3.FormPICkit3.SetTargetPower(Boolean TurnOn, Boolean HoldTargetReset, Int32 Voltage)
   at Microchip.PICkit3.FormPICkit3.SetTargetPower(Boolean TurnOn)
   at Microchip.PICkit3.FormPICkit3.memoryOperationComplete(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3615 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
PICkit 3
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files/Microchip/PICkit%203/PICkit%203.exe
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Looks like it may have done something , but I am not sure.


Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: chrisatpsu on March 19, 2011,
just to be sure...

are you using the breakout boards from J1Sys?

if so, are the jumpers set correctly according to the manual that comes with the set from him?

also, in the Pickit3 programmer utility, did you make sure that the correct PIC is showing from that drop down list?

ALSO, make sure you are using the correct board for the correct chip.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: kbowen on March 20, 2011,
Yes I got the kit from J1sys, I have set it up according to this info:
* Programming Lynx DMX Dongle v2.0.pdf  in first post in this thread.
I plugged it in & have a red led lighting. How do I test ?
Keep having error messages in Vixen. Do I need a controller hooked up ? Or can I test somehow without the controller ? In device manager I have USB serial port (com4) & verified driver is FTDI version 2.8.12.0
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 20, 2011,
I uploaded a new document in the first post with pictures since they are worth a 1000 words and I don't like typing. I figured it might help make the steps a little easier.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 20, 2011,
You are not allowed to view links. Register or Login
Yes I got the kit from J1sys, I have set it up according to this info:
* Programming Lynx DMX Dongle v2.0.pdf  in first post in this thread.
I plugged it in & have a red led lighting. How do I test ?
Keep having error messages in Vixen. Do I need a controller hooked up ? Or can I test somehow without the controller ? In device manager I have USB serial port (com4) & verified driver is FTDI version 2.8.12.0

Were you able to finish programming the PIC and verify a Checksum of 0A6F?

An illuminated red LED indicates that power is applied to the dongle.

You don't need a controller to do a preliminary operational test, Bill's instruction video shows how to do this using Vixen and verifying the comport. When testing the green LED should illuminate and change intensity when testing.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: mokeefe on March 20, 2011,
You are not allowed to view links. Register or Login
Following the instruction. Seemed simple enough except I keep getting this message after importing the hex.
New firmware must be downloaded for PICkit3 to work with the part selected.
When I click ok i get unhandled exception occured with these details:

You may want to download the latest MPLAB software from the Microchip website.  That seems to do a better job of installing the current PICKIT 3 firmware.  Give that a shot and then switch back to the PICKIT 3 Stand Alone programmer application to program the dongle PIC.  I struggled a lot with my PICKIT 3 trying to get the Stand Alone programmer working (even tried some of the earlier beta versions of it).  I'm still not 100% sure it's behaving as it should but I was finally able to get the dongle PIC programmed. My son who was back from college for a visit had his PICKIT 2 programmer and that programmed the chip without any hiccups.  Makes me wish I hadn't invested in the "newer" technology of the PICKIT3.

-Mike
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: combustionmark on March 20, 2011,
Good job..

As a bonus your instructions also work with "Bare bones PIC18F programmer interface
" in the wiki.

I just maid an adapter on some scrap proto board and an extra socket.
Skipping the jumper part.

Just call me cheep..

OK. I did order the j1sys board, I just didn't want to wait.

Thanks
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: kbowen on March 27, 2011,
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Yes I got the kit from J1sys, I have set it up according to this info:
* Programming Lynx DMX Dongle v2.0.pdf  in first post in this thread.
I plugged it in & have a red led lighting. How do I test ?
Keep having error messages in Vixen. Do I need a controller hooked up ? Or can I test somehow without the controller ? In device manager I have USB serial port (com4) & verified driver is FTDI version 2.8.12.0

Were you able to finish programming the PIC and verify a Checksum of 0A6F?

An illuminated red LED indicates that power is applied to the dongle.

You don't need a controller to do a preliminary operational test, Bill's instruction video shows how to do this using Vixen and verifying the comport. When testing the green LED should illuminate and change intensity when testing.

Rich


Yes I finally got it thanks. Now have my dongle built & ready to go & my 1st express. Don't have cords yet but am curious if I can hook them up & do a sequence to see if both are working properly. Can I do that ? Will the LED's on the express indicate channel changes etc... Now trying to get the hang of Vixen. Is that the easiest software to learn with ?

Thanks for your help
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: Rainlover on March 27, 2011,
If you hook up your dongle to the LE and run a sequence, the channel LEDs on the LE will blink.
IMO, Vixen is the easiest to learn.

John
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on March 27, 2011,
John's right, if you have the USB and ethernet cables you can run a sequence and the channel output LED's should respond to the sequence. Without cables you won't be able to check the dongle. You can do a self test of the express (if you have power input cables) and  the LED's should also respond.

Since I am new to all this I have no clue which software is the easiest to learn to use, there are several people on DLA that have had experience with other software that can address that question better. There is a video series on youtube that goes through the basics of Vixen that I have been watching. Some of it is probably outdated but it is helping me learn how to do sequencing and it shows some of the short cut keys. I think think that it is going to work fine for getting started in the hobby for me.

Rich
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: mcangeli on March 27, 2011,
Yes... You can provide power to the LE, and connect to your dongle with cat5 and run a test program. The leds on the LE will light...

I made a test program for 16 channels, 10 minutes long by highlighting the channels in vixen and selecting random.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: TheBanker on March 30, 2011,
ok this is my first dongle build so please excuse my ignorance.  What you are talking about here satisfies this.....??..
NOTICE
The pic does NOT come pre-programmed from Microchip or any supplier. If you don't have a programmer then please see this wiki page for a list of folks who can program the pic for you.

Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: KeithTarpley on March 31, 2011,
Greetings,,,

If this is the answer to your question:

http://diylightanimation.com/wiki/index.php?title=PIC_Programming

...for the member list willing to program the dongle pics...

Keith
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: scottmc70 on April 01, 2011,
Thanks NavyGator for posting the very easy to follow How-To. <res.
I received my PICKIT 3 today and programed my PIC with no problems.  ;D
Scott
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: NavyGator on April 02, 2011,
You are not allowed to view links. Register or Login
Thanks NavyGator for posting the very easy to follow How-To. <res.
I received my PICKIT 3 today and programed my PIC with no problems.  ;D
Scott

Thanks. Glad it helped out.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: razorblade54 on April 09, 2011,
I purchased the Microchip PICkit3 from www.j1sys.com and am sure I followed the programming instructions but I get an error message. "Communication error: could not querry PTG mode". I had downloaded and used the stand alone programmer recommended in the instructions. In reading other users problem I see updating the firmware as a suggestion. I'm going to try again on an old pentium 4 machine with a fresh Windows install. Do I need to have MPLAB installed as I did not when I tried before. 
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: gophergrove on April 09, 2011,
I had the same problem.  Installing MPLAB and having it update the firmware then allowed the stand alone program to see the PIC and program it.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: tonyv2842 on April 09, 2011,
I had the same problem and like above, installing MPLAB and letting it update PicKit 3 resolved it for me as well.
Title: Re: Lynx DMX Dongle v2.0 Programming and Testing
Post by: razorblade54 on April 11, 2011,
Firmware update seemed to solve my problem as well. I think the PIC chip programmed correctly. The test program allows me to turn on the individual LEDs and adjust their power and the alternating blinking works okay. I hope that means I've been successful. I have not been able to successfully flash the LEDs with a sequence I made as yet. Pretty sure I set the com port up properly in the profiles section  using the USB DMX to the com port reported. Sort of scratching my head a bit now.