This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How can I send a signal from one pin to another pin?

Hello! I am putting (with a wave generator) a square wave on pin 17 of the microcontroller, and I want that same wave to come out on pin 18. How do I do that? Do you have any specific commands? Thanks

Parents
  • Hello B

    There are a couple of ways to do this, but I believe the one with the smallest latency is using GPIOTE to sense the high-to-low or low-to-high transition on the input pin, and make that cause a change in the output pin via PPI. This will allow the input pin to change the output pin without the processor core being involved (no handler execution).

    I have attached a main file illustrating the concept, it is a rewritten version of the peripheral template from SDK 12.3.0 for the PCA10028, and should work by just replacing the template code with it.

    It uses the high accuracy GPIOTE event (toggle, created by pressing button 1) to trigger a GPIOTE task (toggle on LED1) via PPI.

    main.c

    Best regards

    Jørn Frøysa

  • The frequency is 200Hz In fact I would like to see how the micro reads this signal, so it would put an oscilloscope on the output pin to see.

Reply Children
No Data
Related