- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
The IDAC output constantly resets, as if running PWM mode. Here's a zoom-in:
I can't figure out why this is happening, anyone have an idea?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum.
Check your values for negative numbers.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was pretty obvious, but the answer was that the PSoC went into sleep mode any chance it got. Disabling this fixed the issue!