Jump to content

mph

Members
  • Content Count

    20
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by mph

  1. mph

    Multiple timers

    Implementing multiple timers simultaneously can be tricky and I was unable to find any good examples in TI's Resource Explorer. Using the MSP430FR5969 Launchpad, this code generates a sequence of multi-tone square waves to drive an external piezo-buzzer. The audio frequency is set by TA1 and waveform duration controlled by TA0. Written in C to illustrate the bit-wise register operations: https://github.com/microphonon/Piezo_Buzzer
  2. This is my understanding as well. Placing interrupts inside interrupts is best left to the experts. I am not one of them.
  3. mph

    Microphone MSP430F5438A

    I would suggest moving the audio electronics to a separate breadboard. You will have complete control of the front end: microphone selection, gain, filtering, etc. There are essentially two choices of microphones for breadboarding: condenser electret and MEMS. Sparkfun and Adafruit make breakout boards for both.
  4. I do not believe the G-series Launchpad works with Linux. CCS should have given you an warning during install. There is hardware incompatibility. You still have options: i) Install CCS on Windows ii) Get a different Launchpad that has a Linux driver. You can use this and jumper wires to flash your value line MCU.
  5. Do you have a 32 or 64 bit machine? 32-bit Linux only supported up to version 6.1.3 of CCS so you cannot run the latest version. Also be sure to add your user to the dialout group to access peripherals.
  6. Simple demo code that uses FR5969 Launchpad to set an AD5160 10k digital potentiometer in 1k increments. Device communication via SPI and control with a serial terminal program. Implemented with registers and interrupts. Link to github repo: https://github.com/microphonon/AD5160
  7. Need more information. Are you using Launchpad? CCS? Did you get example code from MSP430 Ware?
  8. I suspect you will get more help if you could provide a detailed description as to why the code is not doing what you expect. Is this code known to work or are you developing it yourself? I had to dig through the 30101 data sheet to understand the purpose of the various registers and functions. If the read and write pointers are stuck on zero, which is what you have indicated, that means they are not advancing with each iteration of the while loop. It looks like you are attempting to do a data register burst read in each iteration; the data sheet explicitly instructs not to do this. Perhaps if you replace the burst read with a byte read; see if that changes the pointer counters.
  9. Added code for the FR5969 Launchpad to the github repo.
  10. Github updated with firmware ported to MSP430FR59xx MCUs. Developed and tested with the FR5969 Launchpad.
  11. Github has been updated with firmware for the MSP430FR59xx; developed with the FR5969 Launchpad. This was a non-trivial modification of the above F5529 code as all the configuration registers are different. My Launchpad was unable to supply the ~90 mA of sensor heater current. By moving some jumpers, it can be configured to run from an external 3.3V supply and the heater worked OK. The heater is not necessary for sensor operation. TI sells a TIDA-01625 demo board that integrates the HDC2010, MSP430FR5969, and low power TFT display. They have CCS code on their github but it involves a multitude of nested libraries. The code I have written is very compact with all sensor and display operations contained in a single C program.
  12. You should be able to modify the code I recently posted that connects the 5529 Launchpad to the TI HDC2010. I think you would only have to figure out the relevant registers. There is some simple code on my github to read and display the slave serial number so I suggest starting there. If you want to use Energia/Arduino code instead of a register-based approach, someone else will have to help.
  13. The above github for this sensor has been modified to include pressure readout. Pressure is displayed in units of hectoPascal (1 hPa = 1 mbar). Typical sea-level atmospheric pressure is 1013 hPa. I tested at ~5000 ft ASL and get a correct reading of 840 hPa.
  14. The Bosch BME280 pressure-temperature-humidity sensor is very popular for projects because there are breakout boards available from Adafruit and Sparkfun as well as a large library of code to interface it to Arduino MCUs. Not so much for the MSP430, especially transparent code to understand what is happening at the register level. I have written and tested some demo C-code that hopefully fills that gap. It sacrifices generality and efficiency for compactness and transparency. I use the F5529 Launchpad and communication with the sensor is via SPI using the UCB0 module. I2C is also available for the BME280 but not implemented here. Temperature and relative humidity (no pressure) data is obtained using the forced mode with periodic polling by the MSP430. Sensor and MCU are in low-power sleep modes when not active. Data is streamed to a terminal program that is interfaced to the Launchpad via serial UART. Each BME280 has unique trimming parameters that must be retrieved and properly parsed to convert the raw data. This process is quite complicated, so separate functions were developed to handle them and placed in an include library. My IDE is CCS 6.1.3 with nofloat printf support. This code should work directly in the MSP430x5xx and MSP430x6xx families. Other MSP430 series such as FR and value-line will need to make appropriate module/register modifications. Link to github is here: https://github.com/microphonon/BME280
  15. Try this video if you are new to CCS: https://www.youtube.com/watch?v=Ppm8tSV7krQ
  16. There is code available to implement I2C communication between the MSP430 and the HDC2010 temperature-humidity sensor, but it's a bit like an onion -- you have to peel away layer after layer in various libraries to drill down into what is happening at the register level. I decided to write some transparent demo code for this sensor that is self-contained: everything related to the I2C interface is in a single C program. It has been successfully tested with the F5529 Launchpad. This is a simple MCU polling operation that periodically makes a T-H measurement using the on-demand mode of the sensor. The data is sent to the serial port for display on a terminal program. The on-board heater is activated for a few seconds upon reset. I have not implemented the temperature-humidity high/low interrupts. One could also configure the sensor to output data periodically and toggle its DRDY pin to wake-up the MCU from LPM4. Polling code is here: https://github.com/microphonon/HDC2010 The HDC2010 is a tiny sensor with a 6-bump BGA footprint. TI makes an evaluation module that uses an MSP430F5528 to interface the sensor with a configuration/graphing GUI program. Their program only runs on 64-bit Windows. The portion of the PCB hardware containing the sensor can be broken off (permanently) to reduce thermal mass and allow placement in a project. I decided to make my own breakout boards (see photo), but just learned that MikroElektronika started selling essentially the same thing for $13 (MIKROE-2937).
  17. Sensirion has recently introduced an inexpensive, low-power temperature humidity sensor SHTC3 designed for operation in the range 1.62--3.6V . It should be a useful peripheral for MSP430 battery-powered applications. I have tested 3 sensors with the F5529 Launchpad and they exhibit reliable, consistent behavior. For reference, I have written some demo code for I2C communication that is available on github: https://github.com/microphonon/SHTC3 The SHTC3 comes in a small DFN package, so to do breadboard testing I had to build my own breakout boards and use reflow soldering (see photo).
  18. I did some systematic testing with the configuration registers in CC1100-CC2500.c, to see which settings affect the interaction of the two CC110L Booster Packs. Switching IOCFG2 from 0x0B to 0x29 (serial clock to the recommended CHIP_RDYn) had no effect. Changing PKTCTRL1 and FSCTRL1 to the recommended settings also did not affect operation. However, changing MCSM1 from 0x3F to 0x30 failed to produce an acknowledgement LED blink on the receiving board. According to the TI CC110L manual, this register selects what the transceiver does after a packet is received/sent. For 0x30 it sets idle/idle whereas 0x3F sets it to receive/receive.
  19. Thanks for a very interesting discussion. I have installed and successfully run the Larsie code on the Anaren Boosterpack using IAR. Now I am carefully going through the code, trying to understand it. I have a question about the SPI register settings that are written in the file CC1100-CC2500.c, which doesn't seem to match the requirements for the CC110L. We have #define TI_CC_RF_FREQ 868 I looked at the register settings in Smart RF Studio for the CC110L and also the Anaren manual and compared them to the register settings in CC1100-CC2500.c for 868 MHz. I found the following discrepancies (all in hexadecimal): REGISTER Anaren/RF Studio CC1100-CC2500.c IOCFG2 29 0B PKTCTRL1 04 05 ADDR 00 01 FSCTRL1 0C 0B MDMCFG2 03 or 13 73 MCSM1 30 3F AGCCTRL0 B0 or 91 B2 FSCAL2 2A 0A FSCAL0 1F 11 TEST0 09 0B Can someone explain the reason for these different settings or do they not matter?
×
×
  • Create New...