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.

CCS/RM48L952: HALCoGen ADC UART example

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello,

I am trying to get the ADC Display example from HALCoGen to work. I am using a custom board; not the HDK. Because of this, I do not have an ambient light sensor as discussed in the example guide as seen on the TI "How to Tutorial" web page (). In place of an ambient light sensor, I am using the Agilent 33220A function generator to send a sine wave with HiLevel set to 1 V and LoLevel set to 10 mV at a 1 kHz frequency. The internal ADCs of the RM48 are powered with 3.3 V, with the ADREFHI = 3.3V and the ADREFLO = GND (0 V). I have followed the setup suggested in the video with the exception of which ADC input pin is being converted (I am using AD1IN[05]). The current problem I am having is that, when I load and run my program, the output I get on my terminal is either (0x4095) or (0x0). In other words, my terminal only shows full scale or zero.

In summary:

1) I am using a custom board which has no ambient light sensor

2) I am trying to simulate sensor data using the Agilent 33220A to send a 10mV - 1V sine wave @ 1 kHz

3) I am enabling pin 5 for conversion instead of pin 9 (pin 9 is connected to the ambient light sensor on the HDK)

4) This setup results in an output to my SCI (UART) terminal of either 0x4095 or 0x0.

Any assistance which could be provided in order to get this thing up and running would be greatly appreciated!

  • Hi Calvin,

    So to be clear, you have the code compiled, executing, and running on the target with an SCI output of that is showing some data. This is a great start. I think the only thing we need to debug is the ADC interface and the voltage at the pin of the ADC. Are you connected to a debugger where you can check the results from the ADC conversion that is to be sent out? This way we can confirm if the result transmitted by SCI matches the result of the ADC. Also, is there any way to use a standard DC supply as the input to the ADC channel? i.e., lets remove the dynamic inputs and focus on a single voltage input to make sure that the conversion is happening as expected.

    I would also ask that you check your ADCREF inputs. Are they as expected? GND and your high limit (usually 3.6 or 5V dependent on your application). Finally, please verify the pin vs the ADC channel that is specified in the code to make sure you are converting the right pin. If nothing else, check the voltage at the pin you are using as the input to make sure the voltage at the pin matches the voltage you have input by the external supply and also make sure you share a common GND between the source and the custom board.
  • Hey Chuck,

    Thanks for responding so promptly! In response to your first sentence: Yes. Aside from that, the debugger tools I have access to are the XDS110 and Saleae logic analyzer. I am using the XDS110, but currently have not set up the Saleae. I will start attempting the following from what you listed:

    - Add some watches in order to validate that the terminal output is in congruence with the ADC output
    - Double check the ADCREF inputs (based on the schematic they should be 3.3V and 0V, but I will confirm)
    - Verify that ADC1 Group1 Pin 5 is the pin actually being converted (I will also do a voltage check)

    Regarding common GND, this should already be set up properly. I will verify that this is the case. I will respond once I have completed the check list. Thanks again!
  • Okay so I definitely found one of my problems. The schematic shows that there are 0 ohm resistors connecting 3.3 V to ADREFHI and GND to ADREFLO. When I went to check the voltages in on the REF pins, I got nothing. I then tested continuity, and there was no continuity... so I decided to observe the hardware, and sure enough... the 0 ohm resistors have not been populated even though the schematic says otherwise. I am going to get some 0 ohm (0603) resistors, or surface mount jumpers, to connect ADREFHI to 3.3 V and ADREFLO to GND as shown in the schematic. I already verified that 3.3 V is going to the correct 0 ohm resistor according to the schematic as well as GND to the other 0 ohm resistor. Aside from this problem, the following have been validated:

    - The terminal output correctly indicates the collected ADC conversion (this was done by adding watches to the variable holding the converted ADC value)
    - I am in fact using pin 5 (verified in both hardware and software)
    - We do have a common ground and have correctly connected to it
    - Voltage input is at the expected level (sending 1 VDC; changed from AC)

    I believe placing 0 ohm resistors where the schematic shows they were supposed to be will fix my problem and I will get back to you ASAP (once the parts come in and I solder them to their appropriate location in congruence with the schematic).
  • IT WORKS!!! Placing those missing 0 ohm resistors set the the refs to 3.3 and GND. I am now successfully able to send an AC signal to ADC1 input pin 5 and the terminal outputs the proper converted data. The debug list you provided me was my saving grace. Now for me to try and get my big picture working! Thank you for your time and consideration, I really appreciate the help you provided!
  • Calvin,

    So glad you were able to find the issue. I am a little surprised the resistors weren't placed by default given the on board POT used to change an ADC input and such. At any rate, let us know if anymore questions come up.