How to fire pulse using button on PSoC 4?

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

cross mob
AmMa_2724956
Level 2
Level 2
First like received

I am using PSoC 4 CY8CKIT042 BLE Pioneer kit. I want generate pulse when I press a button and count the number of  pulses by capturing them and firing them on serial port. I am using CY8C4248LQI-BL583.

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

Divide et impera.

When I understand you right:

  1. Enable the pulse counter
  2. Enable UART
  3. When push the button (read pin) a stream of pulses is generated -> Start a PWM
  4. When button released (read pin) -> Stop the PWM, read pulse counter, convert to ASCII, send via UART, clear Pulse counter
  5. Loop to 3.

Try to implement and test one part after the other, use the debugger, use comments in your code

Bob

View solution in original post

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

Divide et impera.

When I understand you right:

  1. Enable the pulse counter
  2. Enable UART
  3. When push the button (read pin) a stream of pulses is generated -> Start a PWM
  4. When button released (read pin) -> Stop the PWM, read pulse counter, convert to ASCII, send via UART, clear Pulse counter
  5. Loop to 3.

Try to implement and test one part after the other, use the debugger, use comments in your code

Bob

0 Likes