All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Embedded Systems and Microcontrollers

Notices

Embedded Systems and Microcontrollers Discussion forum for projects and working with embedded systems and microcontrollers (FPGAs, PICs, AVRs). Get help with hardware issues and embedded programming.

Reply   Post New Thread
 
Thread Tools Display Modes
  #11  
Old 04-14-2012, 05:17 AM
WBahn WBahn is offline
Senior Member
 
Join Date: Apr 2012
Location: Larkspur, Colorado
Posts: 7,815
Blog Entries: 9
Default

Oh, and Stuntman, none of my rant (and I suspect Mr. Chips' as well) was directed specifically at you. In fact, I applaud you for asking the question you did in order to get a better understanding, especially since you (thought you) had found a solution to your problem. Too many people are like monkeys at a keyboard and as soon as they find some random way of writing the code the produces the immediately desired answer, will mark the issue resolved and moved on. You didn't -- and good for you!
Reply With Quote
  #12  
Old 04-15-2012, 12:05 AM
Stuntman's Avatar
Stuntman Stuntman is offline
Senior Member
 
Join Date: Mar 2011
Location: The Great Midwest
Posts: 113
Default

I appreciate the comprehensive explanation, I did not realize this was a rudimentary concept in C for mcu's.
Reply With Quote
  #13  
Old 04-15-2012, 12:09 AM
CVMichael CVMichael is offline
Senior Member
 
Join Date: Aug 2007
Location: Canada, Toronto
Posts: 410
Default

That's basics in C, in general, not just MCUs
Reply With Quote
  #14  
Old 04-15-2012, 12:14 AM
WBahn WBahn is offline
Senior Member
 
Join Date: Apr 2012
Location: Larkspur, Colorado
Posts: 7,815
Blog Entries: 9
Default

It's not just a rudimentary concept in C for MCUs, it is a rudimentary concept in the C language, period.

Since code compiled for an integer-only processor (as most MCUs are) has to work under much greater restrictions and suffers much greater penalties for having to emulate things that other processors support natively, I highly recommend becoming familier with the C standard. While you have to buy the actual standard, you can download the draft standard for free from a lot of places and there are very few differences (I'm not aware of any that are of substance, but I could be wrong). It is a big document and can be intimidating, so take it in chunks. Use it to explore specific issues and questions, first. There are a lot of things there, especially in the early material, that will be hard to wrap your mind around. That's fine, read it anyway and some of it will make a bit of sense and then, as you work with the material, more chunks will start to make sense. Trust me, you will learn a LOT about a LOT more than C. You will get a glimpse of how high level programs are made to work under the hood and that will greatly expand the toolbox you havefor figuring out how to even attack complex problems with an MCU, an FPGA, or even scratch logic.
Reply With Quote
  #15  
Old 04-15-2012, 12:28 AM
MrChips's Avatar
MrChips MrChips is offline
Super Moderator
 
Join Date: Oct 2009
Posts: 8,355
Blog Entries: 23
Default

This is rudimentary in all computer languages. One needs to be aware of how all variables are stored and manipulated on a computer.
__________________
Most computer problems can be attributed to a simple problem - a loosewire behind the keyboard.

Reply With Quote
  #16  
Old 04-15-2012, 01:14 AM
WBahn WBahn is offline
Senior Member
 
Join Date: Apr 2012
Location: Larkspur, Colorado
Posts: 7,815
Blog Entries: 9
Default

Agreed. It is one of the reasons why I hate dynamically-typed languages where the compiler/interpretter gets to choose what kind of data storage I need. I don't want a compiler that does too much of my thinking for me and I want to be able to easily force it to do what I want in most circumstances. This is becoming harder and harder to do; yes, it is also making it easier for relatively unskilled programmers to make working code that doesn't have many of the flagrant flaws and weaknesses that a less capable language/compiler might produce, but it also makes programmers stay unskilled and shrinks the pool of programmers that really know what they are doing. As with all things, it's a tradeoff and there really are reasonable and valid arguments for both sides and, as usual, the key is in striking the proper (hard to even define) balance, but for the most part, we aren't even discussing finding a balance, but instead just charging down the road to complete dependency on the tools to take our ill-formed notions and produce quality code that gets it right. There's a day of reckoning down that road.
Reply With Quote
Reply   Post New Thread

Tags
, ,


Related Site Pages
Section Title
Worksheet Analog-to-Digital conversion
Worksheet Binary math circuits
Textbook Conversion from decimal numeration : Numeration Systems


Similar Threads
Thread Thread Starter Forum Replies Last Post
help using a logic gate to do multiplication and division denisdaniel The Projects Forum 2 04-04-2012 09:18 PM
Treadmill motor / voltage, controller board issue animateme The Projects Forum 1 06-03-2011 04:48 PM
Virtual ground issue Shashi_PMTC The Projects Forum 8 03-03-2011 04:53 AM
Usb issue aliashar86 General Electronics Chat 2 02-09-2010 03:06 PM
boolean algebra - multiplication and division arwin Homework Help 5 02-03-2008 10:30 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:24 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.