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.

Creating project in CCS v5 for c2000 lounch pad and Simulating on proteus

Other Parts Discussed in Thread: CONTROLSUITE, LAUNCHXL-F28027

Hello Friends, 

This is the my first code for the C2000. I compiled it and converted the .out file in .hex and .coef.

But there is still problem in simulation with lab-center proteus. Can anyone solve. plse find the code and Simulation file in the attachment.

Regards

Dharmendra Sharma

INDIA5100.test.rar

  • Hi Dharam,

    Dharmendra Sharma said:
    But there is still problem in simulation with lab-center proteus. Can anyone solve. plse find the code and Simulation file in the attachment.

    How are you converting the out file to hex? I hope using hex2000 or in built feature available in CCS v6, right?

    Regards,

    Gautam

  • Hi Gautam,

    Thanks for reply. Yeah I am using the inbuilt feature available in CCS.

    Is there any problem with that or I have to use hex2000 ?

    and more...

    I did a lot work with msp430 with protues and there is no problem with that, now I am switching to C2000. I tried much to solve this problem but it is still. 

    and direction to work on C2000 are welcomed, if any. 

    Regards,

    Dharmendra Sharma

    INDIA

  • Dharmendra Sharma said:
    Is there any problem with that or I have to use hex2000 ?

    CCS v6 uses the same utility and this should not be the issue then. I've used Proteus for other products but not for C2000. Till now I didn't even know F28027 is present in the device library and to my amazement it is :)

    Dharmendra Sharma said:
    and direction to work on C2000 are welcomed, if any. 

    I've a C2000 launchpad itself and hence I never got the urge to use Proteus.

    Now answering your question, there are various hardware details you'll have go through. Refer the launchpad schematic present here: C:\ti\controlSUITE\development_kits\C2000_LaunchPad\LAUNCHXL-F28027\HwDevPkg

    Try implementing the same in Proteus (by extracting the important parts).

    Regards,

    Gautam

  • Gautam,

    Thanks a lot. Yeah F28027 and more, are there in proteus. I luv to work on proteus and I am looking for a simulation of piccolo F28027 on proteus before purchasing that one. 

    See that one , if you could. I tried everything from my point of view. thank U again.

    Regards,

    Dharmendra Sharma

    INDIA

  • Dharmendra Sharma said:
    See that one , if you could. I tried everything from my point of view. thank U again.

    Sure will try when I've some free time. But you do follow the schematic mentioned above and keep us informed.

    Regards,

    Gautam

  • Gautam,

    The problem in simulation is that the GPIO no 0 pin is always low instead of toggle.

    let me have another attempt with the schematic and proteus.

    would you have seen code. if not ...

    see this.... any error  if u could find, if any. 

    /*
    * main.c
    */
    #include "DSP28x_Project.h" // DSP28x Headerfile

    #include "f2802x_common/include/clk.h"
    #include "f2802x_common/include/gpio.h"
    #include "f2802x_common/include/pll.h"
    #include "f2802x_common/include/wdog.h"


    #ifdef _FLASH
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
    #endif

    void main()
    {
    WDOG_Handle myWDog;
    myWDog = WDOG_init((void *)WDOG_BASE_ADDR, sizeof(WDOG_Obj));
    WDOG_disable(myWDog);

    CLK_Handle myClk;
    PLL_Handle myPll;
    myClk = CLK_init((void *)CLK_BASE_ADDR, sizeof(CLK_Obj));
    myPll = PLL_init((void *)PLL_BASE_ADDR, sizeof(PLL_Obj));

    CLK_setOscSrc(myClk, CLK_OscSrc_Internal);

    PLL_setup(myPll, PLL_Multiplier_12, PLL_DivideSelect_ClkIn_by_2);

    GPIO_Handle myGpio;
    myGpio = GPIO_init((void *)GPIO_BASE_ADDR, sizeof(GPIO_Obj));

    GPIO_setMode(myGpio, GPIO_Number_0, GPIO_0_Mode_GeneralPurpose);
    GPIO_setDirection(myGpio, GPIO_Number_0, GPIO_Direction_Output);
    GPIO_setMode(myGpio, GPIO_Number_1, GPIO_1_Mode_GeneralPurpose);
    GPIO_setDirection(myGpio, GPIO_Number_1, GPIO_Direction_Output);
    GPIO_setMode(myGpio, GPIO_Number_2, GPIO_2_Mode_GeneralPurpose);
    GPIO_setDirection(myGpio, GPIO_Number_2, GPIO_Direction_Output);
    GPIO_setMode(myGpio, GPIO_Number_3, GPIO_3_Mode_GeneralPurpose);
    GPIO_setDirection(myGpio, GPIO_Number_3, GPIO_Direction_Output);

    GPIO_setHigh(myGpio, GPIO_Number_0);
    GPIO_setHigh(myGpio, GPIO_Number_1);
    GPIO_setHigh(myGpio, GPIO_Number_2);
    GPIO_setHigh(myGpio, GPIO_Number_3);

    while(1)
    {
    GPIO_setLow(myGpio, GPIO_Number_0);
    DELAY_US(1000000);
    GPIO_setHigh(myGpio, GPIO_Number_0);
    DELAY_US(1000000);
    }

    }

     

    Regards,

    Dharmendra Sharma

    INDIA