Jump to content

Search the Community

Showing results for tags 'tm4c123g'.



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 13 results

  1. EDIT* Sorry, I somehow posted this in the Libraries section. Not sure how I did that. If there is a MOD available, please kindly move this into the appropriate section. Thank you. Hello Folks, I've had a TM4C123G LaunchPad microcontroller laying around for a few years since I had to purchase it for an introductory college course. I've moved into the land of Vixen Christmas light sequencing and realized I could use this little controller with its relays for a few light strands. However, I can't figure out how to get this device to speak with Vixen via serial. I used code from an Arduino forum that I thought would work, but it won't read the serial header that vixen sends (or at least I think that's what is wrong). I'm starting to get frustrated with this device and am wondering if it should just go out with the bathwater. I don't understand the topic well enough to differentiate between this device and an arduino, so I don't recognize code differences that are incompatible. Any help would be appreciated. This is the code and the error at the bottom. // *** diychristmas.org free software so long as this line remains in sketch! // Basically Vixen "generic" serial mechanical relay sketch // - Setup a generic serial controller to use this sketch // - Uses digitalWrite as this outputs LOW or HIGH no pwm values // - This is what is needed for a mechanical relay // Hookup the relay in order of channel definition // Define as many as you need // put channels (pins) in an array so we can use looping structures to control int channels[] = {27}; // There were more listed in the original code, but I only have one relay on pin 27. // Vixen information // speed for the com port for talking with player const long SERIAL_COM_SPEED = 115200L; // Generic Serial controller config - must be present, must match controller setup int CONTROLLER_HEADER[3] = {33, 34, 35}; // This is character !"# (hard to replicate in sequencer) // Relays // - most mechanical relays turn on when pin is low, off on high const int ON = LOW; const int OFF = HIGH; // these are program variables we need to use in multiple places const int SIZE_OF_HEADER = sizeof(CONTROLLER_HEADER) / sizeof(int); // no need to change const int CHANNEL_COUNT = sizeof(channels) / sizeof(int); // no need to change int buffer[CHANNEL_COUNT]; // no need to change going to hold relay output values void setup() { Serial.begin(SERIAL_COM_SPEED); // set the channel pins to output mode for (int channelIndex = 0; channelIndex < CHANNEL_COUNT; channelIndex++) { pinMode(channels[channelIndex], OUTPUT); } turnLightsOff(); powerOnSelfTest(); // watch your lights to make sure they are all going on in order } void loop() { waitForControllerHeader(CONTROLLER_HEADER); readSequenceData(); outputToLights(); } void turnLightsOff() { //turn them all off for (int channelIndex = 0; channelIndex < CHANNEL_COUNT; channelIndex++) { digitalWrite(channels[channelIndex], OFF); } } void outputToLights() { for (int channelIndex = 0; channelIndex < CHANNEL_COUNT; channelIndex++) { // we should only be seeing 255 and 0 but in case someone tried a fade // 48 is used for debug purposes. You can use the serial monitor to test // send this string !"#01010101 to turn on every other relay as 0 == dec(48) 1 == dec(49) if (buffer[channelIndex] > 48) { digitalWrite(channels[channelIndex], ON); } else { digitalWrite(channels[channelIndex], OFF); } } } void readSequenceData() { char buffer2[CHANNEL_COUNT]; int index = 0; while (Serial.available() < CHANNEL_COUNT) {} // We have enough data! for (int i = 0; i < CHANNEL_COUNT; i++) { int inByte = Serial.read(); buffer = inByte; Serial.write(inByte); } } void waitForControllerHeader(int header[]) { for (int i = 0; i < SIZE_OF_HEADER; i++) { // wait for serial available while (!Serial.available()) {} // Check the byte until it matches the CONTROLLER_HEADER byte int inByte = Serial.read(); if (inByte != CONTROLLER_HEADER) { i = -1; // wrong data set to "zero" } } // found the header! } // powerOnSelfTest - does a couple of checks to make sure everything turns on and off // - watch your lights, they should go on in order void powerOnSelfTest() { // This routines turns on and off each relay in order for (int channelIndex = 0; channelIndex < CHANNEL_COUNT; channelIndex++) { digitalWrite(channels[channelIndex], ON); // turn on one channel at a time delay(2000); digitalWrite(channels[channelIndex], OFF); } // This routines turns on each relay in order leaving them all on for .5 seconds for (int channelIndex = 0; channelIndex < CHANNEL_COUNT; channelIndex++) { digitalWrite(channels[channelIndex], ON); // all on test delay(500); // wait .5 seconds } delay(2000); // slight pause to check all on turnLightsOff(); } NOTE AFTER THE SKETCH IS WRITTEN: Sketch uses 4,908 bytes (1%) of program storage space. Maximum is 262,144 bytes. Global variables use 1,104 bytes (3%) of dynamic memory, leaving 31,664 bytes for local variables. Maximum is 32,768 bytes. DSLite version 7.2.0.2096 Configuring Debugger (may take a few minutes on first launch)... Initializing Register Database... Initializing: CORTEX_M4_0 Executing Startup Scripts: CORTEX_M4_0 GEL: CORTEX_M4_0: GEL Output: Memory Map Initialization Complete Connecting... Loading Program: C:\Users\Me\AppData\Local\Temp\build426139c31db1be34a53b2333cbe6d5ea.tmp/TestSwitchMode.ino.elf Preparing ... .text: 0 of 4908 at 0x0 Erasing Flash. .data: 84 of 116 at 0x132c: 83% Finished: 83% Setting PC to entry point.: 83% Running... Failed to load dynamic library: 'ftd2xx.dll' Success
  2. Where can I find Energia Library for OLED(SSD1306) display?? I found some display but those are not working. Is there any to configure the ssd1306 oled arduino library for TIVA C (TM4C123G)?? PLZ Help me.
  3. I have been trying to use this i2c code on energia. it works perfectly fine on arduino. i am new to tiva and need help using energia libraries with the multiple i2c ports. any help is appreciated trialEnergua.ino Adafruit_PWMServoDriver.h Adafruit_PWMServoDriver.cpp
  4. Hi all, I have a PID algorithm written on TIVA C TM4C123G . I want to setup a PIL simulation with Simulink. Simulink will send the error signal to TIVA, the PID will calculate the control signal and send it back to Simulink. How can I link the TIVA C "TM4C123GH6PM" Launchpad with Simulink and send/receive data in PIL setup? any help ?? Thanks
  5. Hey guys, I´m using TM4C123G but I can´t configure Energia. When I go in board management and try downloading Energai TivaC Boards it fails and an error messaging appears saying "error during download..." Anyone knows how can I sovle it? Regards!
  6. When using analog read function, ADC never gives 0 value even when it is directly connected to the ground. But when I connect it to 3.3V it gives constant 4095 value. What is the problem?
  7. I cant compile codes for tm4c123g anymore. My boards suddenly disappeared from board manager. Now when I want to open it, it shows the following error: Error downloading http://www.energia.nu/packages/package_index.json java.lang.RuntimeException: java.lang.Exception: Error downloading http://www.energia.nu/packages/package_index.json at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:151) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.Exception: Error downloading http://www.energia.nu/packages/package_index.json at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:113) at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:330) at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:305) at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:283) at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$0(ContributionManagerUI.java:147) ... 1 more Caused by: java.io.IOException: Received invalid http status code from server: 416 at cc.arduino.utils.network.FileDownloader.downloadFile(FileDownloader.java:194) at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:128) at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:111) ... 5 more
  8. Is there any IR remote library for TM4C123G? I cant find one. In energia libraries, there is one IRremote lib for MSP430. Can anyone help me to configure this? I know basics about TM4C123G timers from its datasheet.
  9. Hello everyone.. I am beginner with Energia. I have Tiva C series launchpad which features TM4C123G series microcontroller. Now this microcontroller has 8 UARTs. I have tested basic serial communication using energia and it works perfectly fine. Now i want to use UART module 3 of this microcontroller which is pin no 13 and 14 (PC6 and PC7). So how can i do this using Energia..?? Thank you.
  10. I am new to the TI development world, I'm coming from Atmel so I have a decent working background. I have been stuck on getting interrupts to work. Below is the code I'm currently working with; any help would be appreciated; thanks! Objective: Toggle LED on PF3 when the button on PB0 is pressed. #include <stdbool.h> #include <stdint.h> #include <inc/hw_memmap.h> #include <driverlib/debug.h> #include <driverlib/gpio.h> #include <driverlib/rom.h> #include <driverlib/sysctl.h> #include <tiva_device.h> #include "driverlib/interrupt.h" volatile bool state = false; void intGPIOb(void) { if (GPIO_PORTB_DATA_R & 0b00000001) { if (state) { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_3, GPIO_PIN_3); } else { GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_3, 0); } state = !state; } GPIO_PORTB_DATA_R = 0; } int main(void) { SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); SysCtlDelay(3); GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_3); GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_3, 0); GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_0); GPIOPadConfigSet(GPIO_PORTB_BASE, GPIO_PIN_0, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); GPIOIntTypeSet(GPIO_PORTB_BASE, GPIO_PIN_0, GPIO_FALLING_EDGE); GPIOIntEnable(GPIO_PORTB_BASE, GPIO_PIN_0); GPIOIntClear(GPIO_PORTB_BASE, GPIO_PIN_0); IntMasterEnable(); IntEnable(INT_GPIOB); while (1) { } }
  11. Hello, I want to make a wireless thermometer using two microcontrollers. How do I write the code in Energia to transmit and receive a variable using a 433 Mhz RF module? Transmitter Setup: I have a TM4C123G connected to a RF transmitter using TX(3) pin 34 on the MCU. The TM4C123G is also connected to a LM34DZ Temp sensor. I need help to modify this working code to send the temperature variable using tx(3) pin 34 /*TM4C123G*/ //initializes/defines the output pin of the LM34 temperature sensor int outputpin= A11; // (pin # 2), use A11 analog input //--------------------------------------------------------------------- //this sets the ground pin to LOW and the input voltage pin to high void setup() { Serial.begin(9600); Serial3.begin(9600); //---------------------------------------------------------------------- } void loop() { int rawvoltage= analogRead(outputpin); float millivolts= (rawvoltage/4095.0) * 3300; float fahrenheit= millivolts/10; Serial3.write(fahrenheit); //transmits temperature to receiver Serial.println(fahrenheit);//displays temperatur on Serial monitor delay(200); } Receiver Setup: I also have a MSP432 connected to a RF receiver using rx pin 3 on the MCU. The MSP432 is connected to a 16x2 LCD. I need help to modify this working code to receive the temperature variable using rx pin 3 and display to the lcd. /*Receiver MSP432*/ #include <LiquidCrystal_I2C.h> #include <Wire.h> #define rfReceivePin 3 //RF Receiver pin = pin 3 unsigned int data = 0; // variable used to store received data byte address = 0x3F; // LCD I2C address int columns = 16; // number of columns on LCD int rows = 2; // number of rows on LCD LiquidCrystal_I2C lcd(address, columns, rows); //----------------------------------------------------------------- void setup() { lcd.init(); // initialize the lcd lcd.backlight(); } //----------------------------------------------------------------- void loop() { lcd.clear(); lcd.setCursor(0,0); data=analogRead(rfReceivePin); //listen for data on pin 3 lcd.print("Temperature"); lcd.setCursor(0,1); lcd.print(data); delay(500); }
  12. Hello, I am trying to measure voltage across a voltage diviter with a Tiva-C series boards, and I am consistently getting mis results. I get 0-4096 for 0 to 3.3V. I also have a seperate battery, that goes in to a 100K + 15K voltage divider network and PE_2 is connected to the middle of the voltage divider. It measures 1.1V approximately, when it should be measuring 0.77V. But here is the interesting part. When I use a multimeter to measure the same middle point in the voltage divider, it reads 0.77, and the value from the analog read also converges to 0.77 - then i disconnect the multimeter it will go up to 1.1V back. This brings the question: what is the analog state of this adc pin? does it has to be initialized with pinMode as input, in order to do analogRead? Best regards, C.A.
×
×
  • Create New...