CCS C

 

http://www.cplusplus.com/doc/tutorial/arrays/

 


 

Fuses:

 

PIC16F876
#include <16F876.h>
#device adc=10
#FUSES NOWDT, XT, PUT, PROTECT, NOBROWNOUT, NOLVP, NOCPD, NOWRT, NODEBUG
#use delay(clock=4000000)

 


 

Wow:

http://mdubuc.freeshell.org/Robotics/Tips.html

http://frontrangerobotics.org/PIDbackEMF/DavesBEMFmotorArticle.htm

http://www.gooligum.com.au/

 


The syntax of the conditional operator is

	e1 ? e2 : e3

and what happens is that e1 is evaluated, and if it's true then e2 is evaluated and becomes the result of the expression, otherwise e3 is evaluated and becomes the result of the expression. In other words, the conditional expression is sort of an if/else statement buried inside of an expression.

..

The conditional operator evaluates an expression returning a value if that expression is true and a different one if the expression is evaluated as false. Its format is:


condition ? result1 : result2

 


Notice the difference between the reference and dereference operators:

  • & is the reference operator and can be read as "address of"
  • * is the dereference operator and can be read as "value pointed by"


Thus, they have complementary (or opposite) meanings. A variable referenced with & can be dereferenced with *.