element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Business of Engineering
  • Technologies
  • More
Business of Engineering
Forum If I Had a Hammer
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Business of Engineering to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 34 replies
  • Subscribers 244 subscribers
  • Views 4678 views
  • Users 0 members are here
Related

If I Had a Hammer

jack.chaney56
jack.chaney56 over 8 years ago

I used this as a clever draw to get more readers.  The actual intent is to start a discussion and get input from people for software.  Most of the discussions I have seen on the site are about inventing hardware solutions to popular problems.  I guess I am getting overloaded with how many ways there are to turn on an LED.  A significant amount of computer work is actually in the realm of information technology,  Too often what is lacking are skilled individuals that bring an array of tools to the task. The expression "If the only tool you have is a hammer, all your problems look like nails" is a problem I deal with in my professional life. I am constantly faced with vendors who provide the one pony circus (a million ways to make a state machine).

 

Embedded programming is a discipline that requires the developer to be expert at OS scheduling, database management, hardware interfacing, design architecture, and structured objects, as well as proper coding style, and best solution language. It is a constant process of sharpening the tool set to get the best solution. I have taken to putting some tools into retirement as well. Archiving example code and hint/help files is done periodically so I don't have to keep my COBOL skills current, but, by archiving properly, it is possible with a bit of effort, to blow the dust off a few brain cells, and get back in step with my Fortran lines starting in column 7. (...how old is this guy?)

 

Getting back to where I started with this, I wanted to put a call out to all you embedded PROGRAMMERS for tips and techniques and tricks learned that can become the foundation for tool boxes.

 

Tips like:

  • Thinking like a computer
  • Faster graphics and ray tracing
  • Integer only formulas
  • Weight loss (or wait loss) compression
  • T...I...M...I...N...G...

 

Again, some of these are done with hardware these days, but not all solutions have bottomless bank accounts. Sometimes a one chip 8-bit piece of hardware needs to run an 8 cylinder diesel fueling operation.

  • Sign in to reply
  • Cancel

Top Replies

  • jack.chaney56
    jack.chaney56 over 8 years ago in reply to ntewinkel +4
    ntewinkel , Precisely what I was referring to. Fixed point for calculations saves tons and tons of calculation overhead and saves boatloads of memory. Time for my first contribution to the tools. Fixed…
  • DAB
    DAB over 8 years ago +3
    Hi Jack, I can sympathize. Using high level programming languages hide a lot of detail you need to learn when going into embedded programming. Luckily I learned assembly language programming on an old…
  • rsc
    rsc over 8 years ago +3
    The most important tip I can think of is to document what you do, both hardware and software. When you get to the point you're writing code in several languages on several compilers for different projects…
  • rsc
    rsc over 8 years ago

    The most important tip I can think of is to document what you do, both hardware and software.

    When you get to the point you're writing code in several languages on several compilers for different projects,

    it's easy to forget what formula you used for s subroutine, or what version of the program is in the machine today.

    Always have a header in every file noting the last edit date, a change log, input and output variables, and any

    derived formulas or assumptions about initial conditions.  I'm working on a project that uses NFC chips to track

    software and hardware versions/changes.

    Scott

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • jack.chaney56
    jack.chaney56 over 8 years ago in reply to rsc

    Can I have a "yay" for rsc (Scott)!!!  If I had a nickel for every time I have had to review what I have done over the course of the project.., So often the thing that kills greatness is the paperwork, or lack of it. The old saying is "if you have an hour to cut down a tree, spend 45min sharpening the saw".  Preparation and design should happen before any hardware or software gets implemented.  All the decisions about having something done in hardware, or in software should be determined with both groups represented in the room as well. Also, make sure you have the expertise to work with the tools you want to implement. I was on a project that decided to use FPGA components for a bundle of the routing circuits, but ran into a bit of a block when it was discovered the one person that knew how to design the FPGA firmware had exited a month before integration testing.

     

    Big time thank you,

    Jack

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • koudelad
    koudelad over 8 years ago in reply to kas.lewis

    EDIT: My reply was quite long, so I decided to create a separate blog post from it: Using spreadsheets (Excel) for simple computations and approximations

    I think there will be a huge amount of information over time in this thread, so it will be more readable for newcomers.

     

    David

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Instructorman
    Instructorman over 8 years ago in reply to jack.chaney56

      

    Thanks jack.chaney56 for the coaxing. image

     

    The work mentioned in my post was done for a client that owns the IP, so any discussion will be devoid of details, but I can describe the process I went through in general terms

     

    Actually, after reading rsc's post on the importance of documentation, which I completely agree with, and your follow up, I realized I would be relying on the quality of my own documentation to remember how I solved the tricky bits of getting an ex equation into an 8 bit PIC.  I worked on this problem back in 2010, so I remember that I did it, and that spread sheets and lookup tables were involved, but the details are not readily accessible in my working memory.  This is a great case study to illustrate why good documentation is so important.

     

    I have found the project files and started to reacquaint myself with the details.  Looks like we will soon find out if my documentation from 7 years ago was of sufficient quality to allow me to resurrect the methods and share them here.

    I hope to post again in a few days with an explanation of how I solved the problem.

     

    Mark A.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • koudelad
    koudelad over 8 years ago in reply to jack.chaney56

    No big science happened there, I basically put all the constants, variables and the equation itself to a speadsheet and let the Excel calculate 10 000 values of an air pressure from 0 m to 10 000 m with a step of 1 m.

    Then I calculated the pressure difference between each of the 1 meter zone and estimated the error. The trend line could also be added (as described in my previous comment) with some approximation. For implementation into a microcontroller, sometimes a simplified equation works, sometimes a lookup table.

     

    I was only interested in destinations easily reachable by a tourist (ca. 0 - 2500 m) in that case image

     

    I wanted to emphasize that counting thousands of values to see the function behavior is just a matter of seconds for today's computers. And visualizing the data is often priceless.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • kas.lewis
    kas.lewis over 8 years ago

    This is one awesome discussion, especially since some of this info might be really helpful in one of my upcoming projects.

     

    Kas

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DAB
    DAB over 8 years ago in reply to rsc

    As we used to say, the job isn't finished until the paperwork is done!

     

    Planning and the lack of documentation has killed more projects than I can count.

     

    After all, what good is a great build if nobody can figure out how to use it. (yes this is in reference to my last road test report.)

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jack.chaney56
    jack.chaney56 over 8 years ago

    For people doing this as a hobby, I remember a relatively innocent posting* that showed up about 26 years ago today. Happy Birthday Linux

     

    Jack

    * From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds)
    Newsgroups: comp.os.minix
    Subject: What would you like to see most in minix?
    Summary: small poll for my new operating system
    Message-ID: <1991Aug25.205708.9541@klaava.Helsinki.FI>
    Date: 25 Aug 91 20:57:08 GMT
    Organization: University of Helsinki

    Hello everybody out there using minix –

    I’m doing a (free) operating system (just a hobby, won’t be big and
    professional like gnu) for 386(486) AT clones. This has been brewing
    since april, and is starting to get ready. I’d like any feedback on
    things people like/dislike in minix, as my OS resembles it somewhat
    (same physical layout of the file-system (due to practical reasons)
    among other things).

    I’ve currently ported bash(1.08) and gcc(1.40), and things seem to work.
    This implies that I’ll get something practical within a few months, and
    I’d like to know what features most people would want. Any suggestions
    are welcome, but I won’t promise I’ll implement them :-)

    Linus (torvalds@kruuna.helsinki.fi)

    PS. Yes – it’s free of any minix code, and it has a multi-threaded fs.
    It is NOT protable (uses 386 task switching etc), and it probably never
    will support anything other than AT-harddisks, as that’s all I have :-(.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • ntewinkel
    ntewinkel over 8 years ago in reply to jack.chaney56

    Wow! How awesome is that eh?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jack.chaney56
    jack.chaney56 over 8 years ago in reply to ntewinkel

    A friend handed me a printed copy of the posting when I got to work after Labor Day that year.  I've been hooked ever since (still have my old Yag CD).

     

    Jack.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • 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