Like Tree2Likes
  • 1 Post By whiteflags
  • 1 Post By Click_here

How important is objective oriented programming and Debugging for microcontrollers?

This is a discussion on How important is objective oriented programming and Debugging for microcontrollers? within the C Programming forums, part of the General Programming Boards category; How important is objective based programming and Debugging for programming microcontrollers? There's a chapter in my book called "objective oriented ...

  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    40

    How important is objective oriented programming and Debugging for microcontrollers?

    How important is objective based programming and Debugging for programming microcontrollers?

    There's a chapter in my book called "objective oriented programming" and another called "Debugging Programs."

    How importnat are these 2 things when it comes to programming microcontrollers like PICs and Arduinos?

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,638
    Debugging is always important. The programming methodology you choose to implement affects the way you debug. Since in object oriented programming your variables are encapsulated, you only have to look to operations that modify a certain variable related to a bug.

    Object oriented programming is possible on microcontrollers, but the ease of implementation will depend on the language you choose.
    stahta01 likes this.

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    40
    Quote Originally Posted by whiteflags View Post
    Debugging is always important. The programming methodology you choose to implement affects the way you debug. Since in object oriented programming your variables are encapsulated, you only have to look to operations that modify a certain variable related to a bug.

    Object oriented programming is possible on microcontrollers, but the ease of implementation will depend on the language you choose.
    I will be using C to program the microcontrollers. What language will "ease the implementation?"

  4. #4
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,638
    C++ or Java if they are available choices are good options. Since you are using C, you will probably want to search the web for C-related ways to use OOP, if you are interested. Search | Embedded

  5. #5
    Registered User
    Join Date
    Jan 2013
    Posts
    40
    Quote Originally Posted by whiteflags View Post
    C++ or Java if they are available choices are good options. Since you are using C, you will probably want to search the web for C-related ways to use OOP, if you are interested. Search | Embedded
    Ahh I don't know those 2 languages. Is there a disadvantage to using C?

  6. #6
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,638
    Not really. I am keeping my replies relevant to your question.

  7. #7
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,323
    Arduino is an implementation of C++ which uses OOP - This can simplify some designs.

    At the moment, I program a PIC in C for a living, and I always try to set up objects using structs and divide the program into different sections. Note that if you want function calls from a struct, use function pointers.

    For my last program, I chose a paradigm called "cooperative multitasking", which isolates the controlling code into different sections. I used the struct objects to divide the code in different sections.

    Bottom line is that you need to make sure your code is organised and it's up to you how you do it.
    stahta01 likes this.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 01-16-2013, 06:59 PM
  2. Replies: 6
    Last Post: 11-04-2010, 12:30 PM
  3. C Programming for Microcontrollers
    By CB4 in forum C Programming
    Replies: 4
    Last Post: 03-07-2005, 07:34 AM
  4. does anyone here do programming in objective C
    By Silvercord in forum C++ Programming
    Replies: 7
    Last Post: 03-19-2003, 02:48 PM
  5. Programming Objective C in Mac OSX
    By MacUser in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-17-2002, 08:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21