Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ICD2 Clone and dsPIC

Status
Not open for further replies.
Thank you. I'll try a few things before I give up on my icd2-clone and then I'll try the junebug. :)

Ramcheck
 
This is just an update to my previous experiments. I tried inserting a 74HC126 buffer between the 16F877 and the pic to be programmed. Same result: most pics will work fine but the dsPIC30F2010 and the PIC18F2431. Everything else is connected as it should. I think I've had enough of ICD2.

Ok, now to breadboarding Junebug...

Thanks again for your help!

Ramcheck
Edit: I meant 16F877A
Edit2: I'm beginning to suspect of the firmware...
Edit3: Just placed my order for a Junebug :) Oh boy, oh boy, just can't wait for the mailman...
 
Last edited:
I have a good firmware for your ICD2 clone (i just build one myself with a 16F876A and it uses the same firmware as you are looking for ;) )
 
Hi,

I couldn't stand the wait so I did breadboard Junebug, just the programmer that is, and I found it to be much simpler to build than Inchworm+.

Since I'm a Ubuntu user, I read the nice JPUG article on getting piklab and Junebug working on Ubuntu. I already had been using piklab for some time, but I hadn't realized it would not work with PICkit 2 firmware v2+.

Unfortunatelly, it seems that downgrading to version 1.0 will not work. Junebug does not show up on the usb listing. Examining the logs I can see that there has been some errors. Except for piklab not supporting it well, v2.1 does show on that list and I can even communicate with it.

Examining closely the hex files with piklab, I compared the configuration flags of v1.2 and v2.1 and I found out that they are significantly different. For one thing, v1.2 clock selection assumes the cristal is 48Mhz (since it divides that by 12 to get the 4Mhz for the PLL) and v2.1 assumes a 20Mhz cristal as in Junebug.

My conclusion is that with the present circuit you cannot downgrade to v1.2. Now I can only hope that piklab developers will catch up with v2.1 soon. :(

I guess I could say that at least for the time being I'm not in a hurry to get my new Junebug kit anymore, but I still want it.

Ramcheck

Edit#1: I found the sourcecode for PICkit2 and now I can confirm that, as far as I can see, Junebug *will not* work with firmware version 1.X. Please correct me if I'm wrong.
 
Last edited:
Kryten said:
I have a good firmware for your ICD2 clone (i just build one myself with a 16F876A and it uses the same firmware as you are looking for ;) )

Cool! I'll give it a try. Thanks! :)

But where can I find it?

Ramcheck
 
ramcheck said:
as far as I can see, Junebug *will not* work with firmware version 1.X. Please correct me if I'm wrong.
Junebug does indeed work perfectly fine with firmware version 1.x. I wrote the article and have set up Piklab and used my Junebug on three different Ubuntu machines, two Gutsy v7.10 and one Hardy v8.04 (yes I do have too many computers :D ). No problems whatsoever. The article is accurate. I typed in each step as I did it. Took forever! :p Then at the end I read through it quite a few times looking for any errors.

Junebug does not show up on the usb listing. Examining the logs I can see that there has been some errors.
Did you miss the paragraph with the "Don't forget this step." in bold type? That one is what I always forget to do. The USB won't work without doing that part. You may need to reboot, but probably a logoff/logon will do it. Maybe not even that. I'm not sure. I just reboot to be 100% sure (Nasty Windoze habits :p Poor windoze users gotta reboot for everything! It's ridiculous!).
 
Last edited:
futz said:
Junebug does indeed work perfectly fine with firmware version 1.x. I wrote the article and have set up Piklab and used my Junebug on three different Ubuntu machines, two Gutsy v7.10 and one Hardy v8.04 (yes I do have too many computers :D ). No problems whatsoever. The article is accurate. I typed in each step as I did it. Took forever! :p Then at the end I read through it quite a few times looking for any errors.

I believe you, and that is a very nice and well written article indeed! The fault must be all mine. I must be messing up with something.

However, here is what happens with me on Ubuntu 8.04 heron:

Version 2.X: Junebug show on the usb device list and piklab can even talk to it, although the talk will eventually stop since that version is not supported yet. dmesg says the following:
Code:
[20110.768282] usb 1-1: new full speed USB device using ohci_hcd and address 17
[20110.985425] usb 1-1: configuration #1 chosen from 2 choices
[20111.005182] hiddev96hidraw0: USB HID v0.01 Device [Microchip Technology Inc. PICkit 2 Microcontroller Programmer] on usb-0000:00:13.0-1

Version 1.X: Junebug will not show on the usb device list and the dmesg says:
Code:
[ 7935.248427] usb 1-1: new full speed USB device using ohci_hcd and address 14
[ 7935.656084] usb 1-1: device not accepting address 14, error -62

I tried this on three different machines and even on Windows XP to no avail.

I honestly don't understand how that 1.X firmware can possibly work if it was configured to work with 48MHz crystal (at least that is what MPLAB - under wine - and piklab are telling me). Or is it that it doesn't matter?

But then again, what can be wrong?

Ramcheck
 
ramcheck said:
Version 1.X: Junebug will not show on the usb device list and the dmesg says:
Code:
[ 7935.248427] usb 1-1: new full speed USB device using ohci_hcd and address 14
[ 7935.656084] usb 1-1: device not accepting address 14, error -62

I tried this on three different machines and even on Windows XP to no avail.

I honestly don't understand how that 1.X firmware can possibly work if it was configured to work with 48MHz crystal (at least that is what MPLAB - under wine - and piklab are telling me). Or is it that it doesn't matter?
I've never looked at dmesg. I never looked at any of the details you did. I just do what's in the article and it works! :D

How did you get MPLAB to work with Wine? I've never had any success with that. Tried several times.
 
ramcheck, I can load 1.2 firmware on the Junebugs 18F2550 for you if you like. The bootloader is still compatible with the newest firmware if its ever needed.
 
futz said:
I've never looked at dmesg. I never looked at any of the details you did. I just do what's in the article and it works! :D

How did you get MPLAB to work with Wine? I've never had any success with that. Tried several times.

Hi futz,

Thank you for taking your time to helping me. I know I must be either overlooking something obvious, or worse, messing up with the PIC and my precious notebook. And I guess could say that I've become exceedingly efficient at it lately. :D

The reason I looked at dmesg was because piklab could not find a PICkit2. Well the strange thing is that it does find it if I use firmware v2.X as I said before.

This makes me wonder what your dmesg would say and also what piklab would say if you ran it with --lowlevel-debug, but perhaps I've already gone too far here.

MPLAB will work on wine for editing and compiling, but I wasn't able to make t work with PICkit2 or ICD2. I guess usb support is still broken on wine. I'm using wine-1.0rc1. ;)

I checked the firmware configuration bits by opening the hex file in piklab and also by opening up the respective project file in MPLAB. Version 1.X setup seems very different from 2.X on that regard, but I guess it might not matter if the firmware is overriding that information somewhere else.

Cheers,
Ramcheck
 
blueroomelectronics said:
ramcheck, I can load 1.2 firmware on the Junebugs 18F2550 for you if you like. The bootloader is still compatible with the newest firmware if its ever needed.

Hi Bill,

I would very much appreciate that, thank you. At least I will be sure that it was properly programmed.

Ramcheck
 
futz said:
How did you get MPLAB to work with Wine? I've never had any success with that. Tried several times.

mplab 7.x is officially supported under wine

mplab 8.x I managed to install under cross office but it does not run properly (some stupid message about "display now awailable") .. I will upgrade to F8 during weekend and try mplab 8.x again on clean wine and again on cxoffice, it might be possible to make it run ..
 
arhi said:
mplab 7.x is officially supported under wine

mplab 8.x I managed to install under cross office but it does not run properly (some stupid message about "display now awailable") .. I will upgrade to F8 during weekend and try mplab 8.x again on clean wine and again on cxoffice, it might be possible to make it run ..

Hmmm... Officially supported? By who? As far as I know there is no such a thing like official support to applications in wine, since there is no official support to wine itself. You probably meant to say that mplab 7.x was rated gold or platinum, which means that installs and runs stably.

MPLAB 8.1 runs pretty well, despite some harmless messages upon startup. As far as I know, neither 8.10 nor 7.x will work with usb programmers.

So you're running FC7-, which means that your wine version must be something like 0.9.4x or older. That's so very very much outdated. You'd be surprised to see how much progress there's been since then. wine-1.0rc1 was released on May 9th and 1.0 is due on the 23.

Ramcheck
 
@ramcheck
yes, you are 100% correct ... rated on winehq .. not "officially supported" .. i should be more careful :)

and no, I run F8 and will upgrade to F9 ... (I was just installing F8 to my other computer so I made mistake) .. and nope again on the wine, I do not use it at all, I run crossover proffesional 6.1 (donno on what wine version it is based upon)... As I want to reinstall this system anyhow, I wanted to try out the "regular" wine first (before I install crossover). The 8.1 does not run for me attm, it display some error about display and then dies .. had no time to play with it but will... especially that my current crossover licence is no longer valid (changed company) so I need to purchase my personal version...

EDIT: as for the usb programming / debugging - I do not personally need the feature as I have one windoze box dedicated for that that I access via vnc/terminal server when I need to program/debug
 
Hi arhi,

No problem! It's hard not to get too enthusiastic about wine after all. ;)

As you can see below, MPLAB 8.10 does indeed install and run on wine-1.0rc1:

**broken link removed**

And now, just for the fun of it, I too run Windows XP on my computer:

**broken link removed**

On its own little window, that is! hehehehe :D This one is actually running on a remote FC8 box.

Ramcheck


arhi said:
@ramcheck
yes, you are 100% correct ... rated on winehq .. not "officially supported" .. i should be more careful :)

and no, I run F8 and will upgrade to F9 ... (I was just installing F8 to my other computer so I made mistake) .. and nope again on the wine, I do not use it at all, I run crossover proffesional 6.1 (donno on what wine version it is based upon)... As I want to reinstall this system anyhow, I wanted to try out the "regular" wine first (before I install crossover). The 8.1 does not run for me attm, it display some error about display and then dies .. had no time to play with it but will... especially that my current crossover licence is no longer valid (changed company) so I need to purchase my personal version...

EDIT: as for the usb programming / debugging - I do not personally need the feature as I have one windoze box dedicated for that that I access via vnc/terminal server when I need to program/debug
 
nice .. I'll upgrade desktop to F9 over the weekend so I'll give it a try ... (the other boxes will remain F8 as there is no way I can risk upgrading them without previous testing)

anyhow .. I tried programming via usb using easypic4 and windows box running inside vmware .. it works .. I just "passed the usb" to the vmware and it worked :) .. I'll try PICkit2 also .. but I do not see why it would not run ..
 
I've been a RH/Fedora user for eons, but if you let me give you a small piece of advice, you might like to test the latest version Ubuntu. The screen shots above are from that version.

I guess you can always resort to Windows for what is related to it, even if its only inside a VM, but what is the point? I'd rather try and do without it, simply because it's good to have an option. And I opted for Linux a long time ago. I've been living virus-free, trojan-horse free, spyware and malware free, blue-screen-of-death free, and best of all, I'm still doing everything I need to do in my everyday life, only much more easily and efficiently since then. No to mention for free.

This is why I like wine: it's all about running Windows applications on Linux, (almost) as if they were running natively, without Windows. Isn't that cool?

I'm pretty sure that the difficulties I'm having right now with my breadboarded Junebug are minor and soon piklab will be supporting PICkit firmware version 2 and all its features. I'm glad that it might take a couple of weeks for my new kit to arrive, so I'll have plenty of time to learn more about the PIC18 architecture and USB. :)

Ramcheck

arhi said:
nice .. I'll upgrade desktop to F9 over the weekend so I'll give it a try ... (the other boxes will remain F8 as there is no way I can risk upgrading them without previous testing)

anyhow .. I tried programming via usb using easypic4 and windows box running inside vmware .. it works .. I just "passed the usb" to the vmware and it worked :) .. I'll try PICkit2 also .. but I do not see why it would not run ..
 
@ramcheck :) .. using RH since 2.x :) .. all servers on RHEL4 and RHEL5 .. all home boxes (more then 10 of them) on Fedora (except for the laptop that is osX and one old intel 955 box that is XP - it has serial and lpt so it is dedicated for elco :) ) ... I have ubuntu, centos, debian and other (more then 100) distro's in vm images as it is required for work (I do MySQL Cluster consulting) .. but fedora is the only one I use every day :) and I do not plan to change that in near future :)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top