You are here

BLE data to DAC output | Cypress Semiconductor

BLE data to DAC output

Summary: 2 Replies, Latest post by Tachyon on 01 Dec 2016 02:00 AM PST
Verified Answers: 0
Last post
Log in to post new comments.
Tachyon's picture
User
4 posts

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?

user_1377889's picture
User
9596 posts

Welcome in the forum.

Check your values for negative numbers.

 

Bob

Tachyon's picture
User
4 posts

This was pretty obvious, but the answer was that the PSoC went into sleep mode any chance it got. Disabling this fixed the issue!

Log in to post new comments.