Friday, June 23, 2006


MELabs USB PIC programmer board arrived...

YEA! The new programmer board arrived! :-D

Better yet, all of those dead PIC16F628A chips weren't dead after all, so now I have LOTS of PIC chips! I've beem reprogramming them with good hex files and testing them. :-)

It was definitely something wrong either within the JDM board or the two PC's I tried to run it on didn't provide enough voltage to properly program PICs. I suspect that it was that last.

From what I've been able to read the USB port has a more reliable source of current that can tapped for programming than the RS232 port does.

As well, the new board uses a USB port which means I don't have to crawl around under my desk hooking up RS232 connectors any more.

Now I can see if I can get the motor controller routine and the serial comms routine working together on the motor controller board. It will also be fun to try to get the AS5035 magnetic enconder chip going, too. :-D

Happy Birthday to ME! :-D

I think you have a good theory there. The RS232 spec doesn't indicate that the interface provides any usable power at all. Worse still, the signals are supposed to be +/-12 volts - but the difficulty of providing both positive and negative 12v power rails mean that many PC's (and especially Laptops and Shuttle-type PC's) provide only +/-5v - or in a few cases only 0v/5v.

So really, anything that relies on any kind of power from the RS-232 port is dicing with death.

On the other hand, USB was specifically designed to provide a small amount of usable power for small devices like thumb drives, small disk drives, etc.

So - yeah - a USB device should be a LOT better than something that takes power from the serial port.
If I remember the specs, they are supposed to be +-12v nominal, but +-3v to +-18v are all within spec.

That is why the +-5v use in lots of laptops are 'within spec'.

Yes, taking power from the serial port has always been a very iffy situation, but it has worked for some.
I think you are confusing the specification of what the transmitter is supposed to send with what the reciever is supposed to tolerate.

The transmission side of RS-232 is supposed to generate +/-12v (give or take some tolerances) - but because this is a transmission standard that allows cables up to a few hundred meters in length, the RS-232 receiver has to be able to tolerate lower voltages than the transmitter generates in order to allow for voltage drop along these long cable runs.

So you are correct that the receiver has to treat anything over +3v as a '0' and anything below -3v as a '1' (I think it's that way up) - but the transmitter is supposed to send +/-12v.

This explains how laptops get away with +/-5v -- SO LONG AS THE CABLES ARE SHORT. But since we typically use RS-232 over just a few meters these days, this works fine...even though it's strictly speaking out of spec.
Off Topic: Just a random thought about PCB design here. A lot of the parrallel-port driving CAD/CAM packages interface to 'dumb' [no mCU/CPU] motor controller boards via a 2 pin/motor [On/Off and Direction] convention. There's a bunch of Allegro type chips that do the 2 wire interface to Unipolar natively [There are bipolar ones also, but not as 'trick']. You can even "TTL 555 dumb-glue" a ULN darlington array with a 4 bit up/down counter to create a 2 wire interface.
Using a 2 wire convention also saves a whole heck of a lot of IO resources, shrinks the code size, and other bits.

Back on topic:
One really nice thing about the MELabs USB PIC programmer is that it is ICSP so you don't need mCU specific adapters unless you want to do "off board" programming. With a ICSP header in the PCB, there's no worry about ESD killing the mCU as you're just plugging into a 4 or 5 pin header. ICSP is really easy to implement if the board doesn't have it already.

3 days left at +4 from GMT
***3 days left at +4 from GMT***

So you are in Kabul or one of the "stans" north of there?
Close enough, but my feet are wet instead of dehydrated.

I noticed that MELabs came out with a SMT 60/80 PICPROTO board (>$20). I'm going to have to look at the PICPROTO80 and see if it's got solder-thiefs. The pads tell you how you have to solder your chips. The PP80 only works with TQFP packages, which are just slightly more obnoxious than PLCC. I wonder if I can figure out something to do with 50+ IO pins?
Toaster ovens are very useful for melting more than just polymers, and it's possible to do .5 pitch by hand if you use a thin low-temp solder or 'hot-point & toothpick' the paste. Heck, the squeegee and bake process works too, just got to make sure you put the goop in the right place.

I just realized I have to clean out the shed in order to find all my SMT gear. And I'm out of TTF. To make things worse I have absolutely no idea where my pcb-board drill or bits are. Lovely.

51 hrs.
Ah, Diego then, the Marines stationed there in the late 1980's used to come down to Mauritius for R&R.
erm, I think il take up building circut boards again, when u say PIC u do mean PICAXE the program? I thought so. Umm, Im gonna bookmark this so when 1 of my projects dosent work, ill come to this site and ask for help forme all of the other circut builders.
Nope, I don't think that anybody uses the PICAXE system, which seems to be PIC chips wrapped up in a complete programming and prototyping package, rather like the BASIC Stamp microprocessor system that Parallex...


PICAXE seems to be PIC chips with a boot programme to make things easy, something I was talking about our doing a few days ago in the project's internal correspondence.

We just use PIC chips straight. Most of the team use the SDCC compiler to program them. I use the PIC Simulator IDE system that has a BASIC compiler. It doesn't really matter what you use in that it's all hex code in the end.
I've been looking more closely at the PICAXE system. One could choose a LOT worse ways of getting into writing controls firmware than taking that route.

My first impression was that it was simply another BASIC Stamp wannabe which it resembles. On closer inspection, however, it appears to have a lot more going for it for an entry-level person insofar as having a user-friendly learning curve.
As a microcontroller newbie, I had bookmarked the PICAXE approach as one of the few best options out of a very wide range of microcontrollers out there. Actually, my short list at the moment is PIC, AVR, and PICAXE.

The AVR is in there because I might be able to more easily use some older Macs as programming machines.

The PIC is in there because it's so inexpensive, and once it's programming complexities are mastered it should pay of long term, sort of like the AVR.

I imagine the PICAXE as a sort of bridge between the two previous, and the easy yet expensive starting points of the BASIC Stamp and direct comptetitors.

I have to point out, my impression so far of the RepRap project is that the element that requires the largest knowledge base to use or modify is the PIC. Aside from that, it boils down to soldering fairly well, and being half decent at cobbling together assorted contraptions as per the project guidelines.

PICs are after all, pretty high end geek stuff...
A big part of my reason for getting into doing my own board design and firmware development was to personally demystify much of the "high end geek" feel of it.

My first notion was to get a more accessible language than C or Java. For that reason I went for BASIC, mostly because I know that for every Java or C programmer there are 50 people who have messed with BASIC at one time or another. Sadly, finding an inexpensive PIC BASIC compiler has been a trial to date. Most of them cost several hundred dollars. I'm hoping that Vladimir Soso's PIC Simulator IDE is going to sort that bit out.

The next bit is to either identify or create a good set of examples of how to do things in such a product.

Where you kind of jump ahead with PICAXE is that all of that seems already to have been done.
At the same time as jumping ahead with PICAXE, (oh my, that sounds precarious!) you also jump back a bit. Reviewing the data I'd collected on them I re-read that they can be very sloooow because of all that code in the. Arg. But still, they seem to be an excellent starting point.

But I agree, demystifying the high end geek stuff is fun, and what tends to draw me to projects, but it's not everyone's cup of tea.

There is also a big issue of persistance, everyone has their own comfort level. Or should that be "discomfort level"!

In any case, if I understand the big idea of the RepRap project, I think it is safe to say the PICs are the largest stumbling block to wider adoption. So as long as that is factored in, in a realistic and effective way, it should work.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]