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.

PIC language?

Status
Not open for further replies.
Thanks guys for your thoughtful posts, they are appreciated.:)
 
Last edited:
...
PIC Languages. There is JAL which I have never tried and forth which is a lot of fun. It is very extensible.

I did a quick review of JAL on this board a while back. It was not a good review - what got in my way was my preference for C.:D
If I remember, it was a lot like PASCAL and a lot like C and I didn't look at output, but ease of use... I do like the philosophy though.... programming is programming and language is language.

There was Don Lancaster, who was programming PICs with postscript. :eek:
Don Lancaster's Guru's Lair

Probably there are times when one language would be a much better choice than others; probably there are times when it matters little which language...

Flow code seems to get great reviews, but I have never tried it.

what about interpreters, I know there was some nice basic interpreter for 8051, pretty useful stuff .. I tought about making one for PIC but have no use for it still .. maybe there is one available ?

I think there are many interpreters for PIC but that kind of goes against everything you seem to like about producing elegant and fast programs, no?

With regard to to 'C', I think the 'C' stands for C-hinese.

It started out OK years ago, but as it grew it ran out of meaningful symbols.

The thing I like about C is that it hasn't changed much. :D It is very simple and non confining...

Seems to me, that C is a lower level language than most, and it seems to be closer to the registers...

:D :D :D :D :D

C is like "universal assembler" :) .. and it just get the job done

yes!:D

... C code looks and feels like C code.

yes!:D

If I want objects, I use structs; I don't like C++:D

I will still advice any newcomer to learn asm or rather learn the register level functionality of the chips as this will give them a greater understanding of the underlying hardware and enable them to write better code in any language.

Mike.

I think this is core.... and great advice...:D It is easier to just jump into a higher level language and start developing something, and it is also easier to 'script' (cut and paste code written by others) with a procedural language than with assembly.This is where the trouble comes in for a lot of early learners; they just want to get something working, so hack together something. When it works - or seems to - fine. When it doesn't, they don't know why - so show up here with the word urgent!!! in the subject line.:p
It is quite like those with no design background making pictures. They often can get a 'good' one, but don't know what went wrong when they make a 'bad' one. (yes there ARE problems with those two words!):)

I also think that C and assembly are not good languages to learn to program in, and that PICs (or any micro controller) are also not a good place to learn a language. MODULA PASCAL or BASIC running on an OS - console is the place to start. But then I'm too much a lover of tradition myself...(read: old fart):D
 
Eric, Happy birthday, many more to come, and I hope each and every one find you in good health

I think there are many interpreters for PIC but that kind of goes against everything you seem to like about producing elegant and fast programs, no?
every tool got it's use .. I like neat'n'fast but look at the pickit2 firmware, it is actually a small interpreter that interprets code sent by the pickit application describing the process of programming different chips. The idea is to make a small toy that will have a small display, can perform some actions and that can have ps2 keyboard attached. Program button allows you to edit/write program to control the toy, so - no computer needed. Could be nice tool for giving "my nephew" incentive and help on learning programming basics. That is why I would want to use basic interpreter :). I would make a toy with inputs (light, sound, distance) and outputs (sound, movement, lights), so one will have to learn at least few flow control statements in order to get full potential of the toy :)
 
Arhi,
That is a good idea! I gave my SBC with BASIC interpreter to my nephew, but sadly he has not made much use of it. The idea of a toy could be much better for a young boy!
 
that is the general idea ... how to get a 6-7 year kid to grasp the idea of programming .. I just want them to get the basics, so if they decide to pursuit that later in life, they have some solid base on what to build on... point and click computer games are nice, but problem is, when you give them computer, they install games and that's the end of the learning curve :( ... for now this is just a rough idea, when I get bit clearer pic on how I would like it to work, I'll start separate thread to seek advice / opinions from fellow colleagues with much more experience in these matters :) ..

not to drive the discussion completely off topic ..
imho, whoever want to start doing any embedded system / micro controller programming they have to start with asm. They do not have to become asm wizards, but must have at least some basic knowledge, then, they should move up ... mine preference is C, my compiler of choice is C18 .. now, as I already stated, I did not choose C18 because it is best value for the money but because there is so many app notes by microchip, the compiler is made by the chip manufacturer so it can be considered "standard"... The lack of optimisation for the free version is not that problematic for me as "I'll get bigger chip if every other option is exausted" :)

now, if I had to choose a compiler, I'd probably give a hard tought about sourceboost boostC as what futz already mentioned, fully functional compiler for 75$ is the price you can hardly beat :)
 
now, if I had to choose a compiler, I'd probably give a hard tought about sourceboost boostC as what futz already mentioned, fully functional compiler for 75$ is the price you can hardly beat :)

I got my boostC on eBay, and only paid about $50 for it. I'm not sure if they still offer it that way, but it may be worth looking.:)

I still keep and use a few others, including C18. They all have a place IMHO.:)
 
Happy Birthday eric! :)

I'm now learning ASM and also applying C into the microcontroller applications as well. ASM's very difficult, but I can't stop learning it because I need to understand the intricate detail of the m'controller. :)
 
sorry to pop in with this mid conversation but it is technically on topic, what is the most used C compiler for pics? and how portable is code between them? I'm currently using CCS pic C, because I have acess to it and it works on 16F chips, which i currently use because when I was just getting started someone told me they were better for beginners, now that I've learned some more I dont know why they said that, but thats beside the point. Would code from CCS C port to microchip Pic C if i get that later on, or would it be like starting over?
 
It is not starting over.

Almost all of the C language related bits are the same.

The difference is in how you work with the hardware.
This is due to the way CCS wrote their header file.

If you know what you are doing you will come up to speed without too much trouble in most any C compiler. But not expect the code to work without changes.

Having said that CCS has tried to make the programers life easier which makes it more work to port.

If you have trouble post your code and we can help.
 
sorry to pop in with this mid conversation but it is technically on topic, what is the most used C compiler for pics? and how portable is code between them? I'm currently using CCS pic C, because I have acess to it and it works on 16F chips, which i currently use because when I was just getting started someone told me they were better for beginners, now that I've learned some more I dont know why they said that, but thats beside the point. Would code from CCS C port to microchip Pic C if i get that later on, or would it be like starting over?

The reason most would recommend CCS or mikro C, is that both have a lot of built in functions, or macros - in their libraries, which you do not have access to.
For example in CCS you can use #use rs232.... which is all set up for you... You won't find this in others you have to do it for your self.
That said, when you build your own functionality, you have an understanding of what it does and how it does it, so when things don't go correctly you can fix it.
I have had good success porting CCS and C18 and HiTech source to source boost; it isn't always easy, but it isn't always difficult.
 
come to think of it, do I really have any reason to switch away from CSS C? Its supposed to work on 12,16,and 18. Is there any big advantage in Microchip Pic C?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top