cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 4

Anonymous
Not applicable

My pins to LEDS look like they are in series... each needs to be controlled by a different sensor. What am I doing wrong?

0 Likes
1 Solution
Vasanth
Moderator
Moderator

Hello Sean,

You have kept your ADC in free running mode. So the ADC will be sampling the data continuously. In such situations you have to make sure that you are reading the ADC result register after one conversion cycle is complete. For this ADC_IsEndConversion() API can be used. ADC_WAIT_FOR_RESULT if used as parameter will wait for the result to be available. The ADC result thus obtained can be used to update the PWM compare value.

Best Regards,
VRS

View solution in original post

0 Likes
5 Replies
Vasanth
Moderator
Moderator

Hello Sean,

Could you please give more details here ? Could you give more information about your design ? Did you place multiple pin components in your design to control them individually ? How your sensors are used to control the LED ?

Best Regards,
VRS

0 Likes
Anonymous
Not applicable

I have 3 sensors inputs on three channels of an ADC.. The pins are set to

Analog input.

I have one clock going to three PWM's each PWM is programmed to dim an LED.

The three output pins are digital hardwired and when I choose different

pins for this... Sometimes it controls two LEDs, sometimes one... When the

software picks the pins it controls all three.

The goal is to do the simplest thing... Input1 controls only output 1,

Input2 controls only output 2, and

Input3 controls only output 3.

I am new to PSoC and I am not sure what pins I can use.

This is a PSoC 4 BLE kit.

0 Likes
Vasanth
Moderator
Moderator

Hello Sean,

Could you please share your project in that case. In PSoC Creator ,  go to File -> Create Workspace Bundle -> Select minimal. Please attach the generated file.

Best Regards,
VRS

0 Likes
Anonymous
Not applicable

I am trying to add a read of the three sensors read outs to the Cypress

bluetooth app as well. This is for a shoe insert (shoe_code).

Thank you for your feedback. It is much appreciated!

Sean

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

Virus-free.

www.avg.com

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

0 Likes
Vasanth
Moderator
Moderator

Hello Sean,

You have kept your ADC in free running mode. So the ADC will be sampling the data continuously. In such situations you have to make sure that you are reading the ADC result register after one conversion cycle is complete. For this ADC_IsEndConversion() API can be used. ADC_WAIT_FOR_RESULT if used as parameter will wait for the result to be available. The ADC result thus obtained can be used to update the PWM compare value.

Best Regards,
VRS

View solution in original post

0 Likes