Can't make PSOC1 DAC to work

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

thanks to the community I've solved many problems but this one made me desperate.

   

My project is controlling speed of a low power brushed dc motor by controlling openning of a mosfet transistor. I prototyped it with development kit-001 and psoc3 but due to the cost I have to move to psoc1. 

   

None of my trial to start DAC working succeeded. I have gone through lots of appnotes and datasheets but still no luck. My project has to go to the PCB stage but I have no luck with choosing chip - PSOC3 is expensive but PSOC1 is not working.

   

Cypress support is no help for me - they tend to reply once per 10 days with most ideas not relative to my project. I get more surveys from them then help.

   

Lately I followed psoc1 example#3 "ADC to UART with DAC" just to make sure I do everithing right but again DAC not  working. I think, I missed something because compiled example is working. 

   

Attached project is my trial to follow the examle with the same hardware settings and copied main.c - and still doesn't work. I can't understand that.

   

Any help is greatly appreciated,

   

Oleg

   

and another questions: any ideas what the output impedance of the dac? do I have to buffer it with opamp in order to control gate of a mosfet?

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

Found error and corrected it, including two cosmetical changes.

   

Interrupts are not that easy in PSoC1, had some similar experiences...

   

 

   

Happy coding

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

(&/$%§CK) ... and here's your project file...

   

 

   

Bob

0 Likes
Anonymous
Not applicable

You the man Bob!  

   

Whas that interrupt not occuring? But code was copied from example and hardware set the same. what is the secret?

   

Any ideas about output impedance of the DAC?

   

BR,

   

Oleg

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

This might assist on the buffer Z question -

   

 

   

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

   

 

   

Regards, Dana.

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

Hi Oleg,

   

in PSoC1 the handling of interrupts is not as easy as in PSoC3/5. Within the file "BOOT.TPL", which is only a template-file from which "BOOT.ASM" is generated, you may isert a call/jump to your interrupt routine. For your components, as timer, UART etc. this is already cared for, have a look into "Boot.ASM". But within the component's interrupt-handler, usually named ComponentName_INT.ASM" you will find a clearly marked location where to insert an "LCALL" to your C-interrupt routine. Since you declared that routine with a #pragma instruction to be an interrupt handler you do not need registersave and restore macro and you should use an "LJMP" instruction instead. Have a look into your "Counter16_1_INT.ASM"-file. It was generated in the build-process and modified accordingly by me.

   

There (here: http://www.cypress.com/?id=4&rID=36720 ) is an App-Note concerning interrupts in PSoC1.

   

 

   

Happy coding

   

Bob

0 Likes
Anonymous
Not applicable

Thanks a lot Bob. Clear now. 

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

You are always welcome!

   

Bob

0 Likes
chmoc_1567941
Level 4
Level 4

hii 

   

i require 4-20mA ouput. i have CY3210-psocEval1 board. how can i do it???

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

Welcome in the forum. The post is a couple of years old, usually it is better to start a new thread.

   

You will not get 4..20mA out of a PSoC, but there are driver ICs for this interface which you should use.

   

 

   

Bob

0 Likes