Jump to content

BinaryA

Members
  • Content count

    7
  • Joined

  • Last visited

  1. Help with Serial monitor not working

    Hi Robert Thank you for the help. I couldn't see the woods for trees. Ill make that change to digital inputs and use the pullup internal resistors. I really appreciate the help. Andy
  2. HI All Im havng a number of problems, Serial monitor doesn't seem to work for programs Ive written yet if I use an example sketch with serial prints in it the example sketch works. If I add a some simple button reading code to the example sketch the serial monitor stops working. I have a 10kOhm resistor connected to ground the other end to pin4 and the button and other end of the button to Vcc. Ive spent three frustrating days trying to get this working. I have version 1.5 of the MSP430 launchpad with a MSp430g2553. The jumpers are connected horizontally for Txd and Rxd. Im using Energia r17 (which seems to hang the computer randomly). Ive tried different baud rates 9600 and 115200. I thought reading a couple of buttons and checking them on the serial monitor would take an hour to do boy how wrong was I.The MSP is com5 on my computer (checked this with device monitor, Im running windows 10) which is what I selected in energia and Ive selected the proper board. Ive even put in a new MSP430g2553 chip. Ive tried the AnaloguInOutSerial program and serial monitor works. I then added code but commented out the analog stuff so the sketch looks like this but serial monitor stops working. See below: /* Analog input, analog output, serial output Reads an analog input pin, maps the result to a range from 0 to 255 and uses the result to set the pulsewidth modulation (PWM) of an output pin. Also prints the results to the serial monitor. The circuit: * potentiometer connected to analog pin 0. Center pin of the potentiometer goes to the analog pin. side pins of the potentiometer go to +3.3V and ground * LED connected from digital pin 9 to ground created 29 Dec. 2008 modified 30 Aug 2011 by Tom Igoe This example code is in the public domain. */ // These constants won't change. They're used to give names // to the pins used: //const int analogInPin = A0; // Analog input pin that the potentiometer is attached to //const int analogOutPin = 9; // Analog output pin that the LED is attached to //int sensorValue = 0; // value read from the pot //int outputValue = 0; // value output to the PWM (analog out) const int b1=4; void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); pinMode(b1,OUTPUT); } void loop() { int but1; // read the analog in value: //sensorValue = analogRead(analogInPin); // map it to the range of the analog out: //outputValue = map(sensorValue, 0, 1023, 0, 255); // change the analog out value: //analogWrite(analogOutPin, outputValue); // print the results to the serial monitor: but1=digitalRead(b1); Serial.print("button1 = " ); Serial.println(but1); // wait 500 milliseconds before the next loop // for the analog-to-digital converter to settle // after the last reading: delay(500); } Can anybody tell me whats wrong is it a jumper setting? my code? my computer? Now and again I get error=57 and no unused fet when trying to upload not all of the time but some of the time. Something as simple as reading a button shouldnt be this difficult. Any help would be appreciated. Andy
  3. Hello from Scotland

    Hi All Just started with the MSP430s and thought I would say hello. Its a bit of a learning curve coming over from the arduinos. Just having problem after problem at the moment dont know if its me or the board or my PC or a combination of the above lol. Any away I thought I would join the forums. Andy
  4. Hi Bob Thanks for that. I'll remember that for the future. I did this after the short, in case I had blown one of the other ICs but still cant power the 430. I'll just have to program it on the board and test with external power off board. Thank you for all the help. Regards Andy
  5. Hi I wonder if anybody can give a newbie some advice. I just started using my MSP430G2553 today. Was working great through USB and getting to grips with the basics using energia 101E0017 (I couldnt get R18 working). Then decided to disconnect the USB cable and power at 3.6V through the 3 pin header (Vcc GND, GND) was working good until I knocked the board and a cable must have shorted something, as the board will no longer power through Vcc but will when using the USB cable. Powering through the Vcc on the 3 pin header or the 10 pin header on the left side of the board I get 3.6 volts on pin1 of the chip (+ve supply of the chip) but also on pin 20 I believe the ground pin of the chip. I cant understand why this should happen with external power but not when powered by the USB. Programs can be uploaded to the board. I've tried various sketches they all work. I'm just getting back in to electronics so I've probably missed something obvious. (A side note should the Vcc jumper be removed when powering externally or does that not matter.) Any help would be gratefully appreciated.
  6. Hi I wonder if anybody can give a newbie some advice. I just started using my MSP430G2553 today. Was working great through USB and getting to grips with the basics using energia 101E0017 (I couldnt get R18 working). Then decided to disconnect the USB cable and power at 3.6V through the 3 pin header (Vcc GND, GND) was working good until I knocked the board and a cable must have shorted something, as the board will no longer power through Vcc but will when using the USB cable. Powering through the Vcc on the 3 pin header or the 10 pin header on the left side of the board I get 3.6 volts on pin1 of the chip (+ve supply of the chip) but also on pin 20 I believe the ground pin of the chip. I cant understand why this should happen with external power but not when powered by the USB. Programs can be uploaded to the board. I've tried various sketches they all work. I'm just getting back in to electronics so I've probably missed something obvious. (A side note should the Vcc jumper be removed when powering externally or does that not matter.) Any help would be gratefully appreciated.
  7. Hi All I'm new to this forum only having recently purchased one of the launchpads. I'm having the same problem as above on windows 10 is there another work around or is it best to revert to R17.
×