Jump to content

Fmilburn

Members
  • Content count

    582
  • Joined

  • Last visited

  • Days Won

    77

Everything posted by Fmilburn

  1. measure battery voltage level

    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
  2. 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.
  3. MSP430F149 Board

    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; //P1.0 case 4: break; //P1.1 case 6: //P1.2 GPIO_toggleOutputOnPin(RED_LED); break; case 8: //P1.3 GPIO_toggleOutputOnPin(GREEN_LED); break; case 10: break; //P1.4 case 12: break; //P1.5 case 14: break; //P1.6 case 16: break; //P1.7 default: break; //should not get here } } The TI examples in their MSP430 training videos use this approach.
  4. IR remote library

    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.
  5. attachInterrupt() takes a long time

    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.
  6. IR remote library

    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.
  7. MSP432P401R Remapping Pins

    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.
  8. MSP432P401R Remapping Pins

    Hi Terje, You are right - I was actually looking for that and missed it. On mine the jumper was not in place when received.
  9. MSP432P401R Remapping Pins

    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?
  10. 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/
  11. 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.
  12. 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.
  13. Without LaunchPad

    Hi @mesuttopuzlu you need to create a new variant. Do a search on 43oh for “Energia variant”. See for example:
  14. Energia Hybrid Code

    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.
  15. Energia Hybrid Code

    Another approach with a simplified API is drverlib which is provided by TI and the use of #define. For example, to blink a LED: #include "driverlib.h" #define RED_LED GPIO_PORT_P1,GPIO_PIN0 #define DELAY_CYCLES 104500 //-------------------------------- m a i n ----------------------------------- void main(void) { // setup WDT_A_hold(WDT_A_BASE); // stop watchdog timer GPIO_setAsOutputPin(RED_LED); // set red LED port and pin to output direction // loop for(;;){ GPIO_toggleOutputOnPin(RED_LED); // toggle the red LED _delay_cycles(DELAY_CYCLES); // delay a while } }
  16. Problems with Energia on MSP430 LaunchPad

    @Markers Make sure there are no spaces in the path. See for example this: when you get a problem like this, always try a search for the key words in the error message - eg no such file or directory
  17. Promotion of MSP430FR2433 MCU LaunchPad™ kit

    @Tauronts You do not need to add them. They are defined by TI to indicate the peripherals and modules hat the microcontroller has.
  18. Serial.print(float) statement can't be compiled

    Hi @ChikamaYan I haven't used Energia in a while but I noticed there is a new version 1.0.2 available from the Boards Manager in Energia V18. I just tried it with the following on a Windows 10 machine and it worked as expected. void setup(){ Serial.begin(9600); Serial.println("Starting..."); } void loop(){ float test = 1.0; Serial.println(test); } When I copied your code I got a message about an extraneous character. Use the <> code insertion feature in 43oh when you insert code and it will end up like what I posted above. I notice the G2452 is available again also. Took a quick look at github and it looks like the FR2433 is being implemented in Energia as well. I have been fooling around with the FR2411 in CCS and like it - should be a good replacement for the G2553 but I wish it was available in TSSOP package.
  19. Rfid RC522 Library for MSP430G2553

    Hi @GhostArm Try this: https://github.com/fmilburn3/CardReader_RFID_RC522 RE: porting - do a search as there are a number of posts on 43oh
  20. Serial Port Problem

    Sometimes it is easier to use a separate MSP430 LaunchPad with eZ-FET to flash the G2. I have a MSP430F5529 set up with jumpers to do this and use it on custom boards and the G2 LaunchPad alike. The emulator on the G2 LaunchPad is just flaky at times.
  21. max() Function does not work in Energia-0101E0017

    I do not know why it is not there - it is in the Reference section of the Energia documentation. Probably an oversight that was corrected in V18. However, see this link for an implementation using a macro: https://stackoverflow.com/questions/3437404/min-and-max-in-c
  22. NRF25L01 MSP430 to Arduino

    I have only used the NRF24L01 between MSP430s and not with an Arduino - however, did you read through the Wiki? https://github.com/spirilis/msprf24/wiki Regarding pipes, see this: http://forum.43oh.com/topic/10228-nrf24l01-pipe-addressingad/#comment-76349
  23. RFID Booster Pack for CC3200

    I put together a prototype Booster Pack that attaches to the CC3200 and has a RFID-RC522 card (sometimes called a MIFARE module), two buttons, and two LEDs. The CC3200 is connected to the cloud using Temboo. Currently it sends an email to me with information on the card used when accessed but it would be easy to modify to record time of access, card used, etc and put it into say a spreadsheet. This was a one afternoon plus an evening project for both hardware and software using Energia - very easy to do. The cards have security holes but I am pretty sure they pose too high a technical challenge for my local hooligans. I'm more afraid they might rip it apart and take my CC3200 than anything else. This is the Booster Pack, top view. Here it is attached to an upside down CC3200. In this photo it has been mounted in an enclosure and is reporting a successful read and transmission with the green LED. And if you are really interested, here is the schematic. I am using the RFID library located here. And if you aren't familiar with Temboo, find it here.
  24. RFID Booster Pack for CC3200

    I don't have a working CC3200 and have not tried using one with CCS. You might try starting a new thread here in 43oh or in E2E that fully explains the problem you are trying to solve and the things you have tried so far.
  25. UART interface to sim900

    Hard to say with the information you have given... The two sides of the RXD/TXD must be connected of course.
×