PDA

View Full Version : Problem with USB dongle or Proton24?



JimDrew
26th July 2015, 01:48
Ok, I have been using Proton24 without any issues with my USB Key in a Windows 8.1 setup.

I haven't used it for a few months, and I needed to check something so I put the USB dongle in a USB port and it lights up. However, when I try to compile with Proton24 using any PIC that isn't free, I get the error message about the part not being supported with the free version. I checked the device manager, and Sparkey is there as a USB device with no errors. The dongle lights up and shows up in the device manager any every USB port I tried, but the compile always fails because it thinks I don't have the dongle plugged in - when clearly I do.

Any ideas?

John Drew
26th July 2015, 02:18
Jim
What device are you using and I'll check here. I only have the PICs (R) that are on the free list but I could try a test compile at least with your device in the program. I use W8.1
John

normnet
26th July 2015, 02:44
Download the driver and manually select it when updating in Device Manager.


Norm

JimDrew
26th July 2015, 04:50
I tried 24HJ256GP210A and 24FJ64GA308 (which is what I really need). I re-installed the driver manually. The driver and dongle appear to be fine. The dongle shows up in the USB list and the dongle is lit up. I just tried installing Proton24 on my XP machine and although Proton24 itself works, the dongle installation does not. It complains there is a USB INF file error and the device manager shows it not installed properly.

What I am trying to accomplish is determining the proper PPS code for the 24FJ64GA308. I can't assign a UART as an output (ie. U1TX), although inputs (U1RX) work fine. I have never had an issue with PPS before - but this chip is very odd in it's registers (ANSA, ANSB, etc. instead of ANSEL, and other pretty big differences). I was hoping that compiling a simple test program to set RP16 or RP5 to be U1TX would tell me if I am doing it right in the assembly code I am working on under MPLAB.

joesaliba
26th July 2015, 07:22
Jim,

I tried with one of the chips you mentioned and it compiled ok. I think that the problem is the USB Dongle. I had the same issue 9 years ago, the Dongle lights up but the IDE says that there is no USB Dongle attached. Contacted Crownhill, sent the Dongle back and sent me a new one.

John Drew
26th July 2015, 09:11
Jim, I checked with the 24FJ64GA308 and it started to compile (that is it recognised the dongle) and then struck errors because I just substituted for another P24 device. So Joseph may be onto something. I'm using W8.1
John

joesaliba
26th July 2015, 15:43
I would contact Crownhill as I said in my previous post, I had a Dongle in my early days using PDS that the light was ON but the compiler was not recognising the Dongle. Can you submit a code for one of these chips as I only tried a very short code to try compile.

JimDrew
26th July 2015, 21:56
Thanks guys, I will contact Crownhill. Very odd that the dongle shows up under the Device Manager and lights up, but is not seen by Proton24.

I just need to assign RP16 to U1TX using the PPS with the PIC24FJ64GA308.

JimDrew
26th July 2015, 22:35
Well, in a fit of rage (or something like that) I decided to uninstall Proton24 and the remove (physically delete) the USB driver. I reinstalled everything and after having to reinstall the USB driver twice, now Proton24 recognizes various (non-free) PIC24 parts. So, then I decided to compile this simple program:

Device = 24FJ128GA308

'----------------------------------------------------------------------------------------------------------------------------------------

Main:
PPS_Output(cOut_Pin_RP16, cOut_Fn_U1TX) ' Make Pin RF3 U1TX


...and of course an error is generated (bset.w CORCON,#pp_psv - pp_psv is not created by the compiler).

But, I was able to get the info I needed from the assembly... which means I have a bad PIC or something because Proton24 generated the exact same PPS assembly code I am using.

Another thing I noticed today is that the assembler and editor are separate. I clicked on the "assemble" button and got a pop up box showing the path that includes MPASMWIN.exe. I figured that maybe it is missing. So I copied it from my MPLAB8 installation and now it tries to assemble but errors out on the first line with an known opcode. Is there some special verison of MPASMWIN that is used for this?

John Drew
27th July 2015, 01:49
G'day Jim
As I understand it the editor (common to all devices) calls PrPlus.exe as the preprocessor then App24.exe (the compiler in Proton IDE/PDS) for a P24 device and generates the assembler, which in turn calls MpasmWin.exe in the includes directory which generates the HEX from the assembler code. I'm fairly sure I have it right.

The following program compiles fine here.


Device = 24FJ128GA308

'----------------------------------------------------------------------------------------------------------------------------------------
Dim test As Word

Main:
test=1234
'PPS_Output(cOut_Pin_RP16, cOut_Fn_U1TX) ' Make Pin RF3 U1TX

John

PS As the dongle was working for 8 bit devices I think it's unlikely that the problem is the dongle or driver, but I really wouldn't know, that's something for Les to comment on.

tumbleweed
27th July 2015, 10:58
I clicked on the "assemble" button and got a pop up box showing the path that includes MPASMWIN.exeIt sounds like something's not set up correctly. MPASMWIN.exe is the assembler for the 8-bit parts and won't work for the 24 series.
The assembler for the P24 should be calling the GNU assembler, which I think is included as coff-as.exe.

John Drew
28th July 2015, 00:21
Thanks for clarifying the assembler Tumbleweed.
John

Les
28th July 2015, 09:18
The same program handles the dongle for Proton24 and Proton for 8-bit devices, so if one works, the other will as well.

The only message than will appear if the dongle is missing or incorrectly beign accessed is "USB Key Missing"