1. 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.
    Dismiss Notice

PIC language?

Discussion in 'Microcontrollers' started by uaefame, Nov 5, 2008.

  1. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,178
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    Thanks guys for your thoughtful posts, they are appreciated.:)
     
    Last edited: Nov 9, 2008
  2. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    Old, and fart -perhaps.
    boring...Hardly!:D
     
  3. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    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.

    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?

    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...

    yes!:D

    yes!:D

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

    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
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. arhi

    arhi Member

    Joined:
    Apr 17, 2008
    Messages:
    887
    Likes:
    12
    Location:
    Belgrade, .rs

    Eric, Happy birthday, many more to come, and I hope each and every one find you in good health

    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 :)
     
  6. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    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!
     
  7. arhi

    arhi Member

    Joined:
    Apr 17, 2008
    Messages:
    887
    Likes:
    12
    Location:
    Belgrade, .rs
    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 :)
     
  8. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    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.:)
     
  9. littletransistor

    littletransistor New Member

    Joined:
    Aug 27, 2006
    Messages:
    244
    Likes:
    1
    Location:
    Kuala Lumpur, Malaysia
    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. :)
     
  10. Triode

    Triode Member

    Joined:
    Feb 11, 2009
    Messages:
    925
    Likes:
    22
    Location:
    Bay Area
    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?
     
  11. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    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.
     
  12. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    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.
     
  13. Triode

    Triode Member

    Joined:
    Feb 11, 2009
    Messages:
    925
    Likes:
    22
    Location:
    Bay Area
    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?
     
  14. BeeBop

    BeeBop Active Member

    Joined:
    Dec 22, 2005
    Messages:
    1,281
    Likes:
    23
    Location:
    Vancouver Canada
    Last edited: May 12, 2009
    • Like Like x 1
  15. Triode

    Triode Member

    Joined:
    Feb 11, 2009
    Messages:
    925
    Likes:
    22
    Location:
    Bay Area
    haha, well that saves me a bit of trouble!
     

Share This Page