Looking over the datasheets and the implementation it seems both pins (on the 2452 and 2231) have the required hardware to do either task. So why be inconsistent with the 2553 and require all the jumper craziness? Am I missing something here?
TimerSerial: why use P1.1 for TX and P1.2 for RX?
400kHz I2C on G2553 with Energia?
Hi,
it seems, that by default the I2C frequency is set to 100kHz (according to the comment in TWI.c). What is the simplest way to change the frequency to 400 kHz? Is it necessary to change the TWI.c or could this be done directly in the Energia-Sketch?
Kind regards
yosh
Eagle Booster Pack based on F5529LP
Watch Dog timer
How to use the watch dog timer in the MSP430G2553 with Energia?
It will be very helpul if someone could post a very simple exemple of the necessary code to "auto-reset" the micro when the program takes more time then predicted.
using voltage signal as a button press
I am VERY new to electronics and the MSP430 so please forgive my ignorance. My friends and I started up an electronics club a couple months ago and our first group project we are doing is a Rube Goldberg machine. The only stipulation is you get a 5volt power in do something with it and give 5volt back out. my particular project is the following.
1st msp430
receive 5volt
activate 3 sets of leds red, yellow, green
activate a servo that flips a switch to turn on a slot car
2nd msp430
count number of laps by car
once 5 laps have occurred light up 3 sets of leds
activate a servo that flips a switch to send my 5volts to the next part of the machine.
My question is this. I want power the entire time to my msp430's. I have an IF loop running waiting for button press "pinMode(buttonPin, INPUT_PULLUP); " then it lights the lights and runs the servo.. I set this up for testing. I need to remove the button and replace it with a voltage signal on my pin instead of going to ground. Is there a way to do this?
I know I can just use the 5volts to turn on my msp430 and run without the IF loop but I want to see if I can do it this way.
Again I am VERY new to this so I hope I gave enough information.
Bill
MSP430G2553 I2C Interface help required
Hi all,
I would like to interface an I2C ADC (PCF8591) for one of my application. I have tried a lot with the sample programs. But still my launchpad is not even generating the clock pulse.
Can anybody help me.
port driver cc3000 wifi TI to msp430f249
Hello all,
I am using msp430f249 MCU to interface with cc3000mod TI WIFI chip via SPI, and I had a problem when initiating start cc3000 via SPI.
when I sent first write command to start cc3000 wifi , but cc3000 response wrong data.
here is cc3000 document: : http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_(SPI)
from msp430 to cc3000 command: 01 00 05 00 00 01 00 40 01 00 . I sent right command on TXbuffer register.
from cc3000 to msp430 command: I received : {02}{00}{FF}{00}û{00}{00}{00}{00}û (wrong received data) instead of 02 00 00 00 05 04 00 40 01 00 (right data). Only first two bytes are true 0x02,0x00 and otherwise is false.
there are 5 connected pins, SPI_CS,SPI_Din,SPI_Dout, SPI_CLK, SPI_INT.
Personally, I think that signals did not completely transmit to cc3000, so it didn't response right data. I pay attention to 2 pins SPI_CLK and SPI_Dout because it transmits data to cc3000. I get feedback someone say that it didn't match impedance but I don't know how much impedance or capacitor, resistor, inductor should add?. I am not electrical profession, so it is difficult to solve it. When I load some resistor or capacitor on SPI_Dout, then msp430 host receive different signals.
Someone can help cope with this situation, hopely?
Thank you so much
regards
Tuong
FET vs EEM
Hi all,
Another newbie question: What's the differences in the roles played by a Flash Emulation Tool and the emulation done in the Embedded Emulation Module in my MSP430? It sounds like they both support debugging. Do they work together?
Thanks!
-JVimes
port driver cc3000 wifi Ti to msp430
Hello all,
I am using msp430f249 MCU to interface with cc3000mod TI via SPI, and I had a problem when initiating start cc3000 via SPI.
when I sent first write command to start cc3000 wifi , but cc3000 response wrong data.
here is cc3000 document: : http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_(SPI)
from msp430 to cc3000 command: 01 00 05 00 00 01 00 40 01 00 . I sent right command on TXbuffer register.
from cc3000 to msp430 command: I received : {02}{00}{FF}{00}û{00}{00}{00}{00}û (wrong received data) instead of 02 00 00 00 05 04 00 40 01 00 (right data). Only first two bytes are true 0x02,0x00 and otherwise is false.
there are 5 connected pins, SPI_CS,SPI_Din,SPI_Dout, SPI_CLK, SPI_INT.
Personally, I think that signals did not completely transmit to cc3000, so it didn't response right data. I pay attention to 2 pins SPI_CLK and SPI_Dout because it transmits data to cc3000. I get feedback someone say that it didn't match impedance but I don't know how much impedance or capacitor, resistor, inductor should add?. I am not electrical profession, so it is difficult to solve it. When I load some resistor or capacitor on SPI_Dout, then msp430 host receive different signals.
Someone can help cope with this situation, hopely?
Thank you so much
regards
Tuong
CAN - SPI
I want to start playing around with CAN bus protocol but I don´t know where to start....
I´m thinking in making my own pcb of this product ( mikroelektronika can spi 3.3v) but I need some guidance how this board works, what connections should be made and how to make a simple code using Energia...
Variable value unintentional changing ...
Hi all,
I have been using the Msp430s for a long time now, my network of several AirBoosterpacks communicates well. Data flows from my MSP430s to the internet and vice versa ... Controlling things via the internet also works.
I am displaying much of my data on an LCD screen (thanks RobG for the easy start code).
But something bugs me and I am not certain where it originates. I have a global variable textcolour that I have declared as a volatile u_int with a default setting of COLOR_16_GREEN. But sometimes I want to change that value to make my display show different colours.. I am using RF (called via an internet connection) to do this.
I am changing the displaycolour by sending a simple RF package (from an other MSP). The reception of the command works fine and when I change the value of textcolour after the package was received the display behaves as planned... but only for some time. Suddenly the display will change colour again without me sending an RFcommand. This definitely has to do with the variable. If I declare the variable as a constant this problem does not occur.
So my question is ... how can a variable change suddenly ? I first had the feeling that it might be due other RF commands coming in during an update of the display. But when I update parts of the display I first disable all interrupts and after the update I enable the interrupts again. Incoming data on the display looks fine ... but the display automatically turns into a rainbow when I use a variable to set the colour ...
Anybody with a guess ??
regards
CorB
Help! Trying to use LCD with Potent and Buzzer
I have been working on this since my last post on the buzzer which I am glad to say I got working, now I have combined the code with an hello world code which worked for a second and quit, if anyone can help me get this straighten out I would be thankful. The code is kinda long. What I am trying to get it to do is when the potent is reading greater 1000 it plays a song and turns rgb on from the Educational Booster Pack and display hello world on the LCD also.

MSP43FG4618 DAC12's configuration problem
I try to receive zero voltage on DAC output (like a test). For my device it is necessary to configure DAC group. Here initialization procedures:
void init_DAC0 (void)
{
// we set 12-bit permission
DAC12_0CTL& = ~ BIT12;
// we set the range of the input reference
// DAC12 voltage to equal 1 multiple reference voltage of Vref +
DAC12_0CTL | = BIT8;
// we set the natural binary data format
DAC12_0CTL& = ~ BIT4;
// for input and output buffers we set high speed/current
DAC12_0CTL | = BIT7;
DAC12_0CTL | = BIT6;
DAC12_0CTL | = BIT5;
// we set reference voltage equal Vref +
DAC12_0CTL& = ~ BIT14;
DAC12_0CTL& = ~ BIT13;
// loading in a latch of DAC12 it is realized in case of record in all registers DAC12_xDAT of group
DAC12_0CTL& = ~ BIT11;
DAC12_0CTL|= BIT10;
// the group on this DAC is exposed
DAC12_0CTL|= BIT0;
// we disconnect interruptions from DAC12
DAC12_0CTL& = ~ BIT3; // interrupt enable
DAC12_0CTL& = ~ BIT2; // interrupt flag
// we include conversion
DAC12_0CTL | = BIT1;
// we launch calibration and we wait for its completion
/*DAC12_0CTL | = BIT9;
while ((DAC12_0CTL&BIT9) == 1); */
}
ANT+ transceiver
Hello guys,
My last crazy idea is to have fun with ANT+ communications
I used bluetooth 2.0 transceiver before, but I'd like to try other technologies, like BT 4.0 and ANT+
Do you have some advices for me? I found a ready-to-use transceiver module, but I can't find any piece of code or project to study
http://www.thisisant.com/resources/ant-ap2-transceiver-module-datasheet/
My goal is to interface a transceiver like this to a MSP430 or TivaC microcontroller to send some data to a pc/smartphone.
Thank you in advance,
Dario
nRF24L01+, Raspberry Pi, and MSP430G2553
I couldn't find an example of someone using the Raspberry Pi as a receiving hub for sensor nodes that use the spirilis nRF24L01+ library and a MSP430G2553. I thought I would give it a shot since I think this would be beneficial to the community. I found a C library for the Raspberry Pi and nRF24L01+: https://github.com/stanleyseow/RF24. Class reference is here: http://maniacbug.github.io/RF24/classRF24.html
There is also a newer python library but I haven’t tried that one yet(https://github.com/jpbarraca/pynrf24).
I have yet to get it working and hope you guys could help me.
I am using this basic TX code using the spirilis msprf24 library on my MSP430G2553 Launchpad(https://github.com/spirilis/msprf24):
#include <msp430.h> #include "msprf24.h" #include "nrf_userconfig.h" #include "stdint.h" volatile unsigned int user; void main(){ char addr[5]; char buf[32]; WDTCTL = WDTHOLD | WDTPW; DCOCTL = CALDCO_1MHZ; BCSCTL1 = CALBC1_1MHZ; BCSCTL2 = DIVS_1; // SMCLK = DCOCLK/2 // SPI (USCI) uses SMCLK, prefer SMCLK < 10MHz (SPI speed limit for nRF24 = 10MHz) // Red used for status P1DIR |=BIT0; P1OUT &= ~BIT0; user = 0xFE; /* Initial values for nRF24L01+ library config variables */ rf_crc = RF24_EN_CRC | RF24_CRCO; // CRC enabled, 16-bit rf_addr_width = 5; rf_speed_power = RF24_SPEED_1MBPS | RF24_POWER_MAX; rf_channel = 120; msprf24_init(); // All RX pipes closed by default msprf24_set_pipe_packetsize(0, 32); msprf24_open_pipe(0, 1); // Open pipe#0 with Enhanced ShockBurst enabled for receiving Auto-ACKs msprf24_standby(); user = msprf24_current_state(); addr[0] = 0xDE; addr[1] = 0xAD; addr[2] = 0xBE; addr[3] = 0xEF; addr[4] = 0x00; w_tx_addr(addr); w_rx_addr(0, addr); // Pipe 0 receives auto-ack's, autoacks are sent back to the TX addr so the PTX node // needs to listen to the TX addr on pipe#0 to receive them. while(1){ __delay_cycles(800000); buf[0] = '1'; w_tx_payload(32, buf); msprf24_activate_tx(); LPM4; if (rf_irq & RF24_IRQ_FLAGGED) { rf_irq &= ~RF24_IRQ_FLAGGED; msprf24_get_irq_reason(); if (rf_irq & RF24_IRQ_TX){ P1OUT |= BIT0; // Red LED on } if (rf_irq & RF24_IRQ_TXFAILED){ P1OUT &= ~BIT0; // Red LED off } msprf24_irq_clear(rf_irq); user = msprf24_get_last_retransmits(); } } }
I found this Raspberry Pi receiving hub code example (http://blog.the-jedi.co.uk/2013/10/07/nrf24l01-and-raspberry-pi/):
#include <cstdlib> #include <iostream> #include "../RF24.h" using namespace std; // spi device, spi speed, ce gpio pin RF24 radio("/dev/spidev0.0",8000000,25); void setup(void) { // init radio for reading radio.begin(); radio.enableDynamicPayloads(); radio.setAutoAck(1); radio.setRetries(15,15); radio.setDataRate(RF24_1MBPS); radio.setPALevel(RF24_PA_MAX); radio.setChannel(120); radio.setCRCLength(RF24_CRC_16); radio.openReadingPipe(0,0xDEADBEEF00LL); radio.startListening(); } void loop(void) { // 32 byte character array is max payload char receivePayload[32]; while (radio.available()) { // read from radio until payload size is reached uint8_t len = radio.getDynamicPayloadSize(); radio.read(receivePayload, len); // display payload cout << receivePayload << endl; } } int main(int argc, char** argv) { setup(); while(1) loop(); return 0; }
Which I compiled on the Raspberry Pi using:
g++ -Wall -Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s -L../librf24/ -lrf24 pi_rf24ping_rx.cpp -o pi_rf24ping_rx
and ran on the Raspberry Pi using:
sudo /home/pi/gitwork/RF24/librf24-rpi/librf24/examples/pi_rf24ping_rx
I am sure that I am missing something obvious. I assume with the addressing and the pipes. I have been reading through the datasheet trying to get a better understanding of how the nRF24L01+ works but still haven't been able to get them talking. Any ideas?
RDA5807P (TEA5767 clone) FM Radio inside a PC speaker
Anton Veretenenko created a simple FM Radio with a TEA5767 compatible chip. The RDA5807P is an I2C (Or spi) controlled FM Radio Tuner. He used a generic AC Powered PC Speaker, added a 3.3v regulator, a rotary encoder, and stuffed it in.
The post and code don't mention it, but from the pictures, the stated 2kb limit, and the use of USI, it's using the G2231 on a v1.4 Launchpad.
Blog Post: http://blog.avrnoob.com/2013/10/ti-launchpad-rda5807p-tea5767-fm-radio.html
Code Repo: http://code.avrnoob.com/ti-launchpad-fm-radio
Similar to @juani_c project: http://forum.43oh.com/topic/2359-fm-radio/
Audi Car Stereo AUX Input Hack with Launchpad
VTL On the Hackaday Forums was able to use a 2kb Msp430 to trick a Audi Concert Stereo into thinking it has a CD-Changer connected, enabling Aux Inputs. The code is a Port of a Arduino Port of a AVR Port of the VWCDPIC project (PIC Based).
Using a MSP430G2231, VTL was able to implement two different Uni-Direction Protocols, through Timer_A1 and the Watchdog Timer using extra software delays.
The same protocol is used in B5, B6 and B7 Audi A4s i.e. Generation I, Generation II and Generation II+ Audi head units.
Unfortunately, the code is no longer available, but the post is still a nice writeup on reverse engineering a stereo and porting of code found on the internet, with good pictures too.
Free EmBlocks 1.40 with MSP430 and mspdebug support
This version has a GDB 7.6.1 for MSP430.
There is a debugger script file for "mspdebug"
Download at
GSM-Remote-Controlled Car-Heater
Hey there,
it has been a while since my last project - and i didn't finish it till now. Since i got employed there is only a little time left for projects like these
Cause it is getting cold here and i don't want to sit in a cold car every morning when driving to work i had the idea for this small project.
Spontaneously i ordered an Siemens TC35i - GSM - Module on ebay for 25€ (~35$) - got it two days later in my hands.
This should be the fastest way to start with some GSM - Development
It took some time to get it up running but the first step has been completed.
Actually i have set up a serial terminal connected to my PC.
I can make calls and found out how to send and receive SMS.
The Module:
Some helpful Informations on AT-Commands:
http://www.cellular.co.za/at_etsi.htm
http://en.wikibooks.org/wiki/Serial_Programming/Modems_and_AT_Commands
http://www.nobbi.com/atsiem.html
List of useful AT-Commands:
So the next steps will be:
1. Implement a small console on MSP430
2. Build a wrapper for sending commands and interpreting the returned Status-Texts
3. Implement the Heating-Control-"Stack"
4. Implement some Monitoring-Code (Voltage, maybe Current -the TC35i - Module can draw up to 2 Amps under bad conditions, Temperature, ...)
5. Develop the final Scheme - not much - just some sensors and digital relays
For Security-Reasons i will only allow reception of commands from a fixed Phonenumber.
MultiSerial Example Not working
Hello,
I am just getting started with the MSP-EXP430G2 development board so that I can use it for a project. For this project I need to receive/send serial commands on one port and then send/receive them on another. I pulled up the MultiSerial example to get me a quick example and I get an error when trying to compile:
MultiSerial.ino: In function 'void setup()':MultiSerial.ino:22:3: error: 'Serial1' was not declared in this scopeMultiSerial.ino: In function 'void loop()':MultiSerial.ino:27:7: error: 'Serial1' was not declared in this scope