Jump to content

Search the Community

Showing results for tags 'tm4c1294ncpdt'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

Found 8 results

  1. Hi all! We are using Tiva C series MCUs (TM4C1294XL and TM4C123GXL) for a project in IICDC 2019 but we are facing problems while implementing Controller Area Network protocol (CAN Protocol) using them. I've attached the basic code for sending messages via CAN protocol form one MCU to other but the problem is, it is not doing so as a message sent from one MCU is received by itself and not by other MCU in the network. We've tried using the filters as well but no progress. Any help would be really appreciated. P.S. - Do we require an extra CAN transceiver boosterpack for these modules? dph_CANExamplePolled.ino
  2. I am working on TM4C1294XL board and through Energia platform. I am trying to interface HMC5883L of GY-80 with TM4C1294XL board. I am getting static outputs irrespective of whether I initialize all the essential registers or initialize none, the static outputs do not change in both cases. I am pasting the code below, I suspect that something should be wrong with the code as there nothing much to do in connection (only four wires needed). #include "Wire.h" #define cra 0x00 #define crb 0x01 #define modeReg 0x02 #define data_X_MSB 0x03 #define data_X_LSB 0x04 #define data_Y_MSB 0x07 #define data_Y_LSB 0x08 #define data_Z_MSB 0x05 #define data_Z_LSB 0x06 #define statusReg 0x09 #define ID_reg_A 0x10 #define ID_reg_B 0x11 #define ID_reg_C 0x12 int magAddress = 0x1E; int X0,X1,Y0,Y1,Z0,Z1,X_out,Y_out,Z_out; float Xm,Ym,Zm; void setup(){ Wire.setModule(0); Wire.begin(); Serial.begin(115200); delay(100); Wire.beginTransmission(magAddress); Wire.write(modeReg); Wire.write(0x00); Wire.write(cra); Wire.write(0x38); Wire.write(crb); Wire.write(0xA0); Wire.write(data_X_MSB); Wire.write(0x00); Wire.write(data_X_LSB); Wire.write(0x00); Wire.write(data_Y_MSB); Wire.write(0x00); Wire.write(data_Y_LSB); Wire.write(0x00); Wire.write(data_Z_MSB); Wire.write(0x00); Wire.write(data_Z_LSB); Wire.write(0x00); Wire.endTransmission(); } void loop(){ Wire.beginTransmission(magAddress); Wire.write(data_X_LSB); Wire.write(data_X_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1 = X1<<8; X_out = X0+X1; Xm = (X_out); } Wire.beginTransmission(magAddress); Wire.write(data_Y_LSB); Wire.write(data_Y_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1 = Y1<<8; Y_out = Y0+Y1; Ym = (Y_out); } Wire.beginTransmission(magAddress); Wire.write(data_Z_LSB); Wire.write(data_Z_MSB); Wire.endTransmission(); Wire.requestFrom(magAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1 = Z1<<8; Z_out = Z0+Z1; Zm = (Z_out); } Serial.print("Xm = "); Serial.print(Xm); Serial.print("\t"); Serial.print("Ym = "); Serial.print(Ym); Serial.print("\t"); Serial.print("Zm = "); Serial.println(Zm); delay(200); }
  3. I am working on TM4C1294XL board and through Energia platform. I am trying to get the outputs from BMG250 shuttle board. I am pasting the code below but I believe the code has no fault. I have doubts about the connections to the shuttle board. I am getting -1 (when dividing outputs by 256) in all the three axis. I am sharing the schematic pdf that has information about the shuttle board connections. I have connected as given in the file but I have the following doubts: 1. How can set the pmu_status to normal gyroscope as it is mentioned in the datasheet as only readable? And when I read the pmu_status to know the current mode, I only get a 0 as the output and no output comes for the three axis. 2. In the schematic pdf, it can be seen that there are multiple SDO, SCL etc. Should I connect them to each other or use only one of them? Somebody help me out. Code :- #include "Wire.h" #define pmu_status 0x03 #define data 0x12 #define gyr_config 0x42 #define gyr_range 0x43 #define offset 0x74 #define dataReadyStatus 0x1B #define X_axis_dataX0 0x12 #define X_axis_dataX1 0x13 #define Y_axis_dataY0 0x14 #define Y_axis_dataY1 0x15 #define Z_axis_dataZ0 0x16 #define Z_axis_dataZ1 0x17 #define command 0x7E int gyrAddress=0x68; long X0,X1,Y0,Y1,Z0,Z1; long X_out,Xg,Y_out,Yg,Z_out,Zg; void setup() { Wire.setModule(0); Wire.begin(); Serial.begin(115200); Wire.beginTransmission(gyrAddress); Wire.write(gyr_config); Wire.write(0x28); Wire.write(command); Wire.write(0x15); Wire.write(gyr_range); Wire.write(0x00); Wire.endTransmission(); } void loop() { Wire.beginTransmission(gyrAddress); Wire.write(X_axis_dataX0); Wire.write(X_axis_dataX1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1 = X1<<8; X_out = X0+X1; Xg = (X_out)/1.0; } Wire.beginTransmission(gyrAddress); Wire.write(Y_axis_dataY0); Wire.write(Y_axis_dataY1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1 = Y1<<8; Y_out = Y0+Y1; Yg = (Y_out)/1.0; } Wire.beginTransmission(gyrAddress); Wire.write(Z_axis_dataZ0); Wire.write(Z_axis_dataZ1); Wire.endTransmission(); Wire.requestFrom(gyrAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1 = Z1<<8; Z_out = Z0+Z1; Zg = (Z_out)/1.0; } Serial.print("Xg = "); Serial.print(Xg); Serial.print("\t"); Serial.print("Yg = "); Serial.print(Yg); Serial.print("\t"); Serial.print("Zg = "); Serial.println(Zg); delay(200); } SCHEMATIC1 _ BMG250.pdf
  4. I am trying to interface GY-80 (only adxl345) to TM4C1294XL board using Energia. But outputs comes out to be 0. And also there comes this error "Failed to load dynamic library: 'ftd2xx.dll' " while uploading but the code gets uploaded successfully. I am pasting the code below, can somebody tell me where i am doing it wrong? #include "Wire.h" #define Power_Register 0x2D #define BW_rate 0x2C #define Int_enable 0x2E #define dataFormat 0x31 #define X_Axis_Register_DATAX0 0x32 #define X_Axis_Register_DATAX1 0x33 #define Y_Axis_Register_DATAY0 0x34 #define Y_Axis_Register_DATAY1 0x35 #define Z_Axis_Register_DATAZ0 0x36 #define Z_Axis_Register_DATAZ1 0x37 #define fifoCntrl 0x38 int ADXAddress = 0x53; int X0,X1,X_out; int Y0,Y1,Y_out; int Z1,Z0,Z_out; float Xa,Ya,Za; void setup() { Wire.setModule(0); Wire.begin(ADXAddress); Serial.begin(115200); delay(100); Wire.beginTransmission(ADXAddress); Wire.write(Power_Register); Wire.write(8); Wire.write(BW_rate); Wire.write(10); Wire.write(dataFormat); Wire.write(11); Wire.write(fifoCntrl); Wire.write(0); Wire.endTransmission(); } void loop() { Wire.beginTransmission(ADXAddress); Wire.write(X_Axis_Register_DATAX0); Wire.write(X_Axis_Register_DATAX1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { X0 = Wire.read(); X1 = Wire.read(); X1=X1<<8; X_out =X0+X1; } Wire.beginTransmission(ADXAddress); Wire.write(Y_Axis_Register_DATAY0); Wire.write(Y_Axis_Register_DATAY1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Y0 = Wire.read(); Y1 = Wire.read(); Y1=Y1<<8; Y_out =Y0+Y1; } Wire.beginTransmission(ADXAddress); Wire.write(Z_Axis_Register_DATAZ0); Wire.write(Z_Axis_Register_DATAZ1); Wire.endTransmission(); Wire.requestFrom(ADXAddress,2); if(Wire.available()<=2) { Z0 = Wire.read(); Z1 = Wire.read(); Z1=Z1<<8; Z_out =Z0+Z1; } Serial.print("Xa= "); Serial.print(Xa);Serial.print("\t"); Serial.print("Ya= "); Serial.print(Ya);Serial.print("\t"); Serial.print("Za= "); Serial.println(Za); delay(1000); Serial.println(); }
  5. Hey all! Finicky issue, and I've been up for way too many hours so I'm breaking from usual habit and posting after only doing minimal digging. Hopefully it's a simple solution. Fingers crossed. Board: TM4C1294NCPDT IDE: CCSv6.1 OS: Ubuntu 16.04 Compiler: GNU v4.9.3 (Linaro) So here's what's up: I'm versed using timers and setting up my vector table properly, or so I thought. Code Composer Studio isn't finding my interrupt handler... It's confuzzling me to say the least... Here's what I'm doing: In startup_gcc.c //......Skipping top of file for readability, all is stock // External declarations for the interrupt handlers used by the application. extern void Timer1AIntHandler(void); //......Skipping a bunch of nonsense for readabilities sake //Beginning of vector table (NOT Blizzard, but Snowflake/RA0) #else __attribute__ ((section(".isr_vector"))) void (* const g_pfnVectors[])(void) = { (void *)&_estack, // The initial stack pointer ResetISR, // The reset handler NmiSR, // The NMI handler FaultISR, // The hard fault handler IntDefaultHandler, // The MPU fault handler IntDefaultHandler, // The bus fault handler IntDefaultHandler, // The usage fault handler 0, // Reserved 0, // Reserved 0, // Reserved 0, // Reserved IntDefaultHandler, // SVCall handler IntDefaultHandler, // Debug monitor handler 0, // Reserved IntDefaultHandler, // The PendSV handler SysTickIntHandler, // The SysTick handler GPIOAIntHandler, // GPIO Port A GPIOBIntHandler, // GPIO Port B GPIOCIntHandler, // GPIO Port C GPIODIntHandler, // GPIO Port D GPIOEIntHandler, // GPIO Port E UARTStdioIntHandler, // For UARTStdio - UART0 Rx and Tx UARTIntHandler1, // UART1 Rx and Tx IntDefaultHandler, // SSI0 Rx and Tx IntDefaultHandler, // I2C0 Master and Slave IntDefaultHandler, // PWM Fault IntDefaultHandler, // PWM Generator 0 IntDefaultHandler, // PWM Generator 1 IntDefaultHandler, // PWM Generator 2 IntDefaultHandler, // Quadrature Encoder 0 ADC0IntHandler, // ADC Sequence 0 IntDefaultHandler, // ADC Sequence 1 IntDefaultHandler, // ADC Sequence 2 IntDefaultHandler, // ADC Sequence 3 IntDefaultHandler, // Watchdog timer IntDefaultHandler, // Timer 0 subtimer A IntDefaultHandler, // Timer 0 subtimer B Timer1AIntHandler, // Timer 1 subtimer A (Thar she blows...) And then in my main project file: // Only showing relevant pieces... // // Prototypes // ========== // Bunch of skipped out-of-scope stuff... void init_Timer(void); void Timer1AIntHandler(void); void init_Timer(void) { // Enable interrupts to the processor. ROM_IntMasterEnable(); // Enable Timer Peripheral ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER1); // Configure Timer1 to be Periodic, with a 100Hz interrupt ROM_TimerConfigure(TIMER1_BASE, TIMER_CFG_PERIODIC); ROM_TimerLoadSet(TIMER1_BASE, TIMER_A, g_ui32SysClock / 100); // Setup the interrupts for Timer1 timeout. ROM_IntEnable(INT_TIMER1A); ROM_TimerIntEnable(TIMER1_BASE, TIMER_TIMA_TIMEOUT); // Enable Timer1A. ROM_TimerEnable(TIMER1_BASE, TIMER_A); } // void loop() is there somewhere, but it's HUGE, doesn't use the timer anyway. void Timer1AIntHandler(void) { // Clear the timer interrupt. ROM_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT); // Call the FatFs tick timer. disk_timerproc(); } I need the timer for FatFS by ChaN. CCS gives me this on building (skipped everything until the linker output): Sooo what's going on here? Does the Energia part of CCS do something different with the timer section of the vector table? I have a custom ADC0IntHandler which works just fine... If anyone needs more info, I'm more than glad to provide it. Frustrations abound, and it especially sucks 'cuz after a 20 hour coding marathon, a problem like this is just... Awful.
  6. khm

    Modbus TCP/IP

    0down votefavorite Hi, I am trying to implement Modbus TCP on TIVA 1294 using the following code. I am using a modbus slave simulator on a pc to check the following code. However, the code doesn't seem to be working. I have downloaded the code & the libraries fromhttp://myarduinoprojects.com/modbus.html. Please suggest me corrections if necessary. Also is there another working example available for modbus tcp/ip for ethernet on TIVA energia? Please guide. #include <SPI.h> #include <Ethernet.h> #include "MgsModbus.h" MgsModbus Mb; int inByte = 0; // incoming serial byte // Ethernet settings (depending on MAC and Local network) byte mac[] = {0x00, 0x1A, 0xB6, 0x02, 0xD1, 0x14 }; IPAddress ip(192, 168, 0, 35); void setup() { // serial setup Serial.begin(9600); Serial.println("Serial interface started"); // initialize the ethernet device Ethernet.begin(mac, ip); // start etehrnet interface Serial.println("Ethernet interface started"); // print your local IP address: Serial.print("My IP address: "); for (byte thisByte = 0; thisByte < 4; thisByte++) { // print the value of each byte of the IP address: Serial.print(Ethernet.localIP()[thisByte], DEC); Serial.print("."); } Serial.println(); // slave address Mb.remSlaveIP = (192,168,0,1); // Fill MbData // Mb.SetBit(0,false); Mb.MbData[0] = 1; Mb.MbData[1] = 2; Mb.MbData[2] = 3; Mb.MbData[3] = 4; Mb.MbData[4] = 5; Mb.MbData[5] = 6; Mb.MbData[6] = 0; Mb.MbData[7] = 0; Mb.MbData[8] = 0; Mb.MbData[9] = 0; Mb.MbData[10] = 0; Mb.MbData[11] = 0; // print MbData for (int i=0;i<12;i++) { Serial.print("address: "); Serial.print(i); Serial.print("Data: "); Serial.println(Mb.MbData); } // print menu Serial.println("0 - print the first 12 words of the MbData space"); Serial.println("1 - FC 1 - read the first 5 coils from the slave and store them in the lower byte of MbData[1]"); Serial.println("2 - FC 2 - read the first 5 discrete inputs from the slave and store them in the higer of the MbData[1]"); Serial.println("3 - FC 3 - read the first 5 registers from the slave and store them in MbData[3..7"); Serial.println("4 - FC 4 - read the first 5 input registers from the slave and store them in MbData[8..12]"); Serial.println("5 - FC 5 - write coil 0 of the slave with the bit valeu of MbData[0.0]"); Serial.println("6 - FC 6 - write register 0 of the slave with MbData[2]"); Serial.println("7 - FC 15 - write 5 coils of the slave starting with coil 0 with GetBit(16..20"); Serial.println("8 - Fc 16 - write 5 registers of the slave starting on register 0 with MbData[0..4]"); Serial.println(Mb.remSlaveIP); } void loop() { if (Serial.available() > 0) { // get incoming byte: inByte = Serial.read(); if (inByte == '0') { // print MbData for (int i=0;i<12;i++) { Serial.print("address: "); Serial.print(i); Serial.print("Data: "); Serial.println(Mb.MbData); } } if (inByte == '1') {Mb.Req(MB_FC_READ_COILS, 6,6,6);} // 1 // ref, count, pos if (inByte == '2') {Mb.Req(MB_FC_READ_DISCRETE_INPUT, 6,6,6);} // 2 if (inByte == '3') {Mb.Req(MB_FC_READ_REGISTERS, 6,6,6);} // 3 if (inByte == '4') {Mb.Req(MB_FC_READ_INPUT_REGISTER, 6,6,6);} // 4 if (inByte == '5') {Mb.Req(MB_FC_WRITE_COIL, 0,0,0);} // 5 // count can be x if (inByte == '6') {Mb.Req(MB_FC_WRITE_REGISTER, 7,0,0);} // 6 // count can be x if (inByte == '7') {Mb.Req(MB_FC_WRITE_MULTIPLE_COILS, 0,6,0);} // 15 if (inByte == '8') {Mb.Req(MB_FC_WRITE_MULTIPLE_REGISTERS, 0,6,0);} // 16 } Mb.MbmRun(); // Mb.MbsRun(); } Thanks.
  7. Hi, I want to implement a code for Modbus RTU over TCP/IP usng TM4C1294NCPDT launchpad. Does anyone know a library which can be used to implement it. Also is it possible to obtain data from a PLC using modbus TCP/IP and send it to a Server on cloud using the same ethernet port? Please help. Thanks.
  8. I have experience with the traditional C programming in Code Composer and have implemented a timer interrupt routine in CCS for TIVA TM4C1294, now I want to create a timer ISR in Energia, how do I proceed ?
×