element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Embedded Forum c programming
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 15 replies
  • Answers 2 answers
  • Subscribers 477 subscribers
  • Views 1901 views
  • Users 0 members are here
Related

c programming

solymohamed
solymohamed over 8 years ago

I want to be fluent at c programming to start Embedded sytem

  • Sign in to reply
  • Cancel

Top Replies

  • balearicdynamics
    balearicdynamics over 8 years ago +3
    Besides playing with theory, fundamentals and C good books on embedding, if it is possible get a reasonably complex yet easy to use board. I suggest not to start with Arduino, as it is so easy to keep…
  • michaelkellett
    michaelkellett over 8 years ago in reply to COMPACT +3 suggested
    Sorry but I'm with Enrico with this - start on simple embedded boards. I would recommend a ARM Cortex based part, probably one of the ST Nucleo boards but the TI Launchpads are good too. If you want to…
  • kas.lewis
    kas.lewis over 8 years ago +2
    EdX Embedded Systems - Shape The World - edX Its pretty good
Parents
  • COMPACT
    0 COMPACT over 8 years ago

    I'm glad for you.

    What's a sytem?

     

    This program will make your computer loopy!

    void main(){for(;;);}

     

    The best path to learn c is on a unix/linux console based platform (like BBB and RPi) and once you've become proficient at that then migrate to embedded systems.

    C programming with embedded systems is more complex because you will need to deal with hardware specific details and be quite #pragma tic.

     

    With MSP43x you'd be dealing with statements like;

      SIMCO &= ~0x07;            

     

    With AVR programming;

      #pragma interrupt_handler isr_t1:iv_TIMER1_COMPA

     

    With PSOC programming;

      saved->clkSelectReg & CY_SYS_CLK_SELECT_DIRECT_SEL_MASK) != CY_SYS_CLK_HFCLK_IMO

     

    All of which are hardware specific and make no real sense to the learner.

     

    If you plan to play with Arduinos then download and play with PROCESSING on your PC. It's where the Arduino IDE was spawned.

    Processing was designed to make C programming easy for quick results for Arts Students.

    https://processing.org/

    You don't have permission to edit metadata of this video.
    Edit media
    x
    image
    Upload Preview
    image

     

    Enjoy!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 8 years ago in reply to COMPACT

    Sorry but I'm with Enrico with this - start on simple embedded boards.

    I would recommend a ARM Cortex based part, probably one of the ST Nucleo boards but the TI Launchpads are good too.

    If you want to learn C for embedded stuff then keep away from Linux targets for now.

     

    Compact is being  a bit naughty with his examples which are chosen to look obscure:

     

    SIMCO &= ~0x07;

     

    can be written like this:

     

    foo_register = foo_register & 0xf8;

     

    and what the line of code is doing is clearing bits 2 down to 0 in the register. (SIMCO or foo_register are just names for a variable which has been set up to be in the memory location of  a control register in the processor).

     

    The best book, not only about C, but the best programming language manual ever is "The C programming Language" (this is only an opinion image).

     

    https://www.amazon.co.uk/C-Programming-Language-2nd/dp/0131103628/ref=sr_1_1?ie=UTF8&qid=1488793346&sr=8-1&keywords=c+pr…

     

    You'll still need some tutorial stuff to go with your chosen board but if you stick with TI or ST you'll be OK.

     

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • michaelkellett
    0 michaelkellett over 8 years ago in reply to COMPACT

    Sorry but I'm with Enrico with this - start on simple embedded boards.

    I would recommend a ARM Cortex based part, probably one of the ST Nucleo boards but the TI Launchpads are good too.

    If you want to learn C for embedded stuff then keep away from Linux targets for now.

     

    Compact is being  a bit naughty with his examples which are chosen to look obscure:

     

    SIMCO &= ~0x07;

     

    can be written like this:

     

    foo_register = foo_register & 0xf8;

     

    and what the line of code is doing is clearing bits 2 down to 0 in the register. (SIMCO or foo_register are just names for a variable which has been set up to be in the memory location of  a control register in the processor).

     

    The best book, not only about C, but the best programming language manual ever is "The C programming Language" (this is only an opinion image).

     

    https://www.amazon.co.uk/C-Programming-Language-2nd/dp/0131103628/ref=sr_1_1?ie=UTF8&qid=1488793346&sr=8-1&keywords=c+pr…

     

    You'll still need some tutorial stuff to go with your chosen board but if you stick with TI or ST you'll be OK.

     

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
  • COMPACT
    0 COMPACT over 8 years ago in reply to michaelkellett

    There's nothing sinister at all.

    NXP, Cypress, Zilog, MicroChip and Silicon Labs are also great microcontroller manufacturers.

    Using mbed, you don't have to install any software at all!

     

    What is SIMCO?

     

    And why would one need to have __RESET_WATCHDOG(); included in their code to make something work with an MSP430?

     

    Neither these are defined in C.

     

    if (SIMCO=(4==0)) x=5; x=3;

     

    There are far too many technical considerations (development potholes) for the learner to worry about trying to learn c on an embedded system IDE.

    They'll have enough time deciphering standard statements like this.

    while(a=b){switch(a){case 0:a++;continue;case '5':b=b/*a*/%b;continue;default:--a;break;}b+=a<<1;}

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • COMPACT
    0 COMPACT over 8 years ago in reply to COMPACT

    Hopefully the influent C is not F fluent

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 8 years ago in reply to COMPACT

    itispossibletomakeenglishprettyincomprehensiblebyignoringtheusualconvetionsofpunctuationanduseofwhitespacedoinginresponsetoareasonablerequestforassitancefromabeginnerisntverynice

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • COMPACT
    0 COMPACT over 8 years ago in reply to michaelkellett

    That's just my style.

    My C statement is correct and contains the correct punctuation and whitespace.

    If you wish attempt to compile it.

     

    What's your "convetions" and "isn't" got to do with it?

     

    This is a reason why you should start learning C on a standard platform rather than an embedded one.

     

    A good learner's playground: http://processing.org

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube