ED201
May 4, 2018, 10:50pm
1
ADC->ADC_IDR=~(1<<27);
it looks to me like it is setting some interrupt for the analog pin and it is assigning something.
I wonder what it does. I am looking at some codes to read the analog pin on Ardino Due
and send the reading every 1 us to a buffer / RAM
I think that 1 us is the top speed for Due.
and what would be the difference with similar code
ADC->ADC_IER=1<<27;
those are good codes they compile with no errors but only on Due.
Why have you started a new thread about the same code? Why are YOU not reading the damned data sheet? ALL your questions are answered there.
ED201
May 5, 2018, 12:21am
3
the data sheet does not explain what for example ~(1<<27) means
it only says that ADC_IER is Interrupt Enable Register
But I have no idea that the code ADC->ADC_IDR=~(1<<27); ? does.
232
May 5, 2018, 1:13am
4
Bitwise complement operator ~
Bitwise compliment operator is an unary operator (works on only one operand). It changes 1 to 0 and 0 to 1. It is denoted by ~.
1<<27 is the single digit 1 left-shifted by 27 places. I'm not going to type out 27 zeroes but it will give you a value that looks something like 00010000000...
Add the ~ and your value looks like 111011111111....