CY8c29466 - GPIO and Analog Input ADC

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 to all,

I'd like to control a DC motor (5A as nominal current, 14A as stall current) using a driver like VNH2SP30 (do you know an equivalent Cypress power DC driver?), I have done logic using SHADOW REGISTERS (to read buttons and to control leds or driver inputs) and GPIO interrupt (to read the encoder) (like AN2094). Also I have a PWM to control the motor. I have done all tests using port0 like input port (using interrupt manage to read an encoder) and port1 like output port: it works fine! Now I'd like to use analog input to acquire sense current and other 3 analog signals, I have read that I must use only port0 like analog port (using MUX) so I have tried to change input port from port0 to port2 but I have some problems: I have always the port2 inputs to high level (1) but my buttons is open! I have changed all pins configuration like pull-up, pull-down or High Z but I have always the same problem: with or without external connections the pin output is always 5V! I have connected my button between 5Vdc and input pin without any resistor (so it must be PULL-DOWN!). Can you help me? It's very strange! I attach the programs: "EFFEZANZA_ZanzaMotor.rar" is the working project (but without analog inputs and ADC), EFFEZANZA_ZanzaMotor_Port2.rar is the project that have the pins problems.

Regards

Andrea

0 Likes
3 Replies
SampathS_11
Moderator
Moderator
Moderator
250 sign-ins 250 solutions authored 5 questions asked

Hello Andrea,

I have checked both your projects, and think that this error should not occur.

Can you try to find if there are any issues with the hardware?

Thanks,

Sampath

0 Likes
Anonymous
Not applicable

Hello Sampath,

I have done a demoboard and I have tried to use this firmware but I must connect an external pull up resistor and I must set pins like  HIGH Z. In this mode all inputs work fine otherwise if I set all inputs as pulldown only 2 pins work fine! I don't know why!

Regards

Andrea

0 Likes

Hello Andrea,

We should not be configuring the pin as pulldown when external pull up resistor is used. This will cause the voltage at the pin to be in an invalid digital level.

Thanks,

Sampath

0 Likes