2 Replies Latest reply on Dec 1, 2016 2:00 AM by troels.brahe

    BLE data to DAC output

    troels.brahe

      Hi there

         

      I'm designing a data collection system which collects data over bluetooth using the Heart rate collector example. The data transmitter I've implemented on a different chip, but I've verified its functionality with debug mode in terminal. However, I want to set the level of the IDAC using the received "Heart rate". In the hrsc.c file, right under where it would usually print the heart rate to terminal in debug mode, I put IDAC_SetValue(HrscGetHeartRate()/4); The values I receive are between 0 and 1023, and the IDAC on the PSoC 4 is set to 8 bits, hence the division by four.

         

      However, when I run the code, this is what I get when I connect it to an oscilloscope:

         

      http://prnt.sc/dd7bj6

         

      The IDAC output constantly resets, as if running PWM mode. Here's a zoom-in:

         

      http://prntscr.com/dd7h16

         

      I can't figure out why this is happening, anyone have an idea?