Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


websterling last won the day on August 21 2011

websterling had the most liked content!

About websterling

  • Rank
    Advanced Member
  1. There should be a sub-directory named 'reference' in your Energia directory. I think it's only 8 bits at a time either way.
  2. SPI.transfer only transfers 8 bits. This is what I'm using to transfer a 16 bit value to a DAC. void SPIWrite(int value){ // value is 16 bits // take the LE ( SS ) pin high to inhibit data latching: digitalWrite(latchEnablePin, HIGH); MSB = highByte(value); LSB = lowByte(value); SPI.transfer(MSB); SPI.transfer(LSB); // take the LE ( SS ) pin low to latch the data: digitalWrite(latchEnablePin, LOW); }
  3. Did you reconfigure the RXD and TXD jumpers on the Launchpad?
  4. Do we really need to maximize compatibility with the Arduino? If there's something that's MSP430 specific that offers an improvement to Energia, then maintaining Arduino compatibility shouldn't hold Energia back from incorporating the improvement. Energia should be Arduino-like, rather than Arduino compatible. This doesn't have to be "No Microprocessor Left Behind."
  5. I have a couple of things I'll share once I get them to a presentable point- maybe in the next week or two. This particular project is for a system to monitor carbon monoxide levels in the house during winter while heating with a wood stove. Thanks for your efforts on Energia and on my bugs.
  6. Thanks for the fix. It solved the problem in the sample code. And thanks for the tip about Hardware Serial; I hadn't considered this. I was using TimerSerial begin() and end() to work around the conflict between TimerSerial and PWM using analogWrite. Hardware Serial seems to solve that problem. Thanks, George
  7. Hey, energia, A simple program to read and print the raw adc_value from TEMPSENSOR #include uint32_t adc_value; TimerSerial mySerial; void setup(){ mySerial.begin(); analogReference(INTERNAL1V5); } void loop(){ delay(5000); // delay to open monitor mySerial.print("\nWrite something\n"); adc_value = analogRead(TEMPSENSOR); mySerial.print(adc_value, DEC); mySerial.end(); mySerial.begin(); mySerial.print("\nWrite something else\n"); adc_value = analogRead(TEMPSENSOR); mySerial.print(adc_value, DEC); mySerial.print("\n"); } The output from looping through the pro
  8. My understanding is that using TimerSerial the following should print the 2 statements. And it does work as expected, printing both strings. mySerial.begin(); mySerial.print("Write something\n"); mySerial.end(); mySerial.begin(); mySerial.print("Write something else\n"); The following code does not work as expected. mySerial.begin(); mySerial.print("Write something\n"); adc_value = analogRead(pin); mySerial.print(adc_value, DEC); mySerial.end(); mySerial.begin(); mySerial.print("Write something else\n"); adc_value = analogRead(pin); mySerial.print(adc_value, DEC); I exp
  9. The temperature is higher because the temperature sensor is likely on the same die as the microprocessor, and there is some heating due to power dissipation. I can't remember the specifics, but I think my problem was in the programming. I don't think power dissipation could cause the chip to run 20 degrees higher than ambient.
  10. https://github.com/energia/Energia http://energia.github.com/Energia/
  11. Thanks, rick! I patched wiring_analog.c and my code runs as expected. I wish I had the experience to go into the internals of Energia and contribute by fixing these things, but I don't. But I guess that he who finds bugs (and reports them) also contributes. Thanks, again, George
  12. Some additional information in case anyone is interested. If I change the code so that each analog Read() is called 2 times- for example: temp_raw = analogRead(TEMPSENSOR); delay(1000); temp_raw = analogRead(TEMPSENSOR); delay(1000); temp = temp_raw/4; The output is in the order expected. I edited the title of this thread to make it more indicative of what the problem is.
  13. I'm trying to develop my current project entirely in Energia. Since Energia is still in development, I'm breaking the code down into chunks and making sure that things work as expected. The following code gets 3 values from the ADC (TEMPSENSOR and 2 analog inputs), divides each value by 4, and writes the resulting values out to the Serial Monitor. I can vary the voltage to the analog inputs with a potentiometer. This is using 0101E0006 on a 2553 on a Rev. 1.4 Launchpad with the crystal installed. #include #define CO_IN A4 //P1.4 #define RH_IN A5 //P1.5 uint32_t co_volts; uint32_t
  14. Thanks, Robert, It now works as expected.
  • Create New...