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

tx buffer to pin

Hi I have an ADC that just recive, but i will need to make an buffer that makes tx values and just send them to a output pin.

So I wonder how i should code this and if it possible?

  • Hi. Can you explain your scenario a little better? Are you using nRF51822? Do you use internal ADC of the nRF51822, or an external ADC?

  • Hi.I am using the nrf51822 PCA10001 as master to the spi, and mcp3201 ADC to recive, but my code need me to make a fake Tx buffer and send them out on a GPIO pin. So i have both transmit and recive. So i wonder how i should do this?

  • Hi Morten

    I still do not understand you scenario. Can you explain in more detail. How SPI connects between the PCA10001 and mcp3201 ADC and why you can not use SPI both to send and receive? I am sure I can give an input if I understand better your scenario.

  • Sorry for bad explanation.

    My scenario is that i have build a adapter card with i2c and spi. The spi's function is just to read +in and convert them to digital output. I have now got my CLK and CS to work. The problem is that i dont know how to make an interupt handler to stop the clk signal when the data is recived. MCP3201 is miso only thats why i thought that i needed a fake buffer. another problem that i have is that i dont get any miso data back even when i test the spi master example that is with the nrf51822.

    so i just wonder if you maybe have som tip and tricks. From Morten, (Hope this make things better to understand).

  • So I understand you so that you have a device connecting to the nRF51 via SPI, you have your device configured as SPI slave and then you configure the nRF51 as SPI master, and you want to transfer data from your SPI slave device to the nRF51 SPI master, am I correct?