I was wondering how many PIC users are on LMR and what languages are being used. I am currently a fan of the dsPIC33's and use C and assembly for programming.
Lots
The answer is “lots and lots”.
I’d say a good chunk of the PIC users are using PICAXE (ie BASIC), but I favour RISC on the 16x series.
To my surprise I have
To my surprise I have started enjoying using the more low (or is it high, can never remember) - level features of Picaxe; I see myself writing and reading to EEPROM, masking bits in bytes, setting flags and that kind of stuff.
So the answer may be; One Picaxe user here, considering listening to good old BOA and take up some low/high(whatever)-level coding…
Hi and Lo
It’s low. I’m low. You’re high.
fly high or go home! lol
I am always high!
old timer
I have been using PICs for over a decade. I do not program in BASIC and I don’t like ‘C’ for microcontrollers. Here is my take on the two …
Assembly language let’s you get right down to the lowest level of control you can get. It gives you the freedom to apply ‘bit twiddling’ tricks in the code to do things in a much smaller space.
‘C’ is simply much easier to read and understand, just like BASIC. However, C requires a software stack ( which the old PIC16 devices don’t have ) and ‘C’ compilers tend to create more code. For instance, I can get an L.E.D. to blink on an output pin in 20 or so bytes of assembler code. The same thing in ‘C’ might take anywhere from 50 to 100 bytes of code due to the setup and ‘preamble’ of every ‘C’ program.
To make a long story even longer, I do both. I use assembler for PIC and AVR work, and C#/.NET for windows apps.
Here’s the thing…
If you cut out all the pre-written libraries, C has about 32 commands or something. I don’t understand why anyone uses it. RISC assembler on a PIC has only 32 commands or something similar.
Depends on the task
I use C for everything that has "soft" real time requirements and assembly for all "hard"(must happen in a certain time quantum) requirements.
Nothing like some lightning fast DSP code with a C API you can give to the new grunt - oops I meant new graduate!
The Reason I was Asking
I was wondering if there would be any interest in an arduino type board based on the ds33, 24F, or 16F micro. Since mplab and the student version of the C30 compiler are free I was thinking of doing an open board design project here. Let me know what you guys think.
Love to
I’d love to have a piece of that action. The thing is, I’d prefer a board with an ICSP header, whereas most of the guys would probably prefer a serial downlink (a la picaxe) connector. I don’t know enough about the picaxe to add both, so I let it lie.
I have a few ideas for features specific to amateur robotics which should be added to such a board.
Determinism
…is, I think, the word you’re looking for. C provides very good determinism, actually. It’s the pre-built libraries where this all falls apart. There’s an awful lot of genericism built into them meaning that at a particular snapshot in time, it’s quite impossible to know the absolute state of the machine.
Yes
All my PIC boards have an ICSP header. I do have a serial bootloader I used for a project that allows you to load apps compiled with C30 or asm
but, for me, I much prefer having the ICSP(if you look closely at my robots board, you will see one at the top right) .
100% with you
Absolutely. Mine too.
I’m just offering you a suggestion as to how to get the masses on side. The resultant board would need to support picaxe in circuit in order to arouse a large interest. It think it’s a brilliant idea: any given project could have a RISC version, a C versio or a PICAXE BASIC version!
Do you still have to have a
Do you still have to have a +12 volt input to program PICs, on the ICSP?
Aye
Yes, but it’s normally provided by the programmer.
Preliminary Schematic
Here is a general layout for the dsPIC33/PIC24 processor. One more switch could be added to support the PICAXE 28x1. Let me know what you think.
PIC μCs are definitely my
PIC μCs are definitely my weapon of choice. The first real programming languages I learned (apart from early HTML) were C/C++ and BASIC, although I program my PICs exclusively in Assembly. Having worked with Motorolla 68HC11s and a handful of FPGAs I love how much you can get done with even the mid-range 8-bit PIC μCs, and working with Assembly helps me make the most of that. Also I’m a bit of an OC control freak, and so the minimalist and transparent nature of Assembly is very appealing.
As far as actually flashing the μC goes, I use ICSP for any μC that has more than 20 pins, or if the main PCB is reasonably large anyway. I’ve got a little DIY ZIF socket adaptor for any projects that are too hard to add an ICSP header to, or in rare cases don’t even have a PCB at all.
Hi All
I just joined this website. I use PICs and C. I mainly use PIC16F887s, PIC16F690s and PIC12F509s. I am no expert in them, but I am becoming more familiar with them. =)
high level language for PIC for newbies: JAL
I am PIC guy myself, just because I ran into it (so it’s not a well founded choice).
Started with JAL (http://www.voti.nl/jal/). It’s not assembly or C but closer to PASCAL. And the advantages are simple:
1) It’s free
2) It was designed to teach to kids (for all parents out there: a lot of kids love it)
3) Because kids get it, I get it
I am not trying to be funny here, but a lot of us have started diving in to deep and never finished their first project. The website accompanying JAL is not sexy but contains a lot of information and examples that get kids going and will enable newbies here (or there) to flash a led, flash several leds, make traffick lights and before you know it start building cools stuff. It will take the sting of assembly out of the first phase of experimenting.
I have not explored other options and dont want this to turn into a “war of the uC’s”. Just want to provide infor to people who might consider fiddling with PIC with a VERY easy entrance.
Take care,
YCD
I think it’s a brilliant
I think it’s a brilliant plan. Wish I could help but doubt I have got the skills. Will you accept motivational yelling during the race and my applause at the finish as positive input to this project?
Ycd