TWO-BITS ADC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I was performing the two-bits ADC example showed at page 8 in the

   

Understanding Switched Capacitor Analog Blocks paper.

   

      http://www.cypress.com/?docID=2617

   

I adapted the code to my CY8C24994 PsOC Device.

   

The C code force the Port 1 output by means handling the PRT1DR register

   

(which is detailed in page 100 and 141 in the technical Reference Manual) after evaluate the comparator output column (CMP_CR0 reg, page 180 Technical Ref Manual).

   

After check my program don't works I performed the most simple code I could imagine:

   

 

   

#include

   

 

   

       // part specific constants and macros

   

         

   

#include

   

"PSoCAPI.h" // PSoC API definitions for all User Modules

   

void

   

{

   

main()

   

TwoBit_cr3 &=

   

 

   

0x3F;while(1){

   

 

   

PRT3DR |=

   

PRT3DR=

   

}

   

}

   

0xFF;0xFF;

0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Would you mind to zip your project and upload it, so we can have a look at it? something in your code has disapeared-

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

According to the application node I found here http://www.cypress.com/?docID=29017 there is some more code toput into the application. have a look at appendix F.

   
   

Bob

0 Likes