Jump to content
43oh

Fmilburn

Members
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    81

Everything posted by Fmilburn

  1. I think that for the most part Energia maintains the same functions and API as found in Arduino which does not have a RTC interrupt listed in the base reference. And while it might be possible to add it to Energia, I don’t believe it has been done. Nonetheless, the RTC can be accessed as mentioned above. I don’t use Energia much anymore but In the LaunchPads I have the crystal is active. If you really want control of such things however it is probably best to use CCS.
  2. I think they may be referring to the attachment of an ISR in Energia: http://energia.nu/reference/attachinterrupt/ I believe Rei Vilo has posted an Energia library here on 43oh so do a search for that. I remember posting something for the F5529 using driverlib also.
  3. This may seem rough but you are not going to learn to code by asking questions like these and need to start figuring out some of this on your own. You do not seem to have an understanding of the C/C++ languages. I suggest getting a book or taking an online course. Start with simpler problems if necessary but learn to solve problems yourself. RE: code that does not compile - decide whether you want to have an uint8_t variable or an unsigned long variable and then declare it as such. E.G. for unsigned long: unsigned long counter PLACE_IN_FRAM; Regarding your counter code above.
  4. It is being declared both uint8_t and unsigned long - it should be one or the other. Maybe the GCC compiler accepts this and the TI does nor.
  5. The error says there is “multiple definition of ‘analog_reference’”. Find the occurrences and make sure it is defined only once is the short answer. If you do a search for “multiple definition of” on stack exchange or the like it will give examples of what can cause the error.
  6. Hi @ash12 and welcome to 43oh, If you are new to microcontrollers or familiar with Arduino you can try the Energia site. For example, here is the page on the TM4C123: http://energia.nu/pin-maps/guide_tm4c123launchpad/ If you want to use Code Composer Studio, there are examples in the Resource Explorer. Download CCS at ti.com. If there are specific things that interest you then try a search here on 43oh or at ti.com. Do a search for TM4C123 training and lots of things will pop up...
  7. This was quite a while back but it looks like readADC() is a function I wrote for Code Composer Studio - not for Energia. Use analogRead() for Energia. You only need to make the additions that Robert posted for Energia, or the ones I posted for CCS, if you are trying to get it to read the ADC quicker.
  8. Hi @Lukman what processor/LaunchPad are you using and what version of Energia? The above is for the F5529.
  9. See slaa322c.pdf at TI.com. Also look at the documentation for the LaunchPad to see how they did it. There is more information in the datasheet and family users guide If I remember correctly there is a firmware example in CCS on how to use the external oscillator. Energia does it automatically.
  10. Try the code in Arduino Playground: http://playground.arduino.cc/Main/MPU-6050#short I had a quick look and the simple example reading raw values appeared to stick to Arduino and not use processor specific calls. Don't double post the same topic.
  11. Hi @kiMedia You cannot supply 12 V to the G2553 directly without damaging the microcontroller - see datasheet for maximum voltages. Use an external voltage divider to get to safe values. Do a search on this site for how to use internal references - eg
  12. These processes can be quite complex and the control is very dependent on the system. Autotune doesn't always work and hand tuning is sometimes necessary. It is impossible to guess what the constants should be without knowledge of the system and possibly experimentation. Read the background material in the link I have given above for a better idea of how PID works. If I remember correctly there is a very good link to a method for hand tuning when autotune fails.
  13. HI @dubnet It looks like you had fun with that . The code is easy to read and looks good to me. You can try using a switch statement in the ISR - something like this: //----------------------- G P I O _ P O R T 1 _ I S R ------------------------ #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__) #pragma vector=PORT1_VECTOR __interrupt #elif defined(__GNUC__) __attribute__((interrupt(PORT1_VECTOR))) #endif void GPIO_PORT1_ISR(void) { switch(P1IV) { case 0: break; //no interrupt pending case 2: break;
  14. There is some additional information on the IR project I did with 43oh member input here: I started out in Energia and ended up writing everything in CCS for the final project.
  15. You should not put slow executing code like a call to a function with cycle wasting loops inside an ISR. Flag the interrupt and handle it outside the ISR.
  16. I don't know of a library for the TM4C123G but if you are willing to put some time into it then it should not be too hard to convert the one for the MSP430 or Arduino. There is a good introductory write-up at Adafruit: https://learn.adafruit.com/ir-sensor/overview. I was able to use that information and other stuff on the web to figure it out and write my own code. It helps a lot to have an oscilloscope, or perhaps even better a logic analyzer when working through it.
  17. I don't use Energia for the MSP432 so I don't know if you can - I am not sure it has a pins.h file. You can look in github and see what has been provided there, e.g. https://github.com/energia/Energia/tree/master/hardware/msp432/cores/msp432/driverlib I imagine you could use #define and DriverLib to set something up.
  18. Hi Terje, You are right - I was actually looking for that and missed it. On mine the jumper was not in place when received.
  19. Hi Jeffery, Have a look at the schematic in the MSP432P401R LaunchPad Development Kit User's Guide. P3.1 does not appear accessible, i.e. it does not appear to be brought out to the headers. From the datasheet: What are you doing that you must use that pin?
  20. Find the call to software serial that is in the library and replace it with a call to hardware serial. The Energia reference documentation is located here: http://energia.nu/reference/serial/
  21. Hi @Hena and welcome to 43oh. The FR6989 has hardware serial on pins 3 and 4. Have you tried using them? Many arduino libraries can be used with Energia but the pins must be remapped.
  22. Hello @Anik96 The TM4C123G is an ARM processor and differs in both timers and registers from the MSP430 but read through chicken’s posts here: He describes clearly how to do it but you will need to account for the difference in processors.
  23. Hi @mesuttopuzlu you need to create a new variant. Do a search on 43oh for “Energia variant”. See for example:
  24. I think what you are doing is fine for pedagogical purposes and for that matter development. I too have been frustrated at times by not knowing what is going on in Energia and the time it takes to hunt it down. Nonetheless, I found it useful especially when starting out. Note that when you use DriverLib it is possible to hover the cursor in CCS and see what is going on underneath.
×
×
  • Create New...