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.

where to start?

Other Parts Discussed in Thread: RM46L852

Dear reader,

I recently bought the RM48 motor control kit. My background is mechanical engineer, specialized in dynamics and control. In my professional life, i work with matlab, and the compiling/linking/ loading is a simple ctrl+B action. As a hobby, I have experience with writing in assembly and programming the 89s52 atmel microcontroller (using rs232). I have some experience writing in C, and also javase and opengles for android.

I managed to create an empty project ( void main(void){} ) that i can allready flash on the RM48. Now my question is as follows: Is there a simple example that i can flash on the mcu that for example blinks one of the leds on the control card? Just to get some feeling. Is it possible to connect an analog or digital signal straight on to one of the mcu pins? or should this be done by e.g. can or spi communication with another microcontroller that has the sensor (pushbutton, potentiometer) connected? With the atmel, I never used communication. Only gpio, also for pwm output.

When answering please keep in mind that my background is not in electronics or microcontrollers and i have very little knowledge. The amount of information in a datasheet is allready quite overwhelming to me.

Yours sincerely,

Wesley

  • Here is a project to get started. It provides:4544.NoRTOS_CCS_RM46.zip

    1) SPI interface to serve the external watchdog (the TPS65381 power supply)

    2) SCI interface (similar to the rs232 you have played) (If you open a hyperterminal 19200 baudrate, 2 stop bits, no parity, you will see some output on the Hyperterminal)

    3)Blinking the GIOB7 LED as it serves the watchdog.

    Once you programed the .out file into the device, making sure the DIL switch position 2 and 4 (DRV GIOA4 and DRV PORST) are on (should be as out of box), and then power cycle the boards. After that, you should be able to see the output in the Hyper terminals (it indicates the watchdog failure counter) and the orange LED turn off and the GIOB7 blue LED flash very fast (roughly every 50ms)

    Regards,

    Haixiao

  • I am sorry that the project I created is for the RM46 motor control kit. I will get back to you later.

    Haixiao

  • Here is a project: 7484.RM48_Basic.zip

    1) SCI interface (similar to the rs232 you have played) (If you open a hyperterminal 19200 baudrate, 2 stop bits, no parity, you will see some output on the Hyperterminal)

    2) Blinking the HET1 LED as you type letter in the Hyperterminal

    Regards,

    Haixiao

  • Thanks for the help, but i cannot open the project. I get the following error:

    Error: Import failed for project 'RM48_Basic' because its compiler definition is not available. Please install the ARMv5.1 compiler before importing this project.

    I searched for this problem, found another .ccs file, and copied that content in your ccs file, which now looks like this:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <?ccsproject version="1.0"?>

    <projectOptions>
    <deviceVariant value="Cortex R.RM48L952zwtt"/>
    <deviceFamily value="TMS470"/>
    <deviceEndianness value="be32"/>
    <codegenToolVersion value="4.9.6"/>
    <isElfFormat value="true"/>
    <connection value="common/targetdb/connections/TIXDS100v2_Connection.xml"/>
    <rts value="rtsv7R4_T_be_v3D16_eabi.lib"/>
    <templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
    </projectOptions>

    <!--
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <?ccsproject version="1.0"?>

    <projectOptions>
    <deviceVariant value="Cortex R.RM46L852"/>
    <deviceFamily value="TMS470"/>
    <deviceEndianness value="little"/>
    <codegenToolVersion value="5.1.0.A12192"/>
    <isElfFormat value="true"/>
    <connection value=""/>
    <rts value="rtsv7R4_T_le_v3D16_eabi.lib"/>
    <templateProperties
    value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/>
    </projectOptions>
    -->

    However, I can still not open the project because of the same error. I searched for ARMv5.1 compiler for ccs but could not find anything. Any help is very welcome.

    Yours sincerely,

    Wesley

  • Sorry, now, I changed my compiler version to 4.9.6, the same as yours.

    A basic example to play with the HET1 LED and HyperTerminal (19200 baudrate, 2 stop bits, no parity bit). Type '1' in the Hyperterminal to turn on the HET1 LED while type '2' to turn off the HET1 LED.

  • Sorry for the inconvenience, but the link RM48_LED_CNCD.zip ( http://e2e.ti.com/images/5/55/RM48_LED_CNCD.zip ) does not work. 

    Can you please upload the file again.

    Yours sincerely,

    Wesley

  • http://processors.wiki.ti.com/index.php/RM48_CNCD

    search RM48_LED... to find the project.

    If this project still does not work for you, please:

    1) delete all the other files/folder except: include and source

    2) new a ccs project in the same location. Delete the main.c that is generated when you new the project. Add the include folder to the include search path. Re-compile.

  • Hi,

    I can build and load the code. However, the het1 light isn't going on when i type '1'. the board is responting to my keyboard input which i can see from the 'scirx' light flashes at each keystroke. (the light in the upper left most corner)

  • Hi,

    Now it works. I'm not sure what i'm doing, but i'll look into the code and see what is happening. Thanks for the start

  • Ok. Now I understand. The led positioned at HET1 is connected to a pin of RM48 which is the first bit of an address defined hetPORT1.

    So now i try to do the same for the led positioned at ERR. How do i know to which pin of the RM48 thes led is connected, and how this pin is named in c ?

  • On the same wiki page that you get the sample software, you can find the schematic of this board. The ERR LED is connected to the nError pin of our MCU. Once a critical error occurs, this pin will be automatically driven low and the LED turn on.

    There are many HET pins and GIO pin on the DIMM interface (like a memroy interface), if you have an oscilliscope or multimeter, you can force the HET ,GIO pin high/low and check on the DIMM interface.

    Haixiao

  • Thanks alot so far.

    I expanded the code with the following lines:

    if (receive_char =='1') {
    gioSetBit(hetPORT1,1,1);
    sciSend(scilinREG,25,(unsigned char *)"\nthe number is received\n");
    pwmSetDuty(hetRAM1,pwm0,0.01);
    pwmStart(hetRAM1,pwm0);
    }
    else {
    gioSetBit(hetPORT1,1,0);
    pwmStop(hetRAM1,pwm0);
    }

    I know this will not make the motor spinning. My intention is just to see if i understand what is happening. When pressing the 1 on my keyboard, i thought i would at least feel some jerking of the motor, since current goes through the wire and magnetizes it. Do you know why this is not happening?

  • I would like to use the encoder inside the teknic motor for position control. Therefore, I succesfully read the encoder pins.

    How many state changes is one revolution? What exactly is the difference between NHET pins and GIO pins? I read the pin every program cycle, but if the program grows larger, i might miss a state change (2 or more state changes in one program cycle) what can i use in such case? something with interrupt? Do you have some sample code? I have an external (linear) encoder I would like to connect using the spare pins in the dimm100 connector. How can these pins be accessed? is there something like a dimm100 splitter cable? How is this usually handled? I still don't know how to put some current on a motor coil. can you help me with that please?

    Yours sincerely,

    Wesley

  • There is a CCS project and GUI in the DVD in the box. Have you run this example? This project includes everything you are looking for: like the motor/encoder parameters, encoder feedback and sensorless feedback.

    This project is complicated for a beginner. I am thinking about building some other projects to help the beginnes to learn step by step. But this can not be done in this week.

    The HET is a real time co-processor. In this example, we write a small program in the HET RAM (different from the main 196k ram). And this instructions in the HET RAM controls the PWMs and read the encoder signal. It runs independant of the R4 CPU

    The R4 CPU then modify the HET RAM to change the PWM duty cycles and read the HET ram to get the encoder angle information. Of cause, all the FOC (field oriented control algrithm) are executed in CPU.

    Haixiao

  • A project to learn step by step would be very helpful to me. I'm now reading the foc_encoder_speed example, but there are so many functions and objects that I cannot understand it anymore. I don't know which functions there are available, and what exactly do they do. Besides that, the functions have different origin. There are functions specifically for the motor drive, but there are also functions from the communication or the core processor.

  • can you reccoment a good book that discusses all the modules that are in the hercules microcontroller? including simple examples on how to use them?