Jump to content

Rhab

Members
  • Content count

    31
  • Joined

  • Last visited

About Rhab

  • Rank
    Advanced Member
  • Birthday 03/28/86

Profile Information

  • Gender
    Not Telling
  • Location
    Berlin
  1. Hi guys, i try to connect a SD-Card to my Tiva-C Launchpad using the SD-Card-Boosterpack . But i always get an error: "Failed with rc=6". The Launchpad-Pins i use for my first testing are: PD0: SCLK PD1: CS PD2: MISO PD3: MOSI i use the sd-cardtutorial with little changes: because tm4c has no temprature-sensor i commented // analogReference(INTERNAL1V5);// analogRead(TEMPSENSOR); and i changed ui32_ReadTemp = ((uint32_t)analogRead(TEMPSENSOR)*27069 - 18169625) *10 >> 16; to ui32_ReadTemp = ((uint32_t)millis()); that should lead to usable values... my logfile is called LOG.txt instead of LOG.TXT and i changed the cs pin (#define cs_pin 24) and at pfatfs.cpp i changed the other pins: uint8_t _SCLK = 23; uint8_t _MOSI = 26; uint8_t _MISO = 25; i'm not sure if this works... the last change i made is GPIOPinConfigure(GPIO_PD0_SSI1CLK); GPIOPinConfigure(GPIO_PD1_SSI1FSS); GPIOPinConfigure(GPIO_PD2_SSI1RX); GPIOPinConfigure(GPIO_PD3_SSI1TX); GPIOPinTypeSSI(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 ); after pinMode(PUSH2, INPUT_PULLUP); at the setup()... i know that i get this error after "rc = FatFs.open("LOG.txt");" by "if (rc) die(rc);" any ideas what i do wrong? any suggestions? i'm going to despair of that
  2. By now i use a SD card, or i try to use it. When i started this topic i was thinking about several options to manage a mass storage and because i already had a micro-usb-stick i thought it would be nice to solve it that way.
  3. ok i try to explain it with pictures... this is how my output-signals look like and this is what the qei expexts: (can be found on page 1309 of Tiva
  4. yes and no. i decided to use the clock-direction mode with only one hallsensor, because the signal of both hall-sensors did not fit to what is needed for quadrature-mode (my sensors did not have the state both high, tell me if you need more information...). i get the direction directly from my montor-controler and only need one hallsensor as "clock" because every flank (up and down) is counted, there are two counts per revolution. if you know this it should be no problem to use this mode if this is a good enough resolution... sorry for this late answer it should be possible to monitor two motors because the the EK-TM4C123 has two QEI-moduls. You should use the QEI-Pins to use QEI, so you have no big choice...
  5. No, not for the EK-TM4C123. But there is an ccs-example for DK-TM4C123 and it should be possible to adapt it to EK-TM4C123, but that means much work if you want to adapt it to energia... if someone wants to do this work it should be mentioned that on the EK-TM4C123 the VBUS and ID pin are not connected. You would have to put in resistors. (How this works can be read at the userguide of EX-TM4C123)
  6. This is correct. It is one of the Tiva C series connected launchpads. The cheapest one. http://www.ti.com/ww/en/launchpad/launchpads-connected-ek-tm4c123gxl.html#tabs best regars rhab
  7. found my problem signal doesn't fit to what quadrature, so i can't use qei to detect direction... but i can detect velocity and count position with clock_dir...
  8. My cable had a problem, but the code doesn't work... i tested the signals with an oscilloscope, i tested the inversion wir clock-dir-mode, i think the unlocking should work too... In CLOCK_DIR mode i see that position is counted if the magnet passes (2 counts each time) it works with both signals (tested by swapping PhA an PhB). In QUADRATURE mode, the position counter doesn't work. Sometimes it +1 or -1 around the base value but it doesn't count the rotations... I have unlocked PD7 and i think this works... (see clock_dir mode), the inversion works because the direction in clock_dir mode changes if i don't invert.
  9. i think i have a problem with my hardware, found out, that it is possible to change the velocity-value by shaking the cables... so maybe my code works
  10. yes, this are hall-sensors... thanks for your code i can't see huge differences but the order is a bit different, so i'll try some things and maybe i'll have success...
  11. solved my Problem... i forgot myScreen.setFontSolid(true); now it works
  12. Thanks, after you told me what the clock/direction-signal should be, i am sure that i have to use quadrature... i have two signals following each other... the picture shows the QE-sensors and the engine shaft with a magnet....
  13. hi, now i got a new problem. what i want to do is switching between different "screens", which all show different measurement-data (as changing string). If i use only one "screen", there is no problem. But in the moment i draw a button (which should be used to switch "screen") the changing values can't be displayed correct (the value is only white pixel-bulk) here you can see the value 2x (second character is changing in this moment) without button here you can't see any value with button... here is my code(the functionality of the button is not implemented yet, but this shouldn't be a problem...): #include "Energia.h" #include "SPI.h" #include <LCD_graphics.h> #include "LCD_GUI.h" #define K35_SPI; #include "Screen_K35_SPI.h" Screen_K35_SPI myScreen; // Define variables and constants uint16_t value=0; boolean increase=true; uint16_t option=1; // option 1 => Screen 1 // option 2 => Screen 2 // option 3 => ... //Define Buttons button bRight; //button bLeft; void setup() { Serial.begin(9600); Serial.println("begin... "); myScreen.begin(); myScreen.setOrientation(1); myScreen.clear(); //myScreen.dRectangle(myScreen.screenSizeX()-30, 0, 30, myScreen.screenSizeY(), myColours.red); bRight.dStringDefine(&myScreen, myScreen.screenSizeX()-30, 0, 20, 40, ">", myColours.white, myColours.red); bRight.enable(true); bRight.draw(false); } void loop() { switch(option){ case 1: if(value==100){ increase=false; } if(value==0){ increase=true; } myScreen.setFontSize(myScreen.fontMax()); myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, " ", myColours.black); if(value<10){ myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, " " + String(value, DEC) , myColours.white); } else if(value<99){ myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, " " + String(value, DEC) , myColours.white); } else{ myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, String(value, DEC) , myColours.white); } myScreen.gText((myScreen.screenSizeX()-2*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, "km/h" , myColours.white); if(increase){ value++; } else{ value--; } break; case 2: myScreen.gText((myScreen.screenSizeX()-10*myScreen.fontSizeX())/2, (myScreen.screenSizeY()-myScreen.fontSizeY())/2, "Screen 2!" , myColours.white); break; } }
  14. Hi guys, has anyone tried to use a micro-USB-stick as mass-storage to log measurement-data with EK-TM4C123GXL launchpad? are there any tutorials or maybe at least libs for how to use usb/log data? I would be very happy if anyone could help me.
  15. SDCard Booster Pack

    does this boosterpack work with EK-TM4C123GXL ?
×