This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Need basic help with F28069 DAC.

Other Parts Discussed in Thread: CONTROLSUITE

Hello,

I apologize for my lack of knowledge on the subject, but I'm new to microcontrollers and I'm working on a project that requires me to employ ADCs and DACs to read and supply voltages.  I'm using an F28069 controlSTICK with code composer v6.  

I'm running the ADC SOC (28x) example and I believe I have the ADC components working.  I'm using pins ADC-A2 and ADC-A4 (pins 2 and 5 respectively), and now I'm hoping to make use of PWM1A-DAC (pin 31) for DAC.  I've looked into the header files for the project (adc.h and pwm.h) but I haven't found anything that looks relevant.  I'm not sure if there is some documentation I'm missing that might be useful, or even if I'm on the correct path.  

Much appreciated. 

  • Hi Kevan,

    The F28069 controlSTICK doesn't have a physical DAC instead it uses an external low pass filter on PWM1A channel to provide the functionality of a DAC. So to use the DAC on the controlSTICK, you have to configure PWM1A. There is an example code "SimpleDACtoADC" that is located in controlSUITE/development_kits/F28069 controlSTICK/. See if that helps.

  • Okay, I'll take a look at those files and incorporate them. I'll see how that goes. Thanks.
  • I've been experimenting with the example file SimpleDACtoADC and trying to understand how it works, but I was unable to properly import it into code composer. I received the following error when trying to import it:

    Unrecognized product of type 'com.ti.rtsc.XDAIS' is required by project 'SimpleDACtoADC' - please install at least one product of this type before building this project.
  • Are you sure it is an error? That looks like a warning for a path/variable issue. Try building the project because I think it should still build.

  • I tried building the project, but I get a null pointer exception, and the following messages:

    Could Not Find C:\ti\controlSUITESecond\development_kits\F28069 controlSTICK\ADC - SimpleDACtoADC\F2806x_RAM\F2806x_GlobalVariableDefs.pp
    DEL /F "F2806x_CodeStartBranch.obj" "F2806x_GlobalVariableDefs.obj" "SimpleDACtoADC-DevInit_F2806x.obj" "SimpleDACtoADC-Main.obj"

    Could Not Find C:\ti\controlSUITESecond\development_kits\F28069 controlSTICK\ADC - SimpleDACtoADC\F2806x_RAM\F2806x_CodeStartBranch.obj
    DEL /F "F2806x_CodeStartBranch.pp"

    Could Not Find C:\ti\controlSUITESecond\development_kits\F28069 controlSTICK\ADC - SimpleDACtoADC\F2806x_RAM\F2806x_CodeStartBranch.pp
    'Finished clean'
  • The message you attached is the log of a clean command. Build the project and attach the error log from that.
  • These are the errors I received.  I also have several warnings, most of them being path entry problems.  

    "../SimpleDACtoADC-Main.c", line 40: fatal error: cannot open source file "F2806x_EPwm_defines.h"

    "../SimpleDACtoADC-DevInit_F2806x.c", line 14: fatal error: cannot open source file "PeripheralHeaderIncludes.h"

    gmake: *** No rule to make target `C:/Users/device_support/f2806x/v100/F2806x_headers/cmd/F2806x_Headers_nonBIOS.cmd', needed by `SimpleDACtoADC.out'.

    gmake: *** No rule to make target `C:/Users/device_support/f2806x/v100/F2806x_headers/source/F2806x_GlobalVariableDefs.c', needed by `F2806x_GlobalVariableDefs.obj'.


    gmake: *** No rule to make target `C:/Users/device_support/f2806x/v100/F2806x_common/source/F2806x_CodeStartBranch.asm', needed by `F2806x_CodeStartBranch.obj'.

  • Kevan,

    Looks like your paths are corrupted which shouldn't happen for controlSUITE examples. Did you make any modifications to your controlSUITE installation especially the device_support directory? You can fix the paths manually but it shouldn't be required for controlSUITE examples. Try deleting the project and re-importing it again. If that doesn't help, the easiest solution would be to reinstall controlSUITE but if you aren't willing to do that, I can help you fix it manually but keep in mind this issue will extend to the other projects in that directory.

  • I've tried re-importing the project a couple times and it doesn't seem to help. I'm uninstalling controlSuite now, but the version that I was using didn't feature the SimpleDACToADC example. However, an older version of controlSuite I had installed did have the example, so the example file was at least stored on my computer somewhere. After you initially suggested it, I did a search for that file, and imported directly from whatever obscure directory it resided in, not through controlSuite. Is there a version of controlSuite I could download that features that example?
  • I've re downloaded controlSuite version 3.3.3 which was released on June 19th, which does not contain the SimpleDACToADC example. I had previously been working with an older version of controlSuite which did have the example, so I must have updated to the newer version. I have all the files for the example copied into my documents folder, so if there is a way to make the example work with just that I would really appreciate the help. I only need to have that one example running, so a one time solution is perfectly fine.

    Thanks again.
  • Kevan,

    I just did a fresh install of controlSUITE 3.3.3 into a separate directory and SimpleDACtoADC example still exists. Also, from controlSUITE release notes, it wasn't removed. One error from your error log is-> C:/Users/device_support/f2806x/v100/F2806x_headers/cmd/F2806x_Headers_nonBIOS.cmd'. It should be something like this instead->C:\ti\controlSUITE\device_support\f2806x\v100\F2806x_headers\cmd\F2806x_Headers_nonBIOS.cmd'. The highlighted section is missing. This might be your issue. Your controlSUITE installation should reside in C:\ti\controlSUITE. Perhaps try re-installation one more time before going the manual modification route. When you are re-installing, make sure the install directory is C:\ti\controlSUITE before clicking next.

  • I reinstalled and it seems to work just fine now. I also changed the target configuration which I think may have been causing some other problems. Thanks very much!
  • Glad you got it to work, if you run into any more issues, we will be here.