Jump to content

All Activity

This stream auto-updates     

  1. Last week
  2. [POTM] dAISy - A Simple AIS Receiver

    The radio will work with any MCU. But in my project, you will have to rewrite anything that's hardware dependent. From top of my mind, that's spi.c, serial.c, GPIO interrupts in packet_handler.c, plus any interaction with GPIO like LEDs etc.
  3. [POTM] dAISy - A Simple AIS Receiver

    Thank you @chicken Actually, my msp430G2553 was broken somehow. But, I have some PIC16F877A in my home. I was wondering if I can use PIC16F877A instead of msp430G2553. What do you think? Is it feasible to use PIC16F877A with si4362 as AIS receiver? I believe converting msp430 code to PIC16F code isnt a big deal.
  4. RFC: CNC BoosterPack

    Design is now published on Github, driver code to follow when completed - some new features needs to be verified first. A Youtube video showing off the PCB and some additional parts is here: GRBL DRO & MPG Terje
  5. [POTM] dAISy - A Simple AIS Receiver

    Yes, you can remove both and it will still work. #define TEST would enable extra code. I used that during development for testing the NMEA code without a radio. As long as the project does not define it, the test code will be skipped. It's not enabled in the code, so you don't have to worry about that. #define DEBUG_MESSAGES is useful to get more information about the radio communication. I would leave that in until you got the receiver working, as it will help you tracking down what's going on.
  6. MSP-EXP432P111

    I just ordered one of these. Looking forward to tinkering with it. Has anyone got WiFi working with this?
  7. [POTM] dAISy - A Simple AIS Receiver

    @chicken Thank you so much for answering my questions. I am really new in this field (embedded programming) but I have done couple programming tasks in Pascal and C/C++. Just want to make things clear, So Debug_Messages and Test_Mode only works for CCS IDE? If I remove #define Debug_Messages and #define Test_Mode, can your dAISy still run?
  8. [POTM] dAISy - A Simple AIS Receiver

    @andimmike15 For debug messages, simply add a #define in main.c, like I did on line 20. For test mode, I made a separate profile in the CCS project, which sets the define with the -D compiler option.
  9. [POTM] dAISy - A Simple AIS Receiver

    hello @chicken. I really like your work in here. You have done such an amazing thing by building dAISy from scratch. I am new in MSP430. I would like to ask you more about your source code. In main.c, you wrote ifdef DEBUG_MESSAGES and ifdef TEST. How do you run DEBUG_MESSAGES and TEST? How is it activated? Do you use CCS to activate DEBUG_MESSAGES and TEST? Really aprreaciate your help.
  10. MSPflash do not work on MSP4305969

    Hi All, Sorry for disturb, I solve already my problem. Thanks all. Best Regards, Lukman
  11. [POTM] dAISy - A Simple AIS Receiver

    FYI @Fonsin and @GeoffH The NMEA adapter is now back in stock on Tindie and in our own store: https://www.tindie.com/products/astuder/nmea-0183--rs-422-adapter-for-daisy/ https://shop.wegmatt.com/products/nmea-0183-rs-422-adapter-for-daisy
  12. Hello, TI Launchpad is a hobby for raining days. For example, domotic in my home, ....

    I use Energia or TI CCS, to write my code. I'm not professional, I Learn myself C++ and how to use TI CCS software.

    I'm Professional in service for electronics, network devices in customers sites.

    I live in France, sorry for my mistakes with English Language.

    I'll try to share you , bad experiences, found solutions.

     Have a nice Day.

  13. Hello for information. I work in this moment for data logger. I need 2 SPI port (LCD and SD) and 1 I2C port (sensors). I Use TI MSP430FR5994 Launchpad. With Energia E18, impossible to use SCL (2), SDA (2), pin 9 and 10. (I need Pin 14,15 for I2C/SPI LCD, and I need Pin 48, 50 already connected on SD connector in launchpad), 1) don't forget to setup I2C module number: Wire.setModule(2); 2) modify Pins_Energia.h as describe bellow in \Local\Energia15\packages\energia\hardware\msp430\1.0.3\variants\MSP-EXP430FR5994LP (see link in Energia Preference menu). Select ' PORT_SELECTION0' ________________________________________________________________________________________________________________________________ #ifndef Pins_Energia_h #define Pins_Energia_h #ifndef BV #define BV(x) (1 << (x)) #endif // Attribute for placing R/W variables in FRAM // Example // uint8_t DisplayBuffer[LCD_MAXIMUM_Y][LCD_MAXIMUM_X] PLACE_IN_FRAM; #define PLACE_IN_FRAM __attribute__((section(".text"))) #if defined(__MSP430_HAS_EUSCI_B0__) static const uint8_t SS0 = 47; /* P4.0 */ static const uint8_t SCK0 = 49; /* P2.2 */ static const uint8_t MOSI0 = 48; /* P1.6 aka SIMO */ static const uint8_t MISO0 = 50; /* P1.7 aka SOMI */ static const uint8_t SS1 = 8; /* P6.3 */ static const uint8_t SCK1 = 7; /* P5.2 */ static const uint8_t MOSI1 = 15; /* P5.0 aka SIMO */ static const uint8_t MISO1 = 14; /* P5.1 aka SOMI */ static const uint8_t TWISDA0 = 48; /* P1.6 UCB0 */ static const uint8_t TWISCL0 = 50; /* P1.7 UCB0 */ static const uint8_t TWISDA1 = 15; /* P5.0 UCB1 */ static const uint8_t TWISCL1 = 14; /* P5.1 UCB1 */ static const uint8_t TWISDA2 = 10; /* P7.0 UCB2 */ static const uint8_t TWISCL2 = 9; /* P7.1 UCB2 */ #define TWISDA0_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP) #define TWISCL0_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP) #define TWISDA1_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP) #define TWISCL1_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP) #define TWISDA2_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP) #define TWISDA2_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP) #define TWISCL2_SET_MODE (PORT_SELECTION1 | INPUT_PULLUP) #define TWISCL2_SET_MODE (PORT_SELECTION0 | INPUT_PULLUP) #define SPISCK0_SET_MODE (PORT_SELECTION1) #define SPIMOSI0_SET_MODE (PORT_SELECTION1) #define SPIMISO0_SET_MODE (PORT_SELECTION1) #define SPISCK1_SET_MODE (PORT_SELECTION0) #define SPIMOSI1_SET_MODE (PORT_SELECTION0) #define SPIMISO1_SET_MODE (PORT_SELECTION0) ............................................................................................................. __________________________________________________________________________________________________________________________________________________ Best regards. MJC.
  14. Hi Guys I have some troubles with launchpad F28377D. I know that some boards C2000 Delfino are sopported on Energia IDE, buy I want to ask if ¿Is there a way to connect LaunchPad F28379D on Energia IDE?. I ran son examples on F28377S and it is fine. Thank you for your comments, and I hope that somebody can help me.
  15. MSP432P401R LaunchPad Black EEPROM

    As a part of my grbl port I added support for a Microchip 24LC16B 2K EEPROM a few days ago - the code is pure CMSIS and uses I2C polling so I do not know if it can be used with Energia. I did not get ACK-polling to work so I resorted to a delay for writing, maybe I will look into that later. The code is a bit "raw", there is no real support for handling abnormal conditions. /* eeprom.c - driver code for Texas Instruments MSP432 ARM processor for 2K EEPROM on CNC Boosterpack (Microchip 24LC16B) Part of Grbl Copyright (c) 2017-2018 Terje Io Grbl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Grbl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Grbl. If not, see <http://www.gnu.org/licenses/>. */ #include <msp.h> #include <stdint.h> #include <stdbool.h> #include "driver.h" #include "GRBL/grbl.h" #define EEPROM_I2C_ADDRESS (0xA0 >> 1) #define EEPROM_ADDR_BITS_LO 8 #define EEPROM_BLOCK_SIZE (2 ^ EEPROM_LO_ADDR_BITS) #define EEPROM_PAGE_SIZE 16 typedef struct { uint8_t addr; volatile int16_t count; uint8_t *data; uint8_t word_addr; } i2c_trans_t; static i2c_trans_t i2c; void eepromInit (void) { P6->SEL0 |= BIT4|BIT5; // Assign I2C pins to USCI_B0 // NVIC_EnableIRQ(EUSCIB1_IRQn); EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_SWRST; // Put EUSCI_B1 in reset state EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_MODE_3|EUSCI_B_CTLW0_MST| EUSCI_B_CTLW0_SYNC; // I2C master mode, SMCLK EUSCI_B1->BRW = 240; // baudrate 100 KHZ (SMCLK = 48MHz) EUSCI_B1->CTLW0 &=~ EUSCI_B_CTLW0_SWRST; // clear reset register // EUSCI_B1->IE = EUSCI_B_IE_NACKIE; // NACK interrupt enable } /* could not get ACK polling to work... static void WaitForACK (void) { while(EUSCI_B1->STATW & EUSCI_B_STATW_BBUSY); do { EUSCI_B1->IFG &= ~(EUSCI_B_IFG_TXIFG0|EUSCI_B_IFG_RXIFG0); EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TR|EUSCI_B_CTLW0_TXSTT; // I2C TX, start condition while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTT) { // Ensure stop condition got sent if(!(EUSCI_B1->IFG & EUSCI_B_IFG_NACKIFG)) // Break out if ACK received break; } // EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTP; // while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTP); // Ensure stop condition got sent __delay_cycles(5000); } while(EUSCI_B1->IFG & EUSCI_B_IFG_NACKIFG); // EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTP; // while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTP); // Ensure stop condition got sent } */ static void StartI2C (bool read) { bool single = i2c.count == 1; EUSCI_B1->I2CSA = i2c.addr; // Set EEPROM address and MSB part of data address EUSCI_B1->IFG &= ~(EUSCI_B_IFG_TXIFG0|EUSCI_B_IFG_RXIFG0); // Clear interrupt flags EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TR|EUSCI_B_CTLW0_TXSTT; // Transmit start condition and address while(!(EUSCI_B1->IFG & EUSCI_B_IFG_TXIFG0)); // Wait for TX EUSCI_B1->TXBUF = i2c.word_addr; // Transmit data address LSB // EUSCI_B1->IFG &= ~EUSCI_B_IFG_TXIFG0; // Clear TX interrupt flag and while(!(EUSCI_B1->IFG & EUSCI_B_IFG_TXIFG0)); // wait for transmit complete if(read) { // Read data from EEPROM: EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTP; // Transmit STOP condtition while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTP); // and wait for it to complete EUSCI_B1->CTLW0 &= ~EUSCI_B_CTLW0_TR; // Set read mode if(single) // and issue EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTT|EUSCI_B_CTLW0_TXSTP; // restart and stop condition if single byte read else // else EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTT; // restart condition only while(i2c.count) { // Read data... if(!single && i2c.count == 1) { EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTP; while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTP) { while(!(EUSCI_B1->IFG & EUSCI_B_IFG_RXIFG0)); } } else while(!(EUSCI_B1->IFG & EUSCI_B_IFG_RXIFG0)); i2c.count--; *i2c.data++ = EUSCI_B1->RXBUF; } } else { // Write data to EEPROM: while (i2c.count--) { EUSCI_B1->TXBUF = *i2c.data++; while(!(EUSCI_B1->IFG & EUSCI_B_IFG_TXIFG0)); } EUSCI_B1->CTLW0 |= EUSCI_B_CTLW0_TXSTP; // I2C stop condition // WaitForACK(); hal.delay_ms(5, 0); // Wait a bit for the write cycle to complete } while (EUSCI_B1->CTLW0 & EUSCI_B_CTLW0_TXSTP); // Ensure stop condition got sent } uint8_t eepromGetByte (uint32_t addr) { uint8_t value = 0; i2c.addr = EEPROM_I2C_ADDRESS | (addr >> 8); i2c.word_addr = addr & 0xFF; i2c.data = &value; i2c.count = 1; StartI2C(true); return value; } void eepromPutByte (uint32_t addr, uint8_t new_value) { i2c.addr = EEPROM_I2C_ADDRESS | (addr >> 8); i2c.word_addr = addr & 0xFF; i2c.data = &new_value; i2c.count = 1; StartI2C(false); } void eepromWriteBlockWithChecksum (uint32_t destination, uint8_t *source, uint32_t size) { uint32_t bytes = size; i2c.word_addr = destination & 0xFF; i2c.data = source; while(bytes > 0) { i2c.count = EEPROM_PAGE_SIZE - (destination & (EEPROM_PAGE_SIZE - 1)); i2c.count = bytes < i2c.count ? bytes : i2c.count; i2c.addr = EEPROM_I2C_ADDRESS | (destination >> EEPROM_ADDR_BITS_LO); bytes -= i2c.count; destination += i2c.count; StartI2C(false); i2c.word_addr = destination & 0xFF; } eepromPutByte(destination, calc_checksum(source, size)); } bool eepromReadBlockWithChecksum (uint8_t *destination, uint32_t source, uint32_t size) { i2c.addr = EEPROM_I2C_ADDRESS | (source >> 8); i2c.word_addr = source & 0xFF; i2c.count = size; i2c.data = destination; StartI2C(true); return calc_checksum(destination, size) == eepromGetByte(source + size); }
  16. MSPflash do not work on MSP4305969

    Hi @fmilburn, Thanks a lot, I really appreciate your suggestion. I will try to do your advise. Best Regards, Lukman
  17. MSPflash do not work on MSP4305969

    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. This appears to be something copied from somewhere and has code not necessary for what you are trying to do such as the unused variables fadeValue and NUM_READS. You do not say why it doesn't work or what you have done to try and fix it. This is not the kind of thing people will want to spend time on trying to help you figure out. Break it into pieces you understand, test them until they work as you want, and then put it back together piece by piece testing as you go.
  18. MSP432P401R LaunchPad Black EEPROM

    Which EEPROM? What comms protocol? I2C? SPI? Serial? Microwire? UNI/O? 1-Wire? Parallel Bus? Start with the EEPROM's comm specs and see what protocol is the best match for the '432, then google...
  19. MSPflash do not work on MSP4305969

    Hi @Fmilburn & @energia , I know its out of topic, but I have a project to counter up & counter down. This counter up or counter down using interrupt and depend on ADC value. If the ADC value higher than certain value, it will counter up, once it lower than certain value it will counter down. I have write the code using energia but still doesn't work. I am wondering whether you are guys can help me to solve the problem. I appreciate your help. Best Regards, Lukman.
  20. MSPflash do not work on MSP4305969

    Hi @Fmilburn , Yes I know about that, is there any way I can write it in another way? I appreciate your help. Thanks a lot. Best Regards, Lukman
  21. How to use EEPROM on MSP432P401R LaunchPad? I've found library for msp430 launchpads, but there's no library for MSP432P401R LaunchPad. How to use EEPROM on this launchpad? Where can I download it? Energia version: 1.6.10E18. Operating system: Linux Mint 18.3
  22. Earlier
  23. MSPflash do not work on MSP4305969

    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.
  24. MSPflash do not work on MSP4305969

    Hi Energia, I know this is energia forum, but yesterday I just try implemented the FRAM code you give to me using CCS 8. It showing error invalid combination of type specifier. Please see the attached file. I am wondering whether do you have any comment? Thanks a lot. Best Regards, Lukman
  1. Load more activity
×