Jump to content
43oh

Fmilburn

Members
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    81

Everything posted by Fmilburn

  1. 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
  2. @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
  3. @Tauronts You do not need to add them. They are defined by TI to indicate the peripherals and modules hat the microcontroller has.
  4. 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
  5. 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
  6. 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.
  7. 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
  8. 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
  9. 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.
  10. Hard to say with the information you have given... The two sides of the RXD/TXD must be connected of course.
  11. There are two hardware UARTs on the F5529. See the Energia pin diagram here. Note that P3_4 and P3_3 are designated as RX(1) and TX(1) respectively. RXD and TXD are connected to P4_5 and P4_4 on the header with the jumpers. When you specify Serial in Energia it is using P4_5 and P4_4. Quoting from the Energia reference on the Serial Library: To use pins P3_4 and P3_3, specify Serial1 instead of Serial.
  12. You could use attachInterrupt() to detect when the pin of interest has changed (e.g. in your example when the sequence changes from xx0x to xx1x). At that point you could use digitalRead() to determine the status of the other pins. However, digitalRead() is relatively slow. If you are willing to give up compatibility with other processors then the register containing the input values for the port can be read quickly and directly. For example, the following reads and prints the input register for port 1 and then masks out and prints G2 LaunchPad pin 5 (P1.3) which is attached to switch
  13. Hi @nirbar11 and welcome to 43oh I am not sure I understand your objectives but here is something to get you started... Don't use pin names of the form P1_x in Energia as this has been deprecated Don't put print statements (or other slow to execute code) inside of interrupts - flag the interrupt and handle it elsewhere You will probably want to avoid using delay() in your code Note that if using a G2 LaunchPad that P1.0 and P1.6 are attached to LEDs via jumpers that can be pulled Here is some example code that detects buttons being pushed (no debouncing). v
  14. Seveal instances of this are scattered over 43oh. Maybe add it to this porting libraries link:
  15. Hi @Alice12789 I don't think that boosterpack is available any more. A readily implemented alternative is to buy a breakout board, e.g https://www.adafruit.com/product/254 I haven't used that particular one, also note there are also others available.
  16. Project Closure Here are the original objectives along with closure notes that may be of interest to some... cost - unit cost for the receiver of $10 or less - The project came in at less than $10 for each receiver, even in small quantities. technology - common off the shelf components, MSP430G2553 - The G2553 was more than adequate for the project. Also used the TSOP38238 for infrared and the SK2812 for LEDs which are readily available and inexpensive. construction - standard double sided PCB spec, keep SMD parts large enough to be hand soldered - I used OSH Park for t
  17. I have always used the reference page in Energia: http://energia.nu/reference/ Googling something like "vary time potentiometer arduino" will likely turn up code close to what you want. I don't see where you reset the time in your code, i.e. timer1 and timer0. One section of code is repeated and I assume that is not your intention. I would do something like this: /* * Varies the flashing period of the onboard red LED using a potentiometer * attached to a MSP430G2553. Tested with Energia V17. */ const int potPin = 7; const int minTime = 500; const int maxTime = 10000; unsign
  18. MSP430 Energia uses a lower power mode with delay() than Arduino but it still blocks other code from running. interrupts are another possible solution.
  19. if (delay == bad){ // and delay is to be avoided ! use delay } Set up a variable that records the start of the period - e.g. startTime = millis() Set another variable to hold the end of the period - e.g. finishTime = startTime + sensorTime Keep the loop going without a delay Keep reading values At the top of the loop check millis() to see if finishTime has been reached, if so take appropriate action Also check to see if the pot has changed more than some predetermined amount - if so, make desired changes There are quite a few tutorials around abo
  20. Once you start down the rabbit hole there is no end of unexpected things I believe the ones I have are for TV remotes or something like that where the user aims the controller at the device and tight focus is desirable. For example, here is the Everlight IR333A - my crude measurements show something similar: My idea for angling would be to make the PCB something like this for the desired angles and bend the legs of the LED 90 degrees to point them in the right direction: This would not be a good solution if the goal is SMD and simplified manufacture of course. Plus,
  21. Hi @indirtwetrust and welcome to 43oh. It always helps to post a simplified version of your code that demonstrates the issue so that others can replicate it. Perhaps you did not set the pins low before setting them to outputs? If not, I suspect the default is for Energia is to immediately set output to high. See the code below where I set pins low first: /* Test output state on powerup and reset * G2553 LaunchPad without crystal * Energia V17 */ void setup() { pinMode(PUSH2, INPUT_PULLUP); digitalWrite(6, LOW); pinMode(6, OUTPUT); digitalWrite(7, LOW); pinM
  22. I will give you my relatively uneducated opinion for what it is worth... I don't think many professional C/C++ programmers (which I am not) would choose to use Energia in a commercial product and most commercial products do not use it. The same applies to Arduino. The reasons are many but there are exceptions of course. The most obvious exceptions are where the product is intended for Energia/Arduino users or it is a relatively simple application that fits Energia and the programmers skills well. I worked on a small project that used Energia and sold in very small quantity.
  23. New IR Transmitter Prototype Assembled I have not received the new PCBs yet but I did get the IR LEDs so I put together a "boosterpack" transmitter and a separate module to test coverage and range. They can be used together with crossed beams for coverage from two sides. The IR LED array on the left is lit, but since it looks to be off, it is apparent that my iPhone has an IR filter on it. Total current when on is on the order of 400 mA per bank and is controlled by a TIP120 Darlington Transistor which is all I had on hand that could carry the current. The TIP120 on the left
  24. If you are referring to a setting in CCS then it can be done like this: 1) Select the register tab and then the register you are interested in while in debug mode 2) Right click on the number of interest int the value column and then number format 3) Select Binary I agree with the others. If you are serious, then get a logic analyzer even if it is a cheap 24 MHz one off of eBay. Also, take advantage of the TI training videos, e.g. http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_Workshop?keyMatch=msp430 training&tisearch=Search-EN-Ever
  25. Tiara Prototype Assembled I assembled one of the tiaras in more or less final form last week and while everything is working, and it meets the original criteria, I am working on additional modifications to improve ease of fabrication. Here is what it looks like at the moment: The fabrication problems are mostly around the wiring between the PCB and the LEDs. Soldering to the WS2812s is fussy and the wiring isn't too attractive as seen in this photo from the back: In addition, I've hot glued a pin header to the PCB and wired to that. All very unprofessional looking.
×
×
  • Create New...