- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone ,
I have purchased Psoc1 development kit . i have got one application note of Psco1 blood presure monitoring system which i am trying to implement. i am not understanding this part of a macro actually in code .
#DEFINE INSAMP_OUT_TO_ADC ASC21CR1 & =0x80 ; ASC21CR1 |=0x9F
it is anding the register ASC21CR1 with a value 0x80 but after that what does the semicolon do.
what does the semicolon do.
and the other thing in TRM this register ASC21CR1 has got two inputs A inputs & C inputs for different bits
which input is selected and what is the significance of this two inputs.
i have attached the image of this register.please help me...
thanks & regards
asma
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The A and C inputs are internal parts of one of the analog blocks (which is nothing for the rookies to deal with).
I cannot tell much about your #define (yet) can you post a link to the original appnote?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found it in AN58128. The line is:
#define
INSAMP_OUT_TO_ADC ASC21CR1&=0x80; ASC21CR1|=0x9F
This macro generates two C-statements. The first is clearing bits 0 to 6 of the register anf the next is setting bits 0 to 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank u ....but still i am confused with A & C inputs. theres something to do with it. which input is selected when we change the value of registers
thanks & regards
asma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This might help -
http://www.cypress.com/?rID=2899 AN2049 Ap note and video.
And at bottom of link page more ap notes and links.
Regards, Dana.