Jump to content
43oh

Fmilburn

Members
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    81

Everything posted by Fmilburn

  1. Yeah, Visio was the standard tool for engineering concepts and flow charting in my previous life. But recently I have just been drawing on paper or a white board and then taking a picture with my phone. Quick and easy!
  2. I have been working on a project lately where I need to fit a design into an enclosure and was fumbling through my drawer looking for a measuring scale when I came across an old flow charting template. I acquired it almost 40 years ago when I was working on a hydrocarbon process simulator that we were programing in FORTRAN. That project was the last time I wrote code until fairly recently, but anyway, here is the template: Pretty funny... On the left side is a "card scale" that you could put next to a stack of IBM punched cards to estimate how many you had. Over at top right are the mai
  3. VCC is 3.6V measured on my sample as well. The schematic on Page 39 of the LaunchPad Development Kit User's Guide (SLAU535B) shows power coming from a TLV70036DSEwhich is a 3.6V LDO. So the pin maps or any other documentation showing 3.3V are incorrect.
  4. Hi @@serdarq Your question was responded to below your other posting. If you still have problems then post sufficient information in that thread and perhaps someone can help.
  5. Energia/Arduino has undeniably filled a void and made microcontrollers more accessible, especially to beginners. Further, many of the libraries are quite good, are useable with a very wide range of hardware, and it is possible to get entirely acceptable results quickly. On the other hand some of the stuff out there is junk, repetitive, or just silly. So here are my thoughts on Energia and making it better: Put a FAQ section in 43oh or on Energia.nu that might cut down on all those repetitive questions from beginners Document the features that make Energia a better product like sleep, sleep
  6. analogFrequency() is not a standard function in Energia - as dubnet noted it is not documented at energia.nu. It does work for the MSP430 (at least the ones I have tried) but if you want to use the CC3200 for example you use PWMWrite() as noted in this link: http://forum.43oh.com/topic/8677-analogfrequency-not-working-cc3200-lp/ Maybe it was not added because it is not standard. You could add it to keywords.txt in the lib folder of Energia if you wanted it to be highlighted.
  7. Well, it is good that you are finally getting a response from it. My advice is to keep breaking it down into pieces that are easily understood and tested. You are going to have to dig into the datasheets and make sure you are sending it what is expected. You can see what is going to the DAC on the serial monitor now. Of course a logic analyzer would be handy if you have access to one. Can you do something like generate a sine wave, read it in, and then play around with sending it to the DAC until you get the right output? Regarding analogRead(), you can set the resolution with the anal
  8. Fmilburn

    FFT

    Those values should allow measurement up to 635 Hz according to the comments I left in fix_fft.h. Have you tried it yet?
  9. Hi @@cooldoubtless, Do you have a Rev1.5 board? Try setting the jumpers like are shown for the G2553, i.e. like this =||| instead of ||||| I think that might be an error in the Energia documentation. Let us know if that works and what version of the board you are using.
  10. Fmilburn

    FFT

    I am running out of suggestions and this is a bit out of my league but try this... Select File -> Preferences from the pulldown menu in Energia and select "Include debug information in the output ELF file" Look in the output window of Energia for wiring_analog.c - it may help to copy everything in the window and then paste it into a text editor and do a search You should find the location for wiring_analog.c (hopefully the same place you checked above) and the location where it put the object file Then select Sketch -> Show Compilation Folder where wiring_analog.c.d and wiring_analog.c.
  11. Fmilburn

    FFT

    @@Ymir Look inside your Energia folder for wiring_analog.c. It will be located at \hardware\lm4f\cores\wiring_analog.c. Do you see the following function inside it? void analogReadResolution(int res) { _readResolution = res; } I think this is what the TM4C129 should be calling. If not, maybe someone else can tell us.
  12. Fmilburn

    FFT

    I tried specifying the TM4C129 in Energia v17 and Windows 10 and I did not get the error. Since I can't reproduce the problem it is hard for me to know what the solution is. Note that analogReadResolution() is a function in Energia - what version of Energia are you using? Also, note the comment that I placed in fix_fft.h after ANALOG_RESOLUTION #define ANALOG_RESOLUTION 14 //CPU specific The analog resolution is CPU specific and the MSP432 has 14 bit analog resolution, the TM4C129 has 12 bit if it is like the TM4C123. You can find this information in the datasheet. So change tha
  13. Fmilburn

    FFT

    Hi @@Ymir I expect that it does since it worked on a TM4C123 but I don't have a TM4C129.
  14. I modified the code to use the buttons so that I didn't have to hook up an encoder. Something in Energia doesn't process "CHANGE" from the attachInterrupt() function properly either. It works as expected on a F5529 and catches rising and falling edges but not on the MSP432. @@JasonP - The following "works" but will only catch one edge const int encoder0PinA = PUSH1; const int encoder0PinB = PUSH2; volatile int pinACount = 0; volatile int pinBCount = 0; volatile bool Aflag = false; volatile bool Bflag = false; /////////////////////////////////////////////////////////////////////////
  15. @@sanjy005 If you don't have a lot of experience with microcontrollers, you can try using Energia with the 2553. There are examples on how to use ADC that come with it.
  16. @@jtvalley You can debug Energia with Code Composer Studio (CCS). Do a search for the words debug Energia and CCS here on 43oh and you should find a number of places where it is discussed. Regarding your problem, try something like this: #include <SPI.h> // SPI SCK = 7 // MISO = 14 // MOSI = 15 const int cs = 8; // SPI chip select void setup() { Serial.begin(115200); Serial.println("Starting..."); pinMode(cs, OUTPUT); SPI.begin(); } void loop() { byte lsb; byte msb; int i; for (i = 0; i < 512; i++) { lsb = byte(i); msb = byte
  17. Hi @@jtvalley You can use SPI and UART together. But to be honest, I can't understand the problem from what you have posted. Is it with the transmitter or the receiver? Can you reduce the problem area down further?
  18. @@Pat RE: measuring power comsumption. You can try this approach: http://43oh.com/2015/09/how-to-measure-an-energia-applications-power-usage-with-energytrace/ It also shows how wasteful delay() is.
  19. Hi @@hamada, Do you have a current limiting resistor on the LED?
  20. Hi @@johnmarwa It looks like you are using a different version of the library than me. But the problem is that the G2553 doesn't appear to have sufficient memory. I got a RAM overflow of 82 bytes with my version of the library and a basic example when I tried it just now with the G2553. Since I normally use it with the F5529 it isn't a problem for me. You will either need to pare things down or use a microcontroller with more memory. The thread above implies someone else has pared it down so you might search around a bit more. Good luck...
  21. @@MSPLife I don't have the SRF05, I have the SR04 which is an older version I think. In any event, it is supposed to be good for 3 meters and I don't have any problem getting that (I was curious and just tested it). If you want to try the Energia code that I use, find it here: https://github.com/fmilburn3/Distance_Sensor_HC-SR04. Note the way I handled the 5V to 3.3V conversion. In the readme you will find my observations on accuracy and distance while using the sensor some time back.
×
×
  • Create New...