Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


altineller last won the day on November 14 2017

altineller had the most liked content!

About altineller

  • Rank
    Level 1

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
  • Interests
    Software Engineering for Internet Applications, 3D Printing, Robotics.
  • Github

Recent Profile Visitors

1,078 profile views
  1. Hello, Is it possible to use the XDS110 debug probe with Energia? And if so, how? Best regards, -C.
  2. I have made a simple implementation of an ANN that runs on the Tiva-C and 5529 using c++. It basically is a spiking neural network where the input is summed, and if above threshold, that neuron fires all the axons with 1 * W. There is also a mechanism of decay of the firing rate each time the neuron runs, and a mechanism to modify the neurons firing time, (the more the sum is, the quicker it fires, with in a range.) So the output from each neuron is always one, but the frequency differs. So, it is a trivial spiking neural network but it works. I already connected 4 light sensors, 4 input neurons, 1 hidden layer of 4 neurons, 2 output neurons to motors, and obtained a robot that goes around the light like a fly. @spirilis are there other implementations for embedded platforms for neural networks, that runs on TI products? would anyone be interested in the ANN code, if i make it opensource will anyone help me to make it better? I would be very interested in modifying it so it runs on the c2000. basically it would benefit from a fpu. all it does is sum and multiply floating point numbers. ~Best
  3. Hello, What is the status of Wire.h when using energia with the tiva-c board? Since there is the BoardManager in E18, the file layout has changed. Which leads to some confusion. eagle@daredevil:~$ find . -type f -name "Wire.h" ./.energia15/packages/energia/hardware/msp432/3.8.0/cores/msp432/ti/runtime/wiring/Wire.h ./.energia15/packages/energia/hardware/msp430/1.0.2/libraries/Wire/Wire.h ./.energia15/packages/energia/hardware/tivac/1.0.2/libraries/Wire/Wire.h ./.energia15/packages/energia/hardware/msp432r/5.6.0/cores/msp432r/ti/runtime/wiring/Wire.h ./bin/energia-1.6.10E18/hardware/energia/msp430/libraries/Wire/Wire.h ./bin/energia-1.6.10E18/hardware/energia/msp430/cores/msp430/Wire.h So I think when using energia with tivac, it will use the .energia15/packages/energia/hardware/tivac/1.0.2/libraries/Wire/Wire.h file that is in the hidden .energia directory right? Then I went ahead and edited the Wire.cpp file in the tivac/1.0.2 dir. #include <stdlib.h> #include <stdio.h> #include <string.h> #include <inttypes.h> #include "wiring_private.h" #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "inc/hw_i2c.h" #include "driverlib/gpio.h" #include "driverlib/debug.h" #include "driverlib/interrupt.h" #include "driverlib/rom.h" #include "driverlib/rom_map.h" #include "driverlib/pin_map.h" #include "driverlib/sysctl.h" #include "driverlib/i2c.h" #include "Wire.h" Here is a list of include files from Wire.cpp. So here is my question: is this Wire.cpp implementation is for TM4C? is it using or based on the TivaWare Peripheal library? I intend to make some modifications for it, for example using 2 i2c ports at the same time. So I need to start at the correct place. Any ideas / help greatly reccomended. Best regards, CA
  4. Has anyone seen the : Mini-M4 for Tiva-C https://download.mikroe.com/documents/starter-boards/mini/tiva/mini-m4-tiva-manual-v100.pdf Would it be safe to assume that it could run energia? Best, C.
  5. Hello, After installing E18, and getting the TivaC board package with packages manager, when I try to upload a program into the Tiva-C board I get the following error: fork/exec /home/can/.energia15/packages/energia/tools/arm-none-eabi-gcc/4.8.4-20140725/bin/arm-none-eabi-g++: no such file or directory Error compiling for board LaunchPad (Tiva C) w/ tm4c123 (80MHz). If I go the the mentioned directory, I can see that the arm-none-eabi-g++ executable exists by: $ file arm-none-eabi-g++ arm-none-eabi-g++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.8, stripped I have no /lib/ld-linux.so.2 on my system. It used to be we needed to install a package named ia32libs on ubuntu systems. But unfortunately on ubuntu 16.04 64, I could not find this package. And here is my uname -a Linux daredevil 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Any ideas / recomendations / help greatly appreciated, Best, C.
  6. Hello, Is there any way to figure out if a Tiva-C board is being powered with the usb connector, or from an external power supply connected to vbus? This is the problem I am facing: I am poweing Tiva-C board from the vbus connector, on a robot. At times we need to connect the usb cable for programming. Since VBUS is connected to external battery, it will "some times" (most of the time) - crash the computer. So I am using a pololu switching regulator, with a shutdown control pin. What I would like to do is, the device to figure out if usb power is being used, and shutdown the external power supply. I did search the web and found out that PD_7 is the vbus detect pin, and just digitalRead on that pin would lead to result, but I tested it, and found out it does not work. Any ideas/help/recommendation is greatly appreciated.
  7. yes i did. i tried all the spi dividers upto div128. tomorrow, i am going to hookup a logic analyzer to spi pins and try to debug and post the results. Sent from my iPhone using Tapatalk
  8. hello, i have the 5110 working with tivaC. i think i had to change the spi clock divider and spi mode. also i remember, different batches of screen from different sources required different settings. Sent from my iPhone using Tapatalk
  9. Hello, yes I set the CS as explained in my previous reply. I also checked the ds3232 sheet, and for CS it is active when it is low. I got this from the ds3234 datasheet, And on codewise: void DS3234_set_addr(const uint8_t pin, const uint8_t addr, const uint8_t val) { digitalWrite(pin, LOW); SPI.transfer(addr); SPI.transfer(val); digitalWrite(pin, HIGH); } the CS pin is pulled low, and then spi transfer is made in two operations always, then CS pin is pulled high. Is this correct? Best regards, C.
  10. Hello, Yes, I configured the CS pin as output. Relevant init code as follows: const int CS = PB_5; void DS3234_init(const uint8_t pin, const uint8_t ctrl_reg) { pinMode(pin, OUTPUT); SPI.setModule(2); SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV16); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE3); DS3234_set_creg(pin, ctrl_reg); delay(100); } For some reason it will not read values the right way. I put a serial.print(char); in the for loop where it reads time, and figured out it will read only 0x00. The code works on the msp430g5529. Best regards, C.
  11. Hello, I am having trouble using a SPI DS3234 RTC with Energia and TivaC series launchpad. I am using the ds3234 library at https://github.com/rodan/ds3234 which is originally written for arduino. I modified few settings in the initialization, tried few things, but have not had any luck. The module will not talk spi at all, and I get 1900.00.00 00:00:00 for date all the time. Here is the relevant code from the init section: void DS3234_init(const uint8_t pin, const uint8_t ctrl_reg) { pinMode(pin, OUTPUT); SPI.setModule(2); SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV32); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE3); DS3234_set_creg(pin, ctrl_reg); delay(10); } First off I am setting spi port 2, before spi.begin. I tried all clock_dividers. The ds3234 supports upto 4mhz spi speed, so considering 80mhz clock speed for tivac board, I am using a div32 divider. I also scanned all of the dividers. I tried spi_mode 1 and 3 also. I also checked with an oscilloscope, that I am indeed talking with SPI2 port. (I can see the clock and cs lines with little spikes, when the tiva-c sends commands). For some reason the SPI port in the TivaC is unable to talk with this RTC chip. I could not figure out why. I tested the same code on a MSP430F5529 with the RTC connected to SPI0 port, and it worked as expected. Here is the relevant part for that one: (I only commented out the setModule statement, and used the div8 divider) void DS3234_init(const uint8_t pin, const uint8_t ctrl_reg) { pinMode(pin, OUTPUT); //SPI.setModule(2); SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV8); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE3); DS3234_set_creg(pin, ctrl_reg); delay(10); } I also found a forum post at http://forum.43oh.com/topic/9016-ds3234-rtc-peek-poke/ which complains about not being able to peek / poke the internal SRAM of the ds3234 - but unfortunately was not answer. I am speculating this too arises from similar SPI trouble. Any ideas/recomendations/help greatly appreciated, Best Regards, C.
  12. Hello All, I made a PID controller, using a TivaC board and VNH2SP motor driver and encoder motors, which are read by the hardware QEI. All works well, and I have been able to get more resolution and run it faster and with smoother output compared to my previous implementations on arduino. Also, because of the QEI, it is much less components and wiring on the circuit side. Right now I am using double for PID calculations. Would I benefit from using float ? I am inclined to give it a try, but I wanted to ask in this forum. How is double and float handled in TM4C123 platform. Best Regards,
  13. Hello, I am using the latest energia release 0101E0017 and suddenly analogWrite and PWMWrite does not work on my TivaC Board, with TM4C123 #define EN_A PF_0 #define EN_B PF_1 #define IN1 PE_0 #define IN2 PE_1 #define IN3 PE_3 #define IN4 PE_2 #include <wiring_analog.c> void setup() { pinMode(EN_A, OUTPUT); pinMode(EN_B, OUTPUT); pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT); pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT); digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); } void loop() { PWMWrite(EN_B, 256, 16, 1000); } I tried few different ports as well. When the PWMWrite or analogWrite statement is run, the pin will just go high. I have tested with a scope that PWM signal is not generated. Now the interesting thing - I fired the following code on the same setup, this time using Servo.h - connected to RED_LED and It works. #include <Servo.h> Servo myservo; void setup() { myservo.attach(PF_1); } void loop() { myservo.write(5); } What do I need to do in order to get PWM working with this TivaC board? Best regards, C.
  14. Hello @@chicken, I am trying to use your library for a PPM decoder. (PPM as in radio control standard) Basically I need to do a: attachInterupt(PIN, isr_routine, CHANGE); in the setup, then: timer.start(); isr_routine() { process_value = timer_val; timer.reset(); // process the value } So I basically need to be able to start a timer on demand, and read value of it, then reset it, but programmatically, not by reading a pin? Any ideas on how to modify this library to accomplish something similar? The arduino equivalent of this code is below: #define PPM_Pin 3 int ppm[16]; void setup() { Serial.begin(115200); pinMode(PPM_Pin, INPUT); attachInterrupt(PPM_Pin, read_ppm, CHANGE); TCCR1A = 0; //reset timer1 TCCR1B = 0; TCCR1B |= (1 << CS11); //set timer1 to increment every 0,5 us } void loop() { } void read_ppm() { static unsigned int pulse; static unsigned long counter; static byte channel; counter = TCNT1; TCNT1 = 0; if(counter < 1020){ //must be a pulse if less than 510us pulse = counter; } else if(counter > 3820){ //sync pulses over 1910us channel = 0; } else{ //servo values between 510us and 2420us will end up here ppm[channel] = (counter + pulse)/2; channel++; } } I have done many experiments, and mostly in CCS using the MSP430g2xx3_TA_21.c, where timer can be used in input capture mode, measuring time for both rising and falling edge, and it can be calculated from there. However, I need to read this data and then transmit it tru serial or i2c, which was beyond my abilities at the moment, so I decided to do it with energia for now. Any ideas/reccomendations/help greatly appreciated. Best regards, C.
  15. Thanks, well I have multiple motors with different encoders, so I will try soon. It would be really exciting to get that board working with high res QEI. Yes about sensors you mentioned `my sensors did not have the state both high` what does this mean? I have square wave sensor outputs, usually overlapping to a degree, and if on falling edge of A, B is high that is forward, and if the falling edge of A has B low, that is reverse. Would that be sufficient? Best regards, C.A.
  • Create New...