|
Post by Dingo on Aug 22, 2004 23:07:34 GMT 10
I was wondering if anyone here had built their own PIC or AVR programmer like these ones: chaokhun.kmitl.ac.th/~kswichit/easy1/easy.htmor www.myke.com/elcheapo.htmor used one of the cheaper kits from Dontronics (although nothing at Dontronics seems to give you change from $150) Really what I'm asking is: Is it feasible to start in Programmer PIC (or AVR) in C or Assembler with a programmer you have built yourself?
|
|
|
Post by Thrashbarg on Aug 23, 2004 1:03:59 GMT 10
built a PIC programmer ages ago www.winpicprog.co.uk. It didn't cost me more than $15. as far as I can tell it works, but I havent actually done anything with it. If you can get the data onto the pic with no problems then it'll do
|
|
|
Post by Bones on Aug 23, 2004 13:22:55 GMT 10
I build one from Jaycar. I worked ok. I got one of the old ones from Parallax. It work ok too. That was when the Pics first came out. As for programing Dingo, Assembler is the lowest level of programing. You are just shifting, comparing and applying logic gate functions to 8 or 16 bits of data. Very time consuming. Example is on the PICAXE the one line code for SerTxD to send data to a serial port can be 30,40,50 lines of code. That's the easy part each command has it's on time it takes to do that command so you have to work out exactly the timing for the function your doing. And don't forget other commands. A good example is the servo command. The pulses comming out of that port or ports have to be exact (1.5mS to 2.5mS) otherwise the servo will change position or chatter. C is a bit higher level and have some of these commands a different way and combines together. But timing is still a consern. The picaxes are great cause the hard work is already done and a couple lines of code and your robots up and going. I'm not trying to scare you with assembler and I haven't played with C much. But they are worth learning. And very very powerful. Like optical reconitition can't be done on a Picaxe but can be programed in assembler. It all comes down to the application. Basicly why reinvent the wheel. Bones
|
|
|
Post by Dingo on Aug 23, 2004 15:32:45 GMT 10
I agree asembler is usually more trouble than it's worth. At least in PCs anyway. I have use Intel assembler inline in C programs for supposed optimisations in graphics routines (didn't find any gains on modern Swizzle capable processers - i.e. MMX and upwards)
Thus I'm searching for at least some decent C PIC compilers (see other thread).
And yes the where one can use the PICAXE, one is best to. Unfortunately being an interpreted langauge the PICAXE is fairly slow when compared to the same routine in Assembler or C (or so i have heard) I merely wish to implement a few things that are time sensitive or require more speed than a picaxe and then offload that data to a PICAXE to deal with.
i.e. high sample rate data logging
I have also come across Assembler in Graphic Card routines (before GL Shading Language and Cg and DirectX 9.0b etc) and I just don't see the point if a good compiler exists.
I also want to leverage my C experience more than anything else. I do all my other programming in C and it just seems to make more sense to me.
|
|
|
Post by Bones on Aug 23, 2004 15:44:55 GMT 10
I think the c compiler will be good. I still haven't had a good play with them. I like the PICAXE. Looks good. It will suit my purpose. One of the project I did in QLD is in the police cars. Have a look next time. The touch pad control panel that controls the lights and siren is mine. I designed it years ago for the company I worked for. It has a PIC in it. In the old days when the PICS didn't have interrupts. I have to learn c properly I'm told it is a good language. One day.
|
|
|
Post by Dingo on Aug 24, 2004 10:35:57 GMT 10
Way cool! Next time I get one of those complementary rides "down town" I'll have a look!
Oh BTW I think C is the best language over al becuase it was designed by engineers for engineers and so it is powerful and makes lots of sense when you understand it.
If you are learning it I would recommend getting Herbet Schildt's "The Complete C++ Reference". It is about $70, 1000 pages long and gives and example of each function it talks about - of course it is foucused on c++ for PCs but has a big section devoted to C. There is a C only version I think which might be better if you're looking at embedding programming only.
|
|