Jump to content


  • Content Count

  • Joined

  • Last visited

About pimmel

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Madison, Alabama
  • Github
  1. By the way, thank you for posting this. Your code gave me enough information to debug my code so that I could do the initial setting of si570 and make sure that my I2C connections were going to the right place. I can't tell you how pumped I was when I saw my frequency meter jump to 14.2 MHz after reflashing the launchpad!
  2. Hi Jean-Yves, Looking over your code in the ino file, I think you might be writing to the wrong register to freeze the DCO; around line 167 you use register 135 instead of 137. Likewise for unfreezing the DCO. While some sample code I was playing around with didn't seem to matter for the register values I was playing with (jumping from 10 MHz to 14.2 MHz), the way I read the data sheet for the SI570 indicates that for large frequency change you should freeze 0b00010000 (0x10). So maybe use this instead? (untested - I was playing outside of energia): //Freeze DCO err |= SI570_Wr
  3. ...and the final post in this series involves success reading and writing via I2C outside of Energia, using a very modest addition to the neat I2C library created by @@V0JT4, found here [1]. When I tried compiling it with mspgcc, it complained about _swap_bytes being undefined, so I just knocked up a real quick implementation for it. It looks like it is used for 16bit addressing, but as I'm only using 8bit addressing at the moment, I haven't had an opportunity for it to fail magnificently! So now I have my starting point for playing around with the si570 I2C-controlled oscillator: makefile,
  4. I downloaded the latest version of Energia, and now I actually got somewhere! Wootwoot.... My ino file #include "Wire.h" void setup() { // put your setup code here, to run once: Wire.begin(); Serial.begin(9600); Serial.print("write some bytes\n"); Wire.beginTransmission(0b10100000); Wire.write(0); Wire.write(0); Wire.write(67); // Capital 'C' Wire.write(65); // Capital 'A' Wire.write(66); // Capital 'B' Wire.endTransmission(); Serial.print("move the read pointer\n"); Wire.beginTransmission(0x50); Wire.write(0); Wire.write(0); Wire.endTransmission
  5. Okay, so I tried to use the TI I2C library found here [1], but again I'm running into a brick wall My main routine code shown below #include <msp430.h> #include "TI_USCI_I2C_master.h" #include "serial.h" void printf(char *, ...); void main(void) { char c; unsigned int dev_address = 0b10100000; unsigned int reg_address = 0x00; unsigned int data[3]; unsigned char array[5] = { 0x0, 0x0, 0x3, 0x2, 0x1}; unsigned char store[3] = { 0x0, 0x0, 0x0}; int i; // Disable watchdog WDTCTL = WDTPW + WDTHOLD; // Use 1 MHz DCO factory calibration DCO
  6. I should mention that I have my SCL line on P1.6 and my SDA line on P1.7...is that even correct? Everything I found (including the data sheet) seemed to indicate that those were the two pins to use, but I couldn't really follow the I2C code and find an explicit declaration of using those pins. One more quick edit; I have 10k pull-up resistors on the SDA and SCL lines and I have the jumpers to the LEDs on the LP removed.
  7. Hey gang, I'm slowly working my way towards supreme greatness and world-overlord status, but before I achieve that I thought I would set up some working tools in my toolbelt. So among the first things I wanted was a Pimmel-proof I2C setup. I'm using an MSP430g2553 chip, and I found some sample code that @@_Murphy_ created found here [1]. Paired with the wonderful serial printf combo found in this thread [2], I thought I had the makings of the awesomeness that is me. I soldered up a simple version of the 3eeprom board found on dangerousprototypes [3], tested it with a bus pirate to ensure i
  8. Okay, so I tried reworking it using C-style structs and msp430-gcc instead of msp430-g++; basically I'm getting the same results if I try use floor and ceil from math.h; if I remove the --nodefaultlibs from my CFLAGS, I then get an error about floor and ceil not being defined. If I get slimy and use my own version of floor and ceil by using casting of ints, it actually compiles. So I know I'm missing something basic in the original problem. Does anyone have any insight as to what I bombed on during my linking and the missing math functions? I think I'm going to try and use nm and see if floor
  9. So I'm trying to to create a simple little program that will interface with an si570 I2C-controlled variable oscillator. The code that I started with as a library was originally for an mbed platform [1]. Opting to keep the class structure from the mbed library, I proceeded to use the included msp430-g++ compiler shipped with Energia. I knocked up a quick Makefile based upon this thread here [2]: OBJECTS = main.o SI570.o CC = msp430-g++ CPPFLAGS =-Os -Wall -g -mmcu=msp430g2553 all : $(OBJECTS) $(CC) $(CPPFLAGS) $(OBJECTS) -o main.elf %.o : %.cpp $(CC) $(CPPFLAGS) -c $< clean:
  10. Hey gang, In addition to trying to adapt some code into an Energia library for the SI570 I2C-controlled oscillator, I also have managed to get ahold of the Adafruit LPC810 mini-kit/programmer [1], with the intent to play around and learn something about working with ARM processors. Sick of using a breadboard, I soldered up on protoboard my own version [2] of NXP's LPC800 mini-board [3] and ran through the tutorials provided by Adafruit [4]. I've also installed the Launchpad generic ARM compiler [5] so that I am not tied to an IDE like LPCXpresso [6] and have a little more insight under th
  11. Hello Jean-Yves, Sorry for going off-topic here, but I have been trying to build a simple Energia library for the si570 (on this board)...When I power it on, I have an initial frequency of ~10MHz...trying to force it to different frequency (both the small offset and large offset) resulted in no change at all. I have pull-up resistors on SDA and SCL. Unfortunately my harddrive crashed and I lost my code (it was based primarily off of an mbed library I found here). Would you be willing to share your si570 code? Thanks, Keith (KI4SAI)
  12. At my job, we had a training class on FPGAs; the project I choose to do was a take on a digital theremin, which ended up using a Launchpad with Energia. If you're suffering from insomnia, feel free to check out the build notes and links to code here: http://underwaterwhistler.blogspot.com/2013/04/fun-with-msp430-launchpad-and-digilent.html
  13. I'm in...self portrait from many moons ago of trying to whistle underwater
  14. Okay, part two of working within cygwin. I now have a post on building up and using a debugging environment with OpenOCD and gdb. If anyone is interested, the write-up can be found at http://underwaterwhistler.blogspot.com/2013/02/stellaris-cygwin-and-openocd-for.html. Again, this is mostly work of others, based heavily off of support from Spen and Mauro. Enjoy!
  15. That worked...I also had to make sure that the tcl package is not installed for Cygwin when building...Thanks for the help, Spen!
  • Create New...