- Thread starter
- #21
I agree the propeller is nice, thats actually an awesome device, I might grab a few for future projects.
The problem is, for a tach or other timing-critical device your accuracy is determined by how well you know your instruction timing. When you write in a higher level language you usually won't know just how many instructions it takes to execute a line of code - best case is only one but you could actually wind up with 4 or many more instructions on a line. Python is actually pretty bad in this respect, as many of the functions are sorta like C macros... layers and layers of hidden instructions.
Example:
C:
You don't know if you compiler is going to translate that to:Code:i++;
or in a worst case something like:Code:incf i;
On a computer you might have a background timer to keep things in sync, but on an embedded device you don't.Code:movfw i; addlw 0x01; movwf i;
Its funny this came up, I have a bunch of ideas I'd like to try for my BJ42... combining hobbies, I guess. For one I want to rig up a new glow controller that lights up when a certain plug temperature is reached (rather than the simple coil used now). I've also been thinking about a cruise control........
Ok well I can't argue with that... I do know that the higher level languages keep you out of the muck but they also don't let you see what is happening in the muck. It works great for sysadmin stuff, not so much for timing critical stuff. Perhaps we need to split out the timing critical stuff to the pic, but the display stuff to the propeller.
I think we have a good start to a team here... perhaps we should take this off to a more appropriate site. Any suggestions for that?