View Single Post
Old 08-30-2013, 06:44 PM   #26 (permalink)
nickdigger
EcoModding Apprentice
 
Join Date: Aug 2009
Location: terra firma
Posts: 138
Thanks: 4
Thanked 24 Times in 22 Posts
Quote:
Why are you shifting a zero?
To self-document the code. The pre-compiler washes it out, and it costs nothing. It is a carryover from the dual-int setup, which has
EICRA= (1<<ISC01) | (0<<ISC00) | (1<<ISC11) | (1<<ISC10), or the obverse, depending on injEdge.

Quote:
Let's go over my logic for EICRA, shall we?
OK. I read (EICRA & ~(1 << ISC01)) | (1 << ISC00) as
(EICRA & ~(1 << ISC01) | (1 << ISC00)). I didn't expect anyone would tiptoe around the EICRA bits since they only handle the two interrupts.

Quote:
It would, of course, help to not assume that I just make typos and other errors.
So did (1 < INTF0) work by accident, instead of (1 << INTF0) ? Anyway, i'll try setting it.
  Reply With Quote
The Following User Says Thank You to nickdigger For This Useful Post:
t vago (09-02-2013)