• Announcements

    • bluehash

      Forum Upgrade   03/11/2017

      Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!

altineller

Members
  • Content count

    72
  • Joined

  • Last visited

About altineller

  • Rank
    Level 1

Contact Methods

  • Website URL
    http://altineller.ca

Profile Information

  • Gender
    Male
  • Location
    Istanbul
  • Interests
    Software Engineering for Internet Applications, 3D Printing, Robotics.
  • Github
    https://github.com/altineller

Recent Profile Visitors

107 profile views
  1. http://goo.gl/7b2C8g

  2. 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.
  3. 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.
  4. 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
  5. 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
  6. 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.
  7. 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.
  8. 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.
  9. 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,
  10. 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.
  11. 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.
  12. 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.
  13. Hello Rhab, In the past I made a pid controller for pololu n20 motors with encoders. (tiny little motors) At the beginning I was using an optical encoder, which turned out to be problematic, (since they require external signal processing, and output not square but sine wave, and that sine wave can change in amplitude and offset depending on the position of the encoder disk to the sensor, they were problematic) Then I got the same encoders with hall effect sensors, which did indeed output pure square wave. I then used interrupts to read encoder outputs, and driving two motors with the tiva-c board did indeed work, but for encoders that worked > 300 pulse per revolution, I had problems (due to interrupt traffic) - then I stopped working on the project all together. Did you get your code to work using this QEI encoders? Can you assign any pin to read encoder input, and is it possible to drive two motors from one tiva-c board? I have read the thread carefully but I was not able to make a conclusion. Best regards, C.
  14. Hello All, I am working on a circuit on phase comparison. I managed to build an edge sensitive phase detection circuit, like in the 4046 PLL using only nand gates. The phase detector outputs phase differences, and depending on sign of phase (that is which pulse comes first, CLK or SYNC) it will output a phase difference signal, negated if phase is negative. The logic analyzer output is shown below: The first capture at the top is when CLK comes first. As you can see the signal labeled PHASE at below correctly outputs a pulse for phase difference in falling edges of the incoming CLK and SYNC. In the second capture, SYNC comes first. PHASE now is outputting a signal that is negated from what was before. (active low) I need a logic output circuit that will take those PHASE output, or (outputs, if we hook two circuits, and hook up the CLK and SYNC in reverse order) and convert it to 2 isolated electrical outputs, if like in capture 1, one pin should send the signal, and if like capture 2, the other pin should send the signal. Any ideas or recomendations greatly appreciated, Best Regards, C.
  15. Hello, I too want to use the QEI for a project, and I was wondering which launchpad you are using: The title says "EK-TM4C123GXL" which is the Tiva-C series connected launchpad? Is this correct? Best regards, C.A.