You are not logged in.

#1 2010-01-01 01:18:21

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

How much interest is there in tools for working with Microchip PIC's

and other MCU's on Arch?

Just thought I would ask, as if there is much interest, and I note that there must be some, we could form a group to ensure packages and support is there.


Kind regards

Benedict White

Offline

#2 2010-01-01 01:30:08

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: How much interest is there in tools for working with Microchip PIC's

Sounds interesting - I've got a bunch of PICs that I keep meaning to do something with and would love to get back into them.

Offline

#3 2010-01-01 16:27:10

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How much interest is there in tools for working with Microchip PIC's

Not that I really need to use them now but would be nice to be able to program and debug from arch just in case there is some "emergency" job that needs to be done.

Testing anything else besides installing and running the program is a bit difficult for me now because I don't have a programmer and a development board which I can use to check if everything is working as it should.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2010-01-03 19:56:14

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

Well, that is 3 of us then! I was hoping there may be more!

Still, we need to work out what programming hardware and software to use then how to compile stuff. I did have a look at this:
http://www.paintyourdragon.com/uc/ubw32/

Which is in part interesting, though it is for high end processors. We need to work out a development board that we can publish. Do you folks all have paralell ports?


Kind regards

Benedict White

Offline

#5 2010-01-03 21:25:38

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How much interest is there in tools for working with Microchip PIC's

Parallel and serial ports are a rare sight these days so I guess the best route is to go usb. There are usb to serial converters but I don't know how well that will work.

Using usb can be troublesome, starting something from scratch is not easy, or you borrow some code to write the code to put in the bridge ucontroller and the code to write a driver or it will take ages to complete.

Also programming the first versions of the bridge software into the bridge ucontroller can prove to be tricky if you have to rely on home made programmers. Programming more recent chips with the serial or parallel port is tricky (maybe the parallel port can do a bit better here).

There is also the issue of building the pcb for the programmer board, powerful and feature rich chips come only in packaging with smd pin spacing or smaller, this makes assembly at home very difficult, I'm not even considering making the pcb at home, anything with a packaging smaller than dip and you already start to have problems.

Debugging the hardware at home is not trivial either, voltages can be easily measured with a voltmeter but checking things like signal timing and synchronization between signals requires and oscilloscope, sometimes you only realize that you need to rewrite or tweak some piece of code after you see the signals with an oscilloscope.

Also it's not fun to reinvent the wheel just for the sake of doing it, there must be already some work done out there that can probably be improved and expanded.

To summarize, using serial/parallel/usb to serial converter may make things easier to program on both ends (pc and brigde code), usb has the potential to be faster, more flexible and more future proof but will make things a lot harder to do. The prototype programmer board must be easy to build if you want to get the parts and assemble it yourself.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2010-01-03 22:13:16

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: How much interest is there in tools for working with Microchip PIC's

I think USB is definitely the way to go. I have a USB ICD2 Programmer and Debugger (albeit a clone and not the 'real' microchip one) and with a bit of googling found this:

http://piklab.sourceforge.net/index.php

Haven't tried it yet, but it says that it supports ICD2 and looks similar to Microchip's MPLAB

There's even a Linux and Open Source section in Microchip's Forum:

http://www.microchip.com/forums/tt.aspx?forumid=182

Offline

#7 2010-01-03 22:42:39

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

The problem with USB is that if you have the programmer controlled by USB then you are going to need a chip that speaks USB on the programmer then provides all the signals for the chip to be programmed. Although the high end chips are all SMD, there are many medium end ones that are DIP and easy to handle.

So I take it you folks have neither serial or paralell ports? Pity, I have both and there appear to be a whole host of fairly easy designs about that could do and could be added to.

I don't know how effective the translaters are, (as in USB to parallel or serial) I will see if I can borrow one from work and see what happens when you plug it in.

Piklab looks like something we ought to build a PKGBUILD for. I will have a play and see where I get.

Fastfret79, where did you get your programmer from and how much did it cost?


Kind regards

Benedict White

Offline

#8 2010-01-03 22:49:21

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: How much interest is there in tools for working with Microchip PIC's

What do you mean by saying "tool"?
There is lack of good IDE's for MCU's. I've found the great one for 8051, but there are no modern IDEs for AVR and PIC.

Offline

#9 2010-01-03 22:52:31

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

eDio, I mean IDE's, compiling toolchain's and stuff to download programmes, possibly with some info on what programmers work, possibly with designs for home making.

You have one for the 8051? Is that not very old?


Kind regards

Benedict White

Offline

#10 2010-01-03 23:22:47

eDio
Member
From: Ukraine, Kyiv
Registered: 2008-12-02
Posts: 422

Re: How much interest is there in tools for working with Microchip PIC's

Benedict_White
http://mcu8051ide.sourceforge.net/
As for me, it is much better even than Keil µVision 3.
I can't say anything about hardware support, as my 8051 experience is limited to asm programming for standard Intel 80C51 in university, but it is handy for programming 7-seg and matrix LEDs, keyboards and other peripherals.

But for avr programming I still need to use Windows and avrstudio. I'm only learning how to develop with avr, and I'm not so experienced to be able to use separate text editor, commandline compiler, programmer etc..

Offline

#11 2010-01-03 23:29:05

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

Well, modern ish PIC's support C compiled programs, so there are a variety of IDE's that work with that already, albeit they don't know what the specific PIC parts are, but a complete IDE and other tools for Microchip and possibly other MCU's is what I was aiming for.


Kind regards

Benedict White

Offline

#12 2010-01-03 23:30:12

tlvb
Member
From: Sweden
Registered: 2008-10-06
Posts: 297
Website

Re: How much interest is there in tools for working with Microchip PIC's

There is a complete toolchain for the avr processors available in the community repository:
pacman -S gcc-avr binutils-avr avr-libc avrdude
Code editing can easily be handled by any text editor and makefiles.

On the subject of interfacing, as long as you get a usb<->rs232 converter with an ftdi chip inside, it should appear as something like /dev/ttyUSB0 and be interfacable just like any other serial port.
I'd also say that usb should not be neccesary unless you need the speed or built in functions (like hid device autodetection) much more mcu's have usarts than usb support in hardware, and bit banging usb is heavvy.

Last edited by tlvb (2010-01-03 23:33:07)


I need a sorted list of all random numbers, so that I can retrieve a suitable one later with a binary search instead of having to iterate through the generation process every time.

Offline

#13 2010-01-03 23:50:24

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

Many thanks tlvb, that answers the questions on Atmel MCU's and indeed using a serial programmer which is cheap.


Kind regards

Benedict White

Offline

#14 2010-01-04 00:12:20

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How much interest is there in tools for working with Microchip PIC's

Benedict_White wrote:

Well, modern ish PIC's support C compiled programs, so there are a variety of IDE's that work with that already, albeit they don't know what the specific PIC parts are, but a complete IDE and other tools for Microchip and possibly other MCU's is what I was aiming for.

You can write C for most pics and use this http://www.htsoft.com/products/compilers/PICClite.php to compile it.

As for the USB ICD2 clone, I remember seeing something about that in edaboard and I believe there are already a few other schematics floating around the net.

Also mplab seems to work under wine http://appdb.winehq.org/objectManager.p … on&iId=403 the results are mixed, some say it works fine after carefully following the install tips, others say it can't talk to icd2, but as long as there is an alternate programmer I guess thats not much of a problem.

And it seems there are a few other projects too http://www.microchip.com/forums/tm.aspx?m=112347


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#15 2010-01-04 00:29:16

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

ROOKIE, there are tool chains that support PIC's up to the PIC 32, my understanding being that the Microchip system relies on GCC so they had to release some bits and you can rip the files to build a GCC based compiler, but I am looking in to that.

I don't think we need to use WINE, I think we can build an open source Linux based tool chain.

Does any one know of a goob USB to parallel converter?


Kind regards

Benedict White

Offline

#16 2010-01-04 00:49:42

fastfret79
Member
Registered: 2009-09-05
Posts: 87

Re: How much interest is there in tools for working with Microchip PIC's

Benedict_White wrote:

Fastfret79, where did you get your programmer from and how much did it cost?

eBay and I think it was around £20 a couple of years ago from a seller in China. Looking now on eBay, they're neary fifty

Offline

#17 2010-01-04 18:02:50

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How much interest is there in tools for working with Microchip PIC's

Benedict_White wrote:

ROOKIE, there are tool chains that support PIC's up to the PIC 32, my understanding being that the Microchip system relies on GCC so they had to release some bits and you can rip the files to build a GCC based compiler, but I am looking in to that.

I don't think we need to use WINE, I think we can build an open source Linux based tool chain.

Fair enough, I just mentioned using mplab through wine because of the built-in simulator/debugger mplab has, I haven't done any programing in linux yet and the last time I worked with a PIC I was still using windows so you are a lot better informed than I am.

Apart from that I'll choose a native app without much thought, things just seem to work better with a native app smile .


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#18 2010-01-05 00:18:03

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

Well, perhaps Wine and mplab are good options for some things, but I have never actually used it. That said, the problem I see with it is that if you want C compiled programs via Microchip's stuff, there are limits to the free versions.


Kind regards

Benedict White

Offline

#19 2010-01-05 16:25:56

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How much interest is there in tools for working with Microchip PIC's

I think you can tell mplab to call any compiler you want, one just needs to fiddle with the options but thats a lot more complicated that having everything linux native I guess.

Mplab is nice because you can simulate a very wide range of PICs and check where your program is doing nasty things and if you don't interface to complex hardware you can even give some stimulus by hand during simulation, this is just one of the features, you can also check and change any register, monitor the stack for overflow and lots of other things .... I start to sound like a seller tongue.

When I used it I had a few gripes about some things but as a whole it's a good program, if the is a linux native equivalent then no need to think about mplab anymore smile


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#20 2010-01-05 22:38:33

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 342
Website

Re: How much interest is there in tools for working with Microchip PIC's

Rookie, there are some MPLAB equivelents, in the simulation type game, but the issue always is the coverage of chips. The game is going to be widening it enough to cover lots of peoples interests.


Kind regards

Benedict White

Offline

#21 2010-01-06 10:26:29

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: How much interest is there in tools for working with Microchip PIC's

I've got a ATMEL STK500 kit I play around with sometimes. Haven't had the time to do much, but I have had no problems using it on a serial port on my computer.

I used the following line to read a program from it:

prompt> avrdude -c stk500v2 -P /dev/ttyS0 -p m8515 -U flash:r:m8515_flash.hex:i

My user just needed to be a member of the TTY group.

Haven't tried with a USB to serial adapter yet. But I don't think it will be a problem as long as the chip in the adapter is supported on Linux.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#22 2010-12-08 00:29:08

blackcobra
Member
From: Ireland
Registered: 2010-12-07
Posts: 4

Re: How much interest is there in tools for working with Microchip PIC's

I have the an rs-232 parallel port converter.  and it doesn't work for my pickit. I had to Purchase a parallel port drive for my computer! Be sure to check if a converter works with your pitkit first.
You can write directly to the dev. via dash(or whatever bash system you use) as someone pointed out earlier

Last edited by blackcobra (2010-12-08 00:31:04)


Dan

Offline

#23 2010-12-08 15:40:25

Texas
Member
From: Dallas, Texas
Registered: 2010-09-10
Posts: 131

Re: How much interest is there in tools for working with Microchip PIC's

I prefer the AVR chips.  They work great on Linux with the gcc-avr compiler.

Offline

#24 2010-12-08 17:58:47

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: How much interest is there in tools for working with Microchip PIC's

I also usually just stick with AVR's, the avr-gcc/avrdude combo is a really nice set of tools and It would be nice to see something similar to these for PIC's and 8051's (might already be there, haven't really had the need to look)

An IDE would probably be nice for a lot of people, but I just stick with Vim, and debug using print statements through the UART via a MAX232 chip.  if you need a serial terminal I suggest minicom, it's just plain fantastic.


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

Board footer

Powered by FluxBB