View Single Post
Old 01-02-2015, 05:52 AM   #7 (permalink)
Madact
EcoModding Apprentice
 
Join Date: Aug 2014
Location: Adelaide, Australia
Posts: 120

Emerald - '97 Honda Civic CXi
90 day: 40.13 mpg (US)
Thanks: 53
Thanked 53 Times in 32 Posts
Quote:
Originally Posted by Singletree5990 View Post
As a side note: I did encounter what I suspect was an issue
with Arduino-0011 properly handling statements to modify
bits within the ADCSRA register.
I was trying to write "00000101b" by using
different permutations of
"ADCSRA|=((1<<ADPS2|1<<ADPS0)&!(1<<ADPS1));"
but had to resort to
"ADCSRA=5;"
to achieve the desired value in the register.
Very old thread, I know, but just for the benefit of anyone coming across this bit: "!" is a "boolean not", and will return 0 (false) if the operand is non-zero (true), and 1 (true) if the operand is zero (false). You were probably thinking of the operator "~", which is binary inverse.
  Reply With Quote
The Following User Says Thank You to Madact For This Useful Post:
RustyLugNut (01-02-2015)