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/CC2650: Triggering GPIO pins in cc2650

Part Number: CC2650

Tool/software: Code Composer Studio

in arduino the max value of analog pin is 255.In the same way if i want to set the output value for analog pin in cc2650 how can i do that please do help me(what is the maximum value)

Thanks a lot in advance(I am using LAUNCHPAD)

  • There is a PWMLED example which should answer all your questions.

    In the example, the duty cycle is really the on-time. Since the period is 3000 us, the maximum duty is 3000, too.
  • Hi likith,

    You said "in Arduino, the max value of the analog pin is 255", Ok what do you mean? Do you want to say that input voltage between 0 and 5 volts maps into integer values between 0 and 255(it's about analogRead() function.)? If you have this in your mind as I know the Arduino ADC is 10 bit so that the max integer value could be 1023.
    Please clarify more about what you mean about max value of analog pin in Arduino so that I can help you more about CC265.


    Regards,
    Hossein
  • yes exactly the analogwrite function how to map the voltage level of 0 to 3.3v in ccs and use in Pin_setOutputvalue function please do help
    thanks a lot in advance
  • Hossein:
    "Analog Output" on the Arduino is not analog output. 8^). Like the TI's, generally MCU's don't have DAC's. It is PWM, where 255 is full on (Duty cycle = 1) and 0 is full off.
  • Pin_setOutputValue() is a digital function. It uses a 32 bit value to set 0 or 1. 8^) It cannot be used for "analog output", whatever that means for you.
  • Hi Keith,

    You are completely right and 255 means 100% of duty cycle and typical MCUs such as those on Arduino boards and TI MCUs have not DAC unit so there could not be any analog write function. But as I mentioned in the first post I was trying to have a comparison with Arduino analog read and something equivalent to it for TI MCUs because I was aware of lack of DAC unit on MCUs, while the answer to likith was related to PWM unit.

    Thanks and Regards