Jump to content

madias

Members
  • Content Count

    49
  • Joined

  • Last visited

  • Days Won

    1

madias last won the day on June 1 2014

madias had the most liked content!

About madias

  • Rank
    Advanced Member

Recent Profile Visitors

368 profile views
  1. madias

    goodbye TI!

    I didn't recognized that the TI store do not offers free shipping anymore. Ok, thats their decision. BUT!!!! shipping costs to Austria or the Czech Republic are 21 USD, Germany or UK "only" about 14 USD. For anyone who doesn't know about europe: Austria and the czech Republik are neighboring countries to germany - only a few kilometers away, and ALL this countries are member of the EU. So wtf we should pay 7 USD more for shipping??? thats enough for me, NOT to buy ANY TI-products anymore. regards Matthias
  2. Dear spirilis! Thank you for that! I thought I would go crazy, cause of that silly lines.... Everything is working yet. A need a little time for code cleanup and then I'll post the whole conversation in the "libraries" for energia! Regards Matthias
  3. no, with Energia 12. And the (energia port) UTFT library works out of the box, with nearly the same code, so this drives me crazy, and it is a stupid pinMode and digitalWrite...
  4. Hello, I've done a TIVA C-123-Launchpad conversation of Henning Karlsen's LCD5510 library (it's much the same as the UTFT library). Everything is working, BUT: I've to eliminate following code (commented out part) in the *.cpp file, and I've to do it manually in "setup" sketch: LCD5110::LCD5110(int SCK, int MOSI, int DC, int RST, int CS) { P_SCK = portOutputRegister(digitalPinToPort(SCK)); B_SCK = digitalPinToBitMask(SCK); P_MOSI = portOutputRegister(digitalPinToPort(MOSI)); B_MOSI = digitalPinToBitMask(MOSI); P_DC = portOutputRegister(digitalPinToPort(DC)); B_DC = digitalPinToBitMask(DC); P_RST = portOutputRegister(digitalPinToPort(RST)); B_RST = digitalPinToBitMask(RST); P_CS = portOutputRegister(digitalPinToPort(CS)); B_CS = digitalPinToBitMask(CS); /* pinMode(_SCK,OUTPUT); pinMode(_MOSI,OUTPUT); pinMode(_DC,OUTPUT); pinMode(_RST,OUTPUT); pinMode(_CS,OUTPUT); */ SCK_Pin=SCK; RST_Pin=RST; } If I leave this in the library, compiling is ok, but the TIVA freezes. I've compared it with the tiva conversation of the UTFT library line for line and I'm at a loss with this stupid easy code I've attached the whole conversation of the basic and graph library. Little example code (working): // LCD5110_Sleep_Mode (C)2014 Henning Karlsen // web: http://www.henningkarlsen.com/electronics // // This program is a demo of sleep mode. // // This program requires a Nokia 5110 LCD module. // // It is assumed that the LCD module is connected to // the following pins using a levelshifter to get the // correct voltage to the module. // SCK - Pin 8 // MOSI - Pin 9 // DC - Pin 10 // RST - Pin 11 // CS - Pin 12 // #include <LCD5110_Basic.h> LCD5110 myGLCD(PA_2,PA_3,PA_4,PB_6,PB_7); extern uint8_t SmallFont[]; extern uint8_t MediumNumbers[]; void setup() { pinMode(PA_2,OUTPUT); pinMode(PA_3,OUTPUT); pinMode(PA_4,OUTPUT); pinMode(PB_6,OUTPUT); pinMode(PB_7,OUTPUT); myGLCD.InitLCD(); } void loop() { myGLCD.setFont(SmallFont); myGLCD.clrScr(); myGLCD.print("Entering", CENTER, 0); myGLCD.print("Sleep Mode", CENTER, 8); myGLCD.print("in", CENTER, 16); myGLCD.print("Seconds", CENTER, 40); myGLCD.setFont(MediumNumbers); for (int s=10; s>=0; s--) { myGLCD.printNumI(s, CENTER, 24, 2, '0'); delay(1000); } myGLCD.enableSleep(); delay(5000); myGLCD.disableSleep(); myGLCD.setFont(SmallFont); myGLCD.print("Awake again!", CENTER, 0); myGLCD.print("The screen was", CENTER, 16); myGLCD.print("cleared while", CENTER, 24); myGLCD.print("in Sleep Mode.", CENTER, 32); delay(5000); } Thanks Matthias LCD5110_UTFT.zip
  5. If you're not using hardware oversampling, you can also do a simple lowpass filtering: Where weight is the interpolating value (1= no interpolating, 0.01 strong interpolating) rawValue is the the current analog reading, lastValue the value before. // filter the current result using a weighted average filter: float filter(float rawValue, float weight, float lastValue) { // run the filter: float result = weight * rawValue + (1.0-weight)*lastValue; // return the result: return result; } I've found in my snipplet folder some fooling around with mixing energia and driverlib: example for using the energia analogRead with hardware oversampling: #include <stdint.h> #include <stdbool.h> #define PART_TM4C123GH6PM #include "inc/tm4c123gh6pm.h" #include "inc/hw_memmap.h" #include "inc/hw_types.h" #include "driverlib/debug.h" #include "driverlib/sysctl.h" #include "driverlib/adc.h" void setup() { SysCtlPeripheralEnable(SYSCTL_PERIPH_ADC0); ADCHardwareOversampleConfigure(ADC0_BASE,64); Serial.begin(9600); } void loop() { int sensorValue = analogRead(A3); // print out the value you read: Serial.println(sensorValue/16); delay(1); // delay in between reads for stability }
  6. Energia & OSX & Serial (Port) is a little mess.... Have you read this? https://github.com/energia/Energia/issues/456 and read this (arduino) thread about mavericks and ftdi: http://forum.arduino.cc/index.php?PHPSESSID=39mlkeoojcavfv7d7metheb844&topic=198539.30 A help for my Tiva TM4C123G Launchpad is, to start up energia with disconnected board and then (after start) plug in the device.
  7. Is - as promised - RXTX now replaced with JSSC in Energia release 0101E0013? Thanks Matthias
  8. meanwhile I tested a little sketch (just in a loop 12x PWMWrite(pinX,255,x,60000) ) and a little time measurement: 12x writing PWM with energia tooks about 88 microseconds, so it´s more than 10kHz, way beyond my needed ~100 Hertz, so much headroom for the other stuff
  9. Hello and thank you for your answer and sorry for my delayed reply. I'd to think a little bit over. Ok, my description of "energia uses software pwm" is a little bit rough. But the main difference between the "old" stellaris launchpad and the new tiva driverlib style is, that the tiva has 2 build in pwm modules (see driver lib guide page 205ff) So my question is more: Is the new way of the tiva's (using the 2 pwm modules) faster than the "old" energia/timer way for the stellaris launchpad? The drawback of using the pwm modules is, that you 've to use only up to 16 hardcoded pins. I've attached a sheet with the different pinouts (row: "Hardware PWM" and "Energia PWM"), please ignore the "connected with" tab - it's for my project I dont need a special pwm mode with sync/dead band... just converting voltage like a DAC (but with the carrier frequency >60kHz, the "DAC output frequency" ist quiet low: <50-100Hz), so I read your link and get the conclusion to myself, that there should be no big advantage for me using the pwm module.... Thank you and regards Matthias 8-bit-synth-pinout-tiva-sheet.pdf
  10. Hello, I'm planning for a project the use of 12 Channels PWM (Frequency must be above 60khZ, because of driving some VCA´s and not getting into the audio range). As I know, Energia uses "software" PWM with the use of timers (the hardware PWM´s of the new TIVA's is not implimented). So my question is, may I can get some overall performance boost using the driverlib hardware PWM rather than the energia software version? Thanks regards Matthias
  11. This has nothing to do with the USB Port. See https://github.com/energia/Energia/issues/390 It
  12. Ok, it seems, that my DS201 is out of range for this measure, can someone check this two codes out with "real equipment"? Meanwhile I've stripped the code down to complete low level: (Measuring pin is PA7) #include <stdint.h> #include <stdbool.h> #include "inc/hw_gpio.h" #define PART_TM4C123GH6PM #include "inc/tm4c123gh6pm.h" #include "driverlib/gpio.h" byte running=1; void setup() { GPIOPadConfigSet(GPIO_PORTA_BASE, 0xff, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); GPIODirModeSet (GPIO_PORTA_BASE, 255, GPIO_DIR_MODE_OUT); } void loop() { while(1) { running=!running; HWREG(0x40004200)=running<<7; } }
  13. Hello, after fooling around a little bit, I recognize following driverlib behavior: While I get with this sketch about 450kHz on my oscilloscope #include <stdint.h> #include <stdbool.h> #define PART_TM4C123GH6PM #include "inc/tm4c123gh6pm.h" #include "driverlib/gpio.h" byte running=1; void setup() { GPIOPadConfigSet(GPIO_PORTA_BASE, 0xff, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); GPIODirModeSet (GPIO_PORTA_BASE, 255, GPIO_DIR_MODE_OUT); } void loop() { while(1) { running=!running; GPIOPinWrite(GPIO_PORTA_BASE,128,running<<7); }} ...I'll get only 176kHz with the ROM_ equivalent: #include <stdint.h> #include <stdbool.h> #define PART_TM4C123GH6PM #include "inc/tm4c123gh6pm.h" #include "driverlib/gpio.h" byte running=1; void setup() { ROM_GPIOPadConfigSet(GPIO_PORTA_BASE, 0xff, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD); ROM_GPIODirModeSet (GPIO_PORTA_BASE, 255, GPIO_DIR_MODE_OUT); } void loop() { while(1) { running=!running; ROM_GPIOPinWrite(GPIO_PORTA_BASE,128,running<<7); } } Does anyone have any idea why is that? Remember, that all energia stuff is related to the ROM_* commands (like wiring_digital.c)
  14. Thank you for your work, vladn! I'm thinking seriously to implement the scheduler into my "big project": A completely TIVA based/controlled analog Synthesizer!
  15. Thank you again, Rei Vilo! I'm struggling a little bit with the "set module" in your library, for example when having a tft library on (2) and SD on (0), setting up the modules by hand within the code solved the problem. With a little time, I will do an automatic selector for that within the library.
×
×
  • Create New...