Jump to content

username

Members
  • Content Count

    305
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    username got a reaction from SiskinEDGE in SD Media Player with FAT16   
    I'd most certainly as well be interested in byte to byte write support. Let us know what you find out! Regarding memory space, the new launchpads ship with the G2553 which has 16KB of flash memory space. Considering this is becoming a very common value line chip I wouldn't worry too much about the 2kb msp430s. Overall, i'd just be nice to get something to work =)
     
     
  2. Like
    username reacted to SiskinEDGE in SD Media Player with FAT16   
    Here is a video of the music player in action:



    The code has the following functionality:
    Initilise the FAT16 filesystem from an SD card in a single command - ThinFAT_Init();
    Open Files on an SD card and allow you to test each filename with a callback
    Index Files by useing the same command as to open them with a callback
    returns data on if the filestream is active
    returns data on how far the file has been read through
    callback for when end of the file is reached
    Open Folders on an SD card - Untested

    and limitations:
    uses 54 bytes of ram approx
    dosen't support fragmented files
    reads file end to closest sector, not byte (for performance reasons)
    reads FAT16 filesystems, not FAT32
    has no support for long filenames (it would be silly on these chips)
    I dont know if this fits within a 2K flash

    when implementing this on your own chip keep in mind you change which wire is the Chip select in the MMC.h file

    it is based on the DIY Life Talking MSP430 Project.

    It has been designed for the MSP430G2352 but if you remove the CCR2 References it should work for other projects easily.

    Wireing:
    P1.2 - TA0.1
    P1.3 - Input for Playing and Changing Music File
    P1.4 - TA0.2
    P1.5 - SMCLK out - SD Card Pin 5
    P1.6 - SDO - SD Card Pin 2 MOSI
    P1.7 - SDA - SD Card Pin 7 MISO
    P2.7 - CS - SD Card Pin 1 Card Select
    VCC - SD Card Pin 3,6
    Ground - SD Card Pin 4

    the pins on the SD card are counted from the first contact after the recessed contact across, the recessed one is 9. you can check on wikipedia when your unsure.
    SD Media Player.zip
  3. Like
    username reacted to RobG in Nokia 5110 display   
    Here's the code I am using to control 5110. It uses USCIB (2553) but USI (2231) can also be use without any problem or major updates.
    There is still a lot of work to be done, but basic text and some graphics can be displayed with the current version.





    main.c

    #include "msp430g2553.h" #include "PCD8544.h" #define LCD5110_SCLK_PIN BIT5 #define LCD5110_DN_PIN BIT7 #define LCD5110_SCE_PIN BIT0 #define LCD5110_DC_PIN BIT1 #define LCD5110_SELECT P1OUT &= ~LCD5110_SCE_PIN #define LCD5110_DESELECT P1OUT |= LCD5110_SCE_PIN #define LCD5110_SET_COMMAND P1OUT &= ~LCD5110_DC_PIN #define LCD5110_SET_DATA P1OUT |= LCD5110_DC_PIN #define LCD5110_COMMAND 0 #define LCD5110_DATA 1 #define SPI_MSB_FIRST UCB0CTL0 |= UCMSB // or UCA0CTL0 |= UCMSB (USCIA) or USICTL0 &= ~USILSB (USI) #define SPI_LSB_FIRST UCB0CTL0 &= ~UCMSB // or UCA0CTL0 &= ~UCMSB or USICTL0 |= USILSB (USI) void writeStringToLCD(const char *string); void writeCharToLCD(char c); void writeBlockToLCD(char *byte, unsigned char length); void writeGraphicToLCD(char *byte, unsigned char transform); void writeToLCD(unsigned char dataCommand, unsigned char data); void clearLCD(); void clearBank(unsigned char bank); void setAddr(unsigned char xAddr, unsigned char yAddr); void initLCD(); unsigned char currXAddr = 0; //TODO this will be used for tracking current addr unsigned char currYAddr = 0; //not implemented //char testBlock[8] = {0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF}; char testBlock[8] = {0x00, 0x7F, 0x7F, 0x33, 0x33, 0x03, 0x03, 0x03}; char testBlock2[8] = {0x00, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00}; void main(void) { WDTCTL = WDTPW + WDTHOLD; // disable WDT BCSCTL1 = CALBC1_1MHZ; // 1MHz clock DCOCTL = CALDCO_1MHZ; P1OUT |= LCD5110_SCE_PIN + LCD5110_DC_PIN; P1DIR |= LCD5110_SCE_PIN + LCD5110_DC_PIN; // setup USIB P1SEL |= LCD5110_SCLK_PIN + LCD5110_DN_PIN; P1SEL2 |= LCD5110_SCLK_PIN + LCD5110_DN_PIN; UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master UCB0CTL1 |= UCSSEL_2; // SMCLK UCB0BR0 |= 0x01; // 1:1 UCB0BR1 = 0; UCB0CTL1 &= ~UCSWRST; // clear SW _delay_cycles(500000); initLCD(); clearLCD(); // LCD test writeStringToLCD("Nokia 5110"); _delay_cycles(2000000); setAddr(0, 0); int c = 0x20; while(c < (65 + 0x20)) { writeCharToLCD(c); c++; } _delay_cycles(2000000); clearLCD(); c = 65 + 0x20; while(c < (96 + 0x20)) { writeCharToLCD(c); c++; } _delay_cycles(2000000); c = 0; clearBank(3); while(c < 64) { writeToLCD(LCD5110_DATA, 0xFF); c++; _delay_cycles(20000); } clearBank(4); while(c < 100) { writeToLCD(LCD5110_DATA, 0xFF); c++; _delay_cycles(20000); } clearBank(5); while(c < 184) { writeToLCD(LCD5110_DATA, 0xFF); c++; _delay_cycles(20000); } _delay_cycles(2000000); clearBank(3); writeGraphicToLCD(testBlock, NONE); writeGraphicToLCD(testBlock, FLIP_V); writeGraphicToLCD(testBlock, FLIP_H); writeGraphicToLCD(testBlock, ROTATE); writeGraphicToLCD(testBlock, FLIP_V | ROTATE); writeGraphicToLCD(testBlock, FLIP_H | ROTATE); writeGraphicToLCD(testBlock, ROTATE_90_CCW); writeGraphicToLCD(testBlock, ROTATE_180); clearBank(4); writeGraphicToLCD(testBlock2, NONE); writeGraphicToLCD(testBlock2, FLIP_H); writeGraphicToLCD(testBlock2, ROTATE); writeGraphicToLCD(testBlock2, ROTATE_90_CCW); clearBank(0); writeStringToLCD("For details,"); clearBank(1); writeStringToLCD("visit 43oh.com"); clearBank(2); } void writeStringToLCD(const char *string) { while(*string) { writeCharToLCD(*string++); } } void writeCharToLCD(char c) { unsigned char i; for(i = 0; i < 5; i++) { writeToLCD(LCD5110_DATA, font[c - 0x20][i]); } writeToLCD(LCD5110_DATA, 0); } void writeBlockToLCD(char *byte, unsigned char length) { unsigned char c = 0; while(c < length) { writeToLCD(LCD5110_DATA, *byte++); c++; } } void writeGraphicToLCD(char *byte, unsigned char transform) { int c = 0; char block[8]; if(transform & FLIP_V) { SPI_LSB_FIRST; } if(transform & ROTATE) { c = 1; while(c != 0) { (*byte & 0x01) ? (block[7] |= c) : (block[7] &= ~c); (*byte & 0x02) ? (block[6] |= c) : (block[6] &= ~c); (*byte & 0x04) ? (block[5] |= c) : (block[5] &= ~c); (*byte & 0x08) ? (block[4] |= c) : (block[4] &= ~c); (*byte & 0x10) ? (block[3] |= c) : (block[3] &= ~c); (*byte & 0x20) ? (block[2] |= c) : (block[2] &= ~c); (*byte & 0x40) ? (block[1] |= c) : (block[1] &= ~c); (*byte & 0x80) ? (block[0] |= c) : (block[0] &= ~c); *byte++; c <<= 1; } } else { while(c < 8) { block[c++] = *byte++; } } if(transform & FLIP_H) { c = 7; while(c > -1) { writeToLCD(LCD5110_DATA, block[c--]); } } else { c = 0; while(c < 8) { writeToLCD(LCD5110_DATA, block[c++]); } } SPI_MSB_FIRST; } void writeToLCD(unsigned char dataCommand, unsigned char data) { LCD5110_SELECT; if(dataCommand) { LCD5110_SET_DATA; } else { LCD5110_SET_COMMAND; } UCB0TXBUF = data; while(!(IFG2 & UCB0TXIFG)) ; LCD5110_DESELECT; } void clearLCD() { setAddr(0, 0); int c = 0; while(c < PCD8544_MAXBYTES) { writeToLCD(LCD5110_DATA, 0); c++; } setAddr(0, 0); } void clearBank(unsigned char bank) { setAddr(0, bank); int c = 0; while(c < PCD8544_HPIXELS) { writeToLCD(LCD5110_DATA, 0); c++; } setAddr(0, bank); } void setAddr(unsigned char xAddr, unsigned char yAddr) { writeToLCD(LCD5110_COMMAND, PCD8544_SETXADDR | xAddr); writeToLCD(LCD5110_COMMAND, PCD8544_SETYADDR | yAddr); } void initLCD() { writeToLCD(LCD5110_COMMAND, PCD8544_FUNCTIONSET | PCD8544_EXTENDEDINSTRUCTION); writeToLCD(LCD5110_COMMAND, PCD8544_SETVOP | 0x3F); writeToLCD(LCD5110_COMMAND, PCD8544_SETTEMP | 0x02); writeToLCD(LCD5110_COMMAND, PCD8544_SETBIAS | 0x03); writeToLCD(LCD5110_COMMAND, PCD8544_FUNCTIONSET); writeToLCD(LCD5110_COMMAND, PCD8544_DISPLAYCONTROL | PCD8544_DISPLAYNORMAL); }
    PCD8544.h
    #ifndef PCD8544_H_#define PCD8544_H_#define PCD8544_POWERDOWN 0x04#define PCD8544_ENTRYMODE 0x02#define PCD8544_EXTENDEDINSTRUCTION 0x01#define PCD8544_DISPLAYBLANK 0x0#define PCD8544_DISPLAYNORMAL 0x4#define PCD8544_DISPLAYALLON 0x1#define PCD8544_DISPLAYINVERTED 0x5// H = 0#define PCD8544_FUNCTIONSET 0x20#define PCD8544_DISPLAYCONTROL 0x08#define PCD8544_SETYADDR 0x40#define PCD8544_SETXADDR 0x80#define PCD8544_HPIXELS 84#define PCD8544_VBANKS 6#define PCD8544_MAXBYTES 504 // PCD8544_HPIXELS * PCD8544_VBANKS// H = 1#define PCD8544_SETTEMP 0x04#define PCD8544_SETBIAS 0x10#define PCD8544_SETVOP 0x80//transform#define NONE 0x00#define FLIP_H 0x01#define FLIP_V 0x02#define ROTATE 0x04 // 90 deg CW#define ROTATE_90_CW ROTATE#define ROTATE_90_CCW (FLIP_H | FLIP_V | ROTATE)#define ROTATE_180 (FLIP_H | FLIP_V)static const char font[][5] = { // basic font{0x00, 0x00, 0x00, 0x00, 0x00} // 20,{0x00, 0x00, 0x5f, 0x00, 0x00} // 21 !,{0x00, 0x07, 0x00, 0x07, 0x00} // 22 ",{0x14, 0x7f, 0x14, 0x7f, 0x14} // 23 #,{0x24, 0x2a, 0x7f, 0x2a, 0x12} // 24 $,{0x23, 0x13, 0x08, 0x64, 0x62} // 25 %,{0x36, 0x49, 0x55, 0x22, 0x50} // 26 &,{0x00, 0x05, 0x03, 0x00, 0x00} // 27 ',{0x00, 0x1c, 0x22, 0x41, 0x00} // 28 (,{0x00, 0x41, 0x22, 0x1c, 0x00} // 29 ),{0x14, 0x08, 0x3e, 0x08, 0x14} // 2a *,{0x08, 0x08, 0x3e, 0x08, 0x08} // 2b +,{0x00, 0x50, 0x30, 0x00, 0x00} // 2c ,,{0x08, 0x08, 0x08, 0x08, 0x08} // 2d -,{0x00, 0x60, 0x60, 0x00, 0x00} // 2e .,{0x20, 0x10, 0x08, 0x04, 0x02} // 2f /,{0x3e, 0x51, 0x49, 0x45, 0x3e} // 30 0,{0x00, 0x42, 0x7f, 0x40, 0x00} // 31 1,{0x42, 0x61, 0x51, 0x49, 0x46} // 32 2,{0x21, 0x41, 0x45, 0x4b, 0x31} // 33 3,{0x18, 0x14, 0x12, 0x7f, 0x10} // 34 4,{0x27, 0x45, 0x45, 0x45, 0x39} // 35 5,{0x3c, 0x4a, 0x49, 0x49, 0x30} // 36 6,{0x01, 0x71, 0x09, 0x05, 0x03} // 37 7,{0x36, 0x49, 0x49, 0x49, 0x36} // 38 8,{0x06, 0x49, 0x49, 0x29, 0x1e} // 39 9,{0x00, 0x36, 0x36, 0x00, 0x00} // 3a :,{0x00, 0x56, 0x36, 0x00, 0x00} // 3b ;,{0x08, 0x14, 0x22, 0x41, 0x00} // 3c <,{0x14, 0x14, 0x14, 0x14, 0x14} // 3d =,{0x00, 0x41, 0x22, 0x14, 0x08} // 3e >,{0x02, 0x01, 0x51, 0x09, 0x06} // 3f ?,{0x32, 0x49, 0x79, 0x41, 0x3e} // 40 @,{0x7e, 0x11, 0x11, 0x11, 0x7e} // 41 A,{0x7f, 0x49, 0x49, 0x49, 0x36} // 42 B,{0x3e, 0x41, 0x41, 0x41, 0x22} // 43 C,{0x7f, 0x41, 0x41, 0x22, 0x1c} // 44 D,{0x7f, 0x49, 0x49, 0x49, 0x41} // 45 E,{0x7f, 0x09, 0x09, 0x09, 0x01} // 46 F,{0x3e, 0x41, 0x49, 0x49, 0x7a} // 47 G,{0x7f, 0x08, 0x08, 0x08, 0x7f} // 48 H,{0x00, 0x41, 0x7f, 0x41, 0x00} // 49 I,{0x20, 0x40, 0x41, 0x3f, 0x01} // 4a J,{0x7f, 0x08, 0x14, 0x22, 0x41} // 4b K,{0x7f, 0x40, 0x40, 0x40, 0x40} // 4c L,{0x7f, 0x02, 0x0c, 0x02, 0x7f} // 4d M,{0x7f, 0x04, 0x08, 0x10, 0x7f} // 4e N,{0x3e, 0x41, 0x41, 0x41, 0x3e} // 4f O,{0x7f, 0x09, 0x09, 0x09, 0x06} // 50 P,{0x3e, 0x41, 0x51, 0x21, 0x5e} // 51 Q,{0x7f, 0x09, 0x19, 0x29, 0x46} // 52 R,{0x46, 0x49, 0x49, 0x49, 0x31} // 53 S,{0x01, 0x01, 0x7f, 0x01, 0x01} // 54 T,{0x3f, 0x40, 0x40, 0x40, 0x3f} // 55 U,{0x1f, 0x20, 0x40, 0x20, 0x1f} // 56 V,{0x3f, 0x40, 0x38, 0x40, 0x3f} // 57 W,{0x63, 0x14, 0x08, 0x14, 0x63} // 58 X,{0x07, 0x08, 0x70, 0x08, 0x07} // 59 Y,{0x61, 0x51, 0x49, 0x45, 0x43} // 5a Z,{0x00, 0x7f, 0x41, 0x41, 0x00} // 5b [,{0x02, 0x04, 0x08, 0x10, 0x20} // 5c
  4. Like
    username got a reaction from bluehash in MSP430 PC GUI Eval Tool   
    SPI Tab implemented....
     

    External link
     
    Get the GUI .exe and the main.c (for your msp430G2553) here: https://github.com/NateZimmer/MSP430-Eval-Tool
     
    I've only tested a 16 bit packet for received... I know sent works up to the programed 8byte packet.
    Worked great on my cold compensator IC... going to try it on some SPI wireless modules I bought... that should be a nice test since it requires some 8byte packets to be sent.
  5. Like
    username got a reaction from rohit in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  6. Like
    username reacted to RobG in Color LCD Booster Pack   
    Here's some basic JD-T1800 code for testing purposes...
     
    ...and a short video
     


     
    main.c

    #include #include "ST7735.h" #define JDT1800_WIDTH 128 #define JDT1800_HEIGHT 160 #define JDT1800_SCL_PIN BIT5 #define JDT1800_SDA_PIN BIT7 #define JDT1800_CS_PIN BIT2 #define JDT1800_RS_PIN BIT4 #define JDT1800_SELECT P1OUT &= ~JDT1800_CS_PIN #define JDT1800_DESELECT P1OUT |= JDT1800_CS_PIN #define JDT1800_SET_COMMAND P1OUT &= ~JDT1800_RS_PIN #define JDT1800_SET_DATA P1OUT |= JDT1800_RS_PIN #define JDT1800_COMMAND 0 #define JDT1800_DATA 1 void initLCD(); void delay(char x10ms); void write(char data, char registerSelect); void setAddr(char xStart, char yStart, char xEnd, char yEnd); void fillScreen(unsigned int color_16); void writeConfig(char command, char numberOfArgs, const char *args); void writeConfigWithDelay(char command, char x10ms); #define writeData(data) write(data, JDT1800_DATA); #define writeCommand(command) write(command, JDT1800_COMMAND); // convenience color table const int color[] = { ST7735_16_BLACK, ST7735_16_WHITE, ST7735_16_YELLOW, ST7735_16_RED, ST7735_16_MAGENTA, ST7735_16_BLUE, ST7735_16_CYAN, ST7735_16_GREEN }; void main(void) { WDTCTL = WDTPW + WDTHOLD; // disable WDT BCSCTL1 = CALBC1_16MHZ; // 16MHz clock DCOCTL = CALDCO_16MHZ; P1OUT |= JDT1800_CS_PIN + JDT1800_RS_PIN; P1DIR |= JDT1800_CS_PIN + JDT1800_RS_PIN; P1SEL |= JDT1800_SCL_PIN + JDT1800_SDA_PIN; P1SEL2 |= JDT1800_SCL_PIN + JDT1800_SDA_PIN; UCB0CTL0 |= UCCKPH + UCMSB + UCMST + UCSYNC; // 3-pin, 8-bit SPI master UCB0CTL1 |= UCSSEL_2; // SMCLK UCB0BR0 |= 0x01; // 1:1 UCB0BR1 = 0; UCB0CTL1 &= ~UCSWRST; // clear SW initLCD(); // clear screen fillScreen(ST7735_16_BLACK); // cycle through 8 colors char c = 0; while (c < 8) { _delay_cycles(1000000); fillScreen(color[c]); c++; } } void setAddr(char xStart, char yStart, char xEnd, char yEnd) { writeCommand(ST7735_CASET); writeData(0x00); writeData(xStart); writeData(0x00); writeData(xEnd); writeCommand(ST7735_RASET); writeData(0x00); writeData(yStart); writeData(0x00); writeData(yEnd); writeCommand(ST7735_RAMWR); // data to follow } void fillScreen(unsigned int color_16) { char colorHighByte = color_16 >> 8; char colorLowByte = color_16; char x = JDT1800_WIDTH; char y = JDT1800_HEIGHT; setAddr(0, 0, x - 1, y - 1); while (y-- > 0) { while (x-- > 0) { writeData(colorHighByte); writeData(colorLowByte); } } } void write(char data, char registerSelect) { registerSelect ? (JDT1800_SET_DATA) : (JDT1800_SET_COMMAND); JDT1800_SELECT; UCB0TXBUF = data; while (!(IFG2 & UCB0TXIFG)) ; JDT1800_DESELECT; } void writeConfig(char command, char numberOfArgs, const char *args) { writeCommand(command); while (numberOfArgs--) { writeData(*args++); } } void writeConfigWithDelay(char command, char x10ms) { writeCommand(command); delay(x10ms); } void delay(char x10ms) { while (x10ms > 0) { _delay_cycles(160000); x10ms--; } } // ************* // Config section // ************* const char frmctr[] = { 0x01, 0x2C, 0x2D, 0x01, 0x2C, 0x2D }; const char invctr[] = { 0x07 }; const char pwctr1[] = { 0xA2, 0x02, 0x84 }; const char pwctr2[] = { 0xC5 }; const char pwctr3[] = { 0x0A, 0x00 }; const char pwctr4[] = { 0x8A, 0x2A }; const char pwctr5[] = { 0x8A, 0xEE }; const char vmctr1[] = { 0x0E }; const char madctl[] = { 0xC8 }; const char colmod[] = { 0x05 }; // 16-bit color void initLCD() { writeConfigWithDelay(ST7735_SLPOUT, 50); // sleep out writeConfig(ST7735_FRMCTR1, 3, frmctr); // frame rate in normal mode writeConfig(ST7735_FRMCTR2, 3, frmctr); // frame rate in idle mode writeConfig(ST7735_FRMCTR3, 6, frmctr); // frame rate in partial mode writeConfig(ST7735_INVCTR, 1, invctr); // display inversion control writeConfig(ST7735_PWCTR1, 3, pwctr1); // power control settings writeConfig(ST7735_PWCTR2, 1, pwctr2); // power control settings writeConfig(ST7735_PWCTR3, 2, pwctr3); // power control settings writeConfig(ST7735_PWCTR4, 2, pwctr4); // power control settings writeConfig(ST7735_PWCTR5, 2, pwctr5); // power control settings writeConfig(ST7735_VMCTR1, 1, vmctr1); // power control settings writeConfig(ST7735_INVOFF, 0, 0); // display inversion off writeConfig(ST7735_MADCTL, 1, madctl); // memory data access control writeConfig(ST7735_COLMOD, 1, colmod); // color mode writeConfigWithDelay(ST7735_NORON, 1); // normal display on writeConfigWithDelay(ST7735_DISPON, 10); // display on }
     
    ST7735.h

    #ifndef ST7735_H_ #define ST7735_H_ #define ST7735_16_BLACK 0x0000 #define ST7735_16_BLUE 0x001F #define ST7735_16_RED 0xF800 #define ST7735_16_GREEN 0x07E0 #define ST7735_16_CYAN 0x07FF #define ST7735_16_MAGENTA 0xF81F #define ST7735_16_YELLOW 0xFFE0 #define ST7735_16_WHITE 0xFFFF #define ST7735_NOP 0x00 #define ST7735_SWRESET 0x01 #define ST7735_RDDID 0x04 #define ST7735_RDDST 0x09 #define ST7735_SLPIN 0x10 #define ST7735_SLPOUT 0x11 #define ST7735_PTLON 0x12 #define ST7735_NORON 0x13 #define ST7735_INVOFF 0x20 #define ST7735_INVON 0x21 #define ST7735_DISPOFF 0x28 #define ST7735_DISPON 0x29 #define ST7735_CASET 0x2A #define ST7735_RASET 0x2B #define ST7735_RAMWR 0x2C #define ST7735_RAMRD 0x2E #define ST7735_PTLAR 0x30 #define ST7735_COLMOD 0x3A #define ST7735_MADCTL 0x36 #define ST7735_FRMCTR1 0xB1 #define ST7735_FRMCTR2 0xB2 #define ST7735_FRMCTR3 0xB3 #define ST7735_INVCTR 0xB4 #define ST7735_DISSET5 0xB6 #define ST7735_PWCTR1 0xC0 #define ST7735_PWCTR2 0xC1 #define ST7735_PWCTR3 0xC2 #define ST7735_PWCTR4 0xC3 #define ST7735_PWCTR5 0xC4 #define ST7735_VMCTR1 0xC5 #define ST7735_RDID1 0xDA #define ST7735_RDID2 0xDB #define ST7735_RDID3 0xDC #define ST7735_RDID4 0xDD #define ST7735_GMCTRP1 0xE0 #define ST7735_GMCTRN1 0xE1 #define ST7735_PWCTR6 0xFC #endif /*ST7735_H_*/
  7. Like
    username reacted to RobG in Color LCD Booster Pack   
    While working on the software tonight, my display became unresponsive. I thought it got zapped by ESD or something so I ordered a new one. Before chucking it, I figured I will run a soldering iron through the contacts just to make sure. Well, that was it, cold solder! I hate when that happens.
     
    In any case, I made some progress.
     

  8. Like
    username reacted to oPossum in Frequency Counter using Launchpad & Nokia 5110 LCD   
    This is a simple frequency counter with a range of 1 Hz to 16 MHz. It uses the 32 kHz watch crystal so the accuracy is good enough for many applications. Gate time is automatically set to 250 ms or 1 second.
     
    There is no signal conditioning (front end), so it is limited to 3V logic levels signals only! It is intended to be used with digital circuits like another MSP430 or 74HCxx circuits. It is not a substitute for a proper commercial frequency counter.
     
    How a frequency counter works: Fundamentals of Electronic Counters by Agilent
     
    Wiring

     


     
     
    main.c

    #include "msp430g2553.h" #include "lcd.h" static const unsigned long dv[] = { // Base 10 digit weights 10000000, // 8 digit maximum count 1000000, // 100000, // 10000, // 1000, // 100, // 10, // 1, // 0 // }; static void print_freq(unsigned long n) { const unsigned long *dp = dv; unsigned x = 0; unsigned c; unsigned long d; while(n < *dp) { // Skip leading zeros if(*dp == 100000 || *dp == 100) x += 2; // Space between 3 digit groups ++dp; // lcd_pd10(10, x, 2); // Print space x += 10; // } // if(n) { // Non-zero do { // d = *dp++; // Get digit value c = 0; // while(n >= d) ++c, n -= d; // Divide if(d == 100000 || d == 100) x += 2; // Space between 3 digit groups lcd_pd10(c, x, 2); // Print digit x += 10; // } while(!(d & 1)); // Until all digits done } else // lcd_pd10(0, x - 10, 2); // Print zero } static unsigned clock_input = 0; void set_input(void) { const unsigned char z = 0; lcd_pos(0, 4); lcd_send(&z, 84, lcd_data_repeat); switch(clock_input) { default: clock_input = 0; case 0: TACTL = TASSEL_2; lcd_print("Internal 16MHz", 0, 4); break; case 1: TACTL = TASSEL_0; lcd_print("Clock In P1.0", 3, 4); break; #if 0 case 2: // This should always show 32768 TACTL = TASSEL_1; // Something is very wrong if it doesn't lcd_print("Internal 32kHz", 0, 4); break; #endif } } void set_gate(unsigned long f) { if(WDTCTL & WDTIS0) { // 250 ms gate currently in use if(f < 800000) { // Switch to 1 s gate if frequncy is below 800 kHz lcd_print("1 Second Gate", 3, 5); WDTCTL = WDTPW | WDTTMSEL | WDTSSEL; } } else { // 1 s gate currently in use if(f > 900000) { // Switch to 250 ms gate if frequency above 900 kHz lcd_print(" 250 ms Gate ", 3, 5); WDTCTL = WDTPW | WDTTMSEL | WDTSSEL | WDTIS0; } } } void main(void) { unsigned long freq = 12345678L; // Measured frequency // WDTCTL = WDTPW | WDTHOLD; // Disable watchdog reset // DCOCTL = 0; // Run at 16 MHz BCSCTL1 = CALBC1_16MHZ; // DCOCTL = CALDCO_16MHZ; // //BCSCTL3 = XCAP_1; // 6 pF (default) BCSCTL3 = XCAP_2; // 10 pF //BCSCTL3 = XCAP_3; // 12.5 pF // lcd_init(); // Initialize LCD // P1SEL |= BIT0; // Use P1.0 as TimerA input P1SEL2 &= ~BIT0; // P1DIR &= ~BIT0; // P1OUT &= ~BIT0; // Enable pull down resistor to reduce stray counts P1REN |= BIT0; // // WDTCTL = WDTPW | WDTTMSEL | WDTCNTCL | WDTSSEL | WDTIS0; // Use WDT as interval timer // Default to 250 ms gate so that initial call to set_gate() // will switch to 1 s gate and update the LCD // lcd_clear(0); // Clear LCD lcd_print("Frequency", 16, 0); // What it is lcd_print("Counter", 22, 1); // print_freq(freq); // 8 digit frequency set_input(); // Set input and show on LCD set_gate(0); // Set gate time and show on LCD // for(; { // for-ever freq = 0; // Clear frequency TACTL |= TACLR; // Clear TimerA // IFG1 &= ~WDTIFG; // Wait for WDT period to begin while(!(IFG1 & WDTIFG)); // // TACTL |= MC_2; // Start counting - TimerA continuous mode // IFG1 &= ~WDTIFG; // while(!(IFG1 & WDTIFG)) { // While WDT period.. if(TACTL & TAIFG) { // Check for TimerA overflow freq += 0x10000L; // Add 1 to msw of frequency TACTL &= ~TAIFG; // Clear overflow flag } // } // // TACTL &= ~MC_2; // Stop counting - TimerA stop mode if(TACTL & TAIFG) freq += 0x10000L; // Handle TimerA overflow that may have occured between // last check of overflow and stopping TimerA freq |= TAR; // Merge TimerA count with overflow if(WDTCTL & WDTIS0) freq <<= 2; // Multiply by 4 if using 250 ms gate print_freq(freq); // Show on LCD // set_gate(freq); // Adjust gate time if necessary // if(!(P1IN & BIT3)) { // Check if pushbutton down ++clock_input; // Switch clock input set_input(); // } // } // } lcd.h
    typedef enum { lcd_command = 0, // Array of one or more commands lcd_data = 1, // Array of one or more bytes of data lcd_data_repeat = 2 // One byte of data repeated } lcd_cmd_type; void lcd_send(const unsigned char *cmd, unsigned len, const lcd_cmd_type type); void lcd_home(void); void lcd_pos(unsigned char x, unsigned char y); void lcd_clear(unsigned char x); void lcd_init(void); void lcd_print(char *s, unsigned x, unsigned y); void lcd_pd10(unsigned n, unsigned x, unsigned y); lcd.c
    #include "msp430g2553.h" #include "lcd.h" //static const unsigned TXD = BIT1; static const unsigned RXD = BIT2; static const unsigned SWITCH = BIT3; static const unsigned LCD_CLK = BIT5; static const unsigned LCD_BACKLIGHT = BIT6; static const unsigned LCD_DATA = BIT7; static const unsigned LCD_DC = BIT0; // PORT2 static const unsigned LCD_CE = BIT1; // PORT2 void lcd_send(const unsigned char *cmd, unsigned len, const lcd_cmd_type type) { register unsigned mask; P2OUT &= ~LCD_CE; do { mask = 0x0080; do { if(*cmd & mask) { P1OUT &= ~LCD_CLK; P1OUT |= LCD_DATA; } else { P1OUT &= ~(LCD_CLK | LCD_DATA); } P1OUT |= LCD_CLK; mask >>= 1; } while(!(mask & 1)); if(!type) P2OUT &= ~LCD_DC; if(*cmd & mask) { P1OUT &= ~LCD_CLK; P1OUT |= LCD_DATA; } else { P1OUT &= ~(LCD_CLK | LCD_DATA); } P1OUT |= LCD_CLK; P2OUT |= LCD_DC; if(!(type & 2)) ++cmd; } while(--len); P2OUT |= LCD_CE; } static const unsigned char home[] = { 0x40, 0x80 }; void lcd_home(void) { lcd_send(home, sizeof(home), lcd_command); } void lcd_pos(unsigned char x, unsigned char y) { unsigned char c[2]; c[0] = 0x80 | x; c[1] = 0x40 | y; lcd_send(c, sizeof(c), lcd_command); } void lcd_clear(unsigned char x) { lcd_home(); lcd_send(&x, 504, lcd_data_repeat); lcd_home(); } void lcd_init(void) { static const unsigned char init[] = { 0x20 + 0x01, // Function set - extended instructions enabled //0x80 + 64, // Set vop (contrast) 0 - 127 0x80 + 66, // This is better for fast LCD update 0x04 + 0x02, // Temperature control 0x10 + 0x03, // Set bias system 0x20 + 0x00, // Function set - chip active, horizontal addressing, basic instructions 0x08 + 0x04 // Display control - normal mode }; P1REN = RXD | SWITCH; P1DIR = LCD_CLK | LCD_BACKLIGHT | LCD_DATA; P1OUT = LCD_CLK | RXD | SWITCH | LCD_BACKLIGHT; P2REN = 0; P2DIR = LCD_DC | LCD_CE; P2OUT = LCD_CE; __delay_cycles(20000); P2OUT |= LCD_DC; __delay_cycles(20000); lcd_send(init, sizeof(init), lcd_command); } static const unsigned char font6x8[96][5] = { 0x00, 0x00, 0x00, 0x00, 0x00, // 20 32 <space> 0x00, 0x00, 0x5F, 0x00, 0x00, // 21 33 ! 0x00, 0x07, 0x00, 0x07, 0x00, // 22 34 " 0x14, 0x7F, 0x14, 0x7F, 0x14, // 23 35 # 0x24, 0x2A, 0x7F, 0x2A, 0x12, // 24 36 $ 0x23, 0x13, 0x08, 0x64, 0x62, // 25 37 % 0x36, 0x49, 0x56, 0x20, 0x50, // 26 38 & 0x00, 0x08, 0x07, 0x03, 0x00, // 27 39 ' 0x00, 0x1C, 0x22, 0x41, 0x00, // 28 40 ( 0x00, 0x41, 0x22, 0x1C, 0x00, // 29 41 ) 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, // 2A 42 * 0x08, 0x08, 0x3E, 0x08, 0x08, // 2B 43 + 0x00, 0x40, 0x38, 0x18, 0x00, // 2C 44 , 0x08, 0x08, 0x08, 0x08, 0x08, // 2D 45 - 0x00, 0x00, 0x60, 0x60, 0x00, // 2E 46 . 0x20, 0x10, 0x08, 0x04, 0x02, // 2F 47 / 0x3E, 0x51, 0x49, 0x45, 0x3E, // 30 48 0 0x00, 0x42, 0x7F, 0x40, 0x00, // 31 49 1 0x42, 0x61, 0x51, 0x49, 0x46, // 32 50 2 0x21, 0x41, 0x49, 0x4D, 0x33, // 33 51 3 0x18, 0x14, 0x12, 0x7F, 0x10, // 34 52 4 0x27, 0x45, 0x45, 0x45, 0x39, // 35 53 5 0x3C, 0x4A, 0x49, 0x49, 0x30, // 36 54 6 0x41, 0x21, 0x11, 0x09, 0x07, // 37 55 7 0x36, 0x49, 0x49, 0x49, 0x36, // 38 56 8 0x06, 0x49, 0x49, 0x29, 0x1E, // 39 57 9 0x00, 0x00, 0x14, 0x00, 0x00, // 3A 58 : 0x00, 0x00, 0x40, 0x34, 0x00, // 3B 59 ; 0x00, 0x08, 0x14, 0x22, 0x41, // 3C 60 < 0x14, 0x14, 0x14, 0x14, 0x14, // 3D 61 = 0x00, 0x41, 0x22, 0x14, 0x08, // 3E 62 > 0x02, 0x01, 0x51, 0x09, 0x06, // 3F 63 ? 0x3E, 0x41, 0x5D, 0x59, 0x4E, // 40 64 @ 0x7C, 0x12, 0x11, 0x12, 0x7C, // 41 65 A 0x7F, 0x49, 0x49, 0x49, 0x36, // 42 66 B 0x3E, 0x41, 0x41, 0x41, 0x22, // 43 67 C 0x7F, 0x41, 0x41, 0x41, 0x3E, // 44 68 D 0x7F, 0x49, 0x49, 0x49, 0x41, // 45 69 E 0x7F, 0x09, 0x09, 0x09, 0x01, // 46 70 F 0x3E, 0x41, 0x49, 0x49, 0x7A, // 47 71 G 0x7F, 0x08, 0x08, 0x08, 0x7F, // 48 72 H 0x00, 0x41, 0x7F, 0x41, 0x00, // 49 73 I 0x20, 0x40, 0x41, 0x3F, 0x01, // 4A 74 J 0x7F, 0x08, 0x14, 0x22, 0x41, // 4B 75 K 0x7F, 0x40, 0x40, 0x40, 0x40, // 4C 76 L 0x7F, 0x02, 0x1C, 0x02, 0x7F, // 4D 77 M 0x7F, 0x04, 0x08, 0x10, 0x7F, // 4E 78 N 0x3E, 0x41, 0x41, 0x41, 0x3E, // 4F 79 O 0x7F, 0x09, 0x09, 0x09, 0x06, // 50 80 P 0x3E, 0x41, 0x51, 0x21, 0x5E, // 51 81 Q 0x7F, 0x09, 0x19, 0x29, 0x46, // 52 82 R 0x26, 0x49, 0x49, 0x49, 0x32, // 53 83 S 0x01, 0x01, 0x7F, 0x01, 0x01, // 54 84 T 0x3F, 0x40, 0x40, 0x40, 0x3F, // 55 85 U 0x1F, 0x20, 0x40, 0x20, 0x1F, // 56 86 V 0x3F, 0x40, 0x38, 0x40, 0x3F, // 57 87 W 0x63, 0x14, 0x08, 0x14, 0x63, // 58 88 X 0x03, 0x04, 0x78, 0x04, 0x03, // 59 89 Y 0x61, 0x51, 0x49, 0x45, 0x43, // 5A 90 Z 0x00, 0x7F, 0x41, 0x41, 0x41, // 5B 91 [ 0x02, 0x04, 0x08, 0x10, 0x20, // 5C 92 '\' 0x00, 0x41, 0x41, 0x41, 0x7F, // 5D 93 ] 0x04, 0x02, 0x01, 0x02, 0x04, // 5E 94 ^ 0x80, 0x80, 0x80, 0x80, 0x80, // 5F 95 _ 0x00, 0x03, 0x07, 0x08, 0x00, // 60 96 ' 0x20, 0x54, 0x54, 0x54, 0x78, // 61 97 a 0x7F, 0x28, 0x44, 0x44, 0x38, // 62 98 b 0x38, 0x44, 0x44, 0x44, 0x28, // 63 99 c 0x38, 0x44, 0x44, 0x28, 0x7F, // 64 100 d 0x38, 0x54, 0x54, 0x54, 0x18, // 65 101 e 0x00, 0x08, 0x7E, 0x09, 0x02, // 66 102 f 0x18, 0xA4, 0xA4, 0xA4, 0x7C, // 67 103 g 0x7F, 0x08, 0x04, 0x04, 0x78, // 68 104 h 0x00, 0x44, 0x7D, 0x40, 0x00, // 69 105 i 0x00, 0x20, 0x40, 0x40, 0x3D, // 6A 106 j 0x00, 0x7F, 0x10, 0x28, 0x44, // 6B 107 k 0x00, 0x41, 0x7F, 0x40, 0x00, // 6C 108 l 0x7C, 0x04, 0x78, 0x04, 0x78, // 6D 109 m 0x7C, 0x08, 0x04, 0x04, 0x78, // 6E 110 n 0x38, 0x44, 0x44, 0x44, 0x38, // 6F 111 o 0xFC, 0x18, 0x24, 0x24, 0x18, // 70 112 p 0x18, 0x24, 0x24, 0x18, 0xFC, // 71 113 q 0x7C, 0x08, 0x04, 0x04, 0x08, // 72 114 r 0x48, 0x54, 0x54, 0x54, 0x24, // 73 115 s 0x04, 0x04, 0x3F, 0x44, 0x24, // 74 116 t 0x3C, 0x40, 0x40, 0x20, 0x7C, // 75 117 u 0x1C, 0x20, 0x40, 0x20, 0x1C, // 76 118 v 0x3C, 0x40, 0x30, 0x40, 0x3C, // 77 119 w 0x44, 0x28, 0x10, 0x28, 0x44, // 78 120 x 0x4C, 0x90, 0x90, 0x90, 0x7C, // 79 121 y 0x44, 0x64, 0x54, 0x4C, 0x44, // 7A 122 z 0x00, 0x08, 0x36, 0x41, 0x00, // 7B 123 { 0x00, 0x00, 0x77, 0x00, 0x00, // 7C 124 | 0x00, 0x41, 0x36, 0x08, 0x00, // 7D 125 } 0x02, 0x01, 0x02, 0x04, 0x02, // 7E 126 ~ 0x00, 0x06, 0x09, 0x09, 0x06, // 7F 127 degrees }; void lcd_print(char *s, unsigned x, unsigned y) { lcd_pos(x, y); while(*s) { lcd_send(&font6x8[*s - 32][0], 5, lcd_data); lcd_send(&font6x8[0][0], 1, lcd_data); ++s; } } static const unsigned char num10x16[11][9 * 2] = { // Numbers for 10x16 cell 0xF0,0xF8,0x0C,0x04,0x04,0x04,0x0C,0xF8,0xF0, // 0 0x0F,0x1F,0x30,0x20,0x20,0x20,0x30,0x1F,0x0F, 0x00,0x00,0x10,0x10,0xFC,0xFC,0x00,0x00,0x00, // 1 0x00,0x00,0x20,0x20,0x3F,0x3F,0x20,0x20,0x00, 0x18,0x1C,0x04,0x04,0x04,0x04,0x8C,0xF8,0x70, // 2 0x20,0x30,0x38,0x2C,0x26,0x23,0x21,0x20,0x20, 0x18,0x1C,0x04,0x84,0x84,0x84,0xCC,0x78,0x30, // 3 0x18,0x38,0x20,0x20,0x20,0x20,0x31,0x1F,0x0E, 0x00,0x80,0x40,0x20,0x10,0x08,0xFC,0xFC,0x00, // 4 0x03,0x02,0x02,0x02,0x02,0x02,0x3F,0x3F,0x02, 0x00,0x7C,0x7C,0x44,0x44,0x44,0xC4,0x84,0x04, // 5 0x18,0x38,0x20,0x20,0x20,0x20,0x30,0x1F,0x0F, 0xE0,0xF0,0x58,0x4C,0x44,0x44,0xC4,0x84,0x00, // 6 0x0F,0x1F,0x30,0x20,0x20,0x20,0x30,0x1F,0x0F, 0x04,0x04,0x04,0x04,0x04,0xC4,0xF4,0x3C,0x0C, // 7 0x00,0x00,0x30,0x3C,0x0F,0x03,0x00,0x00,0x00, 0x30,0x78,0xCC,0x84,0x84,0x84,0xCC,0x78,0x30, // 8 0x0E,0x1F,0x31,0x20,0x20,0x20,0x31,0x1F,0x0E, 0xF0,0xF8,0x0C,0x04,0x04,0x04,0x0C,0xF8,0xF0, // 9 0x00,0x21,0x23,0x22,0x22,0x32,0x1A,0x0F,0x07, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // <space> 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; void lcd_pd10(unsigned n, unsigned x, unsigned y) // Print 10x16 digit { unsigned char c[2]; c[0] = 0x80 | x; c[1] = 0x40 + y; lcd_send(c, 2, lcd_command); lcd_send(num10x16[n], 9, lcd_data); c[1] = 0x41 + y; lcd_send(c, 2, lcd_command); lcd_send(num10x16[n] + 9, 9, lcd_data); }
  9. Like
    username got a reaction from losgann in MSP430 PC GUI Eval Tool   
    Rev 0.4 Released with digital input tab implemented.
     
    Windows .exe download here: http://www.mediafire.com/?lmgc9g6k7dhs68d
     
    Source code now at https://github.com/NateZimmer/MSP430-Eval-Tool
     

     
     
     
    Yup, your correct. Infact, i'd highly recommend using an FTDI breakout board as opposed to any launchpad(TI usb-> serial drivers are terrible). For plug and play sake, I said use rev 1.5 launchpad...
     
    Regarding the compiler, sorry, I added that to the documentation now. I used CCS5(free edition) for compiling the msp430g2553.c code.
     
    Unless i'm mistaken, a user must log in for them to be able to see the code. Hence I try to avoid using the attachments on this site so anyone can view it. My code is now on github and should be there for awhile https://github.com/NateZimmer/MSP430-Eval-Tool
  10. Like
    username got a reaction from larsie in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  11. Like
    username got a reaction from larsie in MSP430 + PC For AR Drone Control   
    Hey all,
     
    My latest project features a G2553 in combination with a FTDI breakout board and a C++ GUI App written on the PC. Using these i'm able to control a AR drone sending Ethernet UDP commands from my PC. My next goal is to do all this at the embedded level and eliminate the need for the computer. Nevertheless, it was some great practice writing GUIs.
     
    Youtube Demo:
     


     
    Drone App Pic
     

     
    Will try to post alittle more info later if anyone has any interest.
     
    Thanks for looking!
    Nate
  12. Like
    username got a reaction from Arch_ETS in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  13. Like
    username got a reaction from losgann in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  14. Like
    username got a reaction from Faraday in Adding Ethernet (Suggestions wanted)   
    ENC28J60 is only 4usd.
     
    They got a stack and schematic for it here http://www.tuxgraphics.org/electronics/ ... 6111.shtml for the AVR... Its SPI based so you could work on porting it to the msp430.
  15. Like
    username got a reaction from MarkoeZ in MSP430 + PC For AR Drone Control   
    Hey all,
     
    My latest project features a G2553 in combination with a FTDI breakout board and a C++ GUI App written on the PC. Using these i'm able to control a AR drone sending Ethernet UDP commands from my PC. My next goal is to do all this at the embedded level and eliminate the need for the computer. Nevertheless, it was some great practice writing GUIs.
     
    Youtube Demo:
     


     
    Drone App Pic
     

     
    Will try to post alittle more info later if anyone has any interest.
     
    Thanks for looking!
    Nate
  16. Like
    username got a reaction from Hitefunning in Solar water heating controller   
    Very impressive project there! I wouldn't ever be able to do a project like which requires both embedded knowledge and physical mechanical hardware application. Way to combine mechanical skills and embedded skills and hope it works out for ya!
     
    Thanks for sharing!
  17. Like
    username got a reaction from nuetron in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  18. Like
    username got a reaction from MarkoeZ in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  19. Like
    username got a reaction from dacoffey in MSP430 PC GUI Eval Tool   
    Hey all,
     
    I was working on a GUI that would be able to control any and all functions on a particular MSP430 processor from a PC GUI. Only limitations a course would be P1.1 and P1.2 which are required for GUI communication. This is very very very much so a work in progress. Currently i'm writing it using WX Widgets libraries to simplify the GUI aspect of it. However, currently i'm not using a "form builder" so it is going to take a handy amount of time to write. Good c++ experience though....
     
    This GUI would be very handy to have from a hardware/software test debug standpoint. For example, say I wanted to test out some SPI sensor I purchased, I could use a GUI such as this to send custom SPI packets to the device i'm testing and read/observe results live. That as opposed to having to write a micro.c file to do the communication and re write it every time something doesn't work.
     
    Many thanks to rick and suggaraddict for assistance on c++ coding help
     
    GUI Download Rev 0.5 : https://github.com/NateZimmer/MSP430-Ev ... I_EVAL.exe (windows.exe, click "view raw" to download)
    (feedback on whether or not it works for you would be great. Gaurenteed to work with a FTDI RS232 -> USB. However, launchpad drivers suppperr flakey and crapey )
     
    Remember to flash https://github.com/NateZimmer/MSP430-Ev ... er/GUI.cpp to your MSP430G2553
     
    Source Code is now at https://github.com/NateZimmer/MSP430-Eval-Tool
     
    (your going to need to download and BUILD the wx libraries to get this to work)
     
    Main Connect tab: Implemented
     

     
    Digital Output tab: Implemented
     

     
    Digital Input tab: Implemented
     

     
    SPI Tab: Implemented but not fully tested
     

     
    Analog Input tab: In Progress
     
    Connection Issue Debug
    1. Make sure you got a Rev1.5 launchpad with a G2553 micro flashed with the proper code provided. Also, makesure your jumpers are set to hardware uart.
     
    2. If that doesn't work... sadly, the TI RS232 <-> USB sucks hardcore compared to FTDI that always works. Once a connection is established, it works fine. However, getting that first connection can be a super pain. If your having connection issues, open up a terminal program(such as putty), connect to the com port of your msp430, and press the "1" key and ONLY the 1 key. If your msp430 is working properly you should receive "PING" back. At that point, close the terminal program and open up my .exe program. At that point, it should connect fine.
  20. Like
    username reacted to DanielPHuber in Solar water heating controller   
    I wanted to try out myself how well solar energy really works. Toward
    this aim I built a solar collector system for waterheating. A small boiler with a
    heat exchanger is used for heat storage and a ordinary heating pump
    for the water circulation. Temperature is measured at the collector,
    at the entrance and outlet of the heat exchanger and inside the heat
    storage boiler. As a controller for the pump I used an MSP430
    launchpad. There were several problems I had to solve.
     
    First, temperature must be measured with a resolution of at least 1
    degree. My preferred temperature sensor would have been a Pt100. This
    sensors are accurate and linear, but not very sensitive. With a 8 bit
    AD converter, a resolution of not more than 4 degree is possible, not
    good enough. Therefore I was forced to use NTC sensors. These are more
    sensitive, but not very accurate and the resistance changes with
    temperature not linearly, but exponentially. When I tried this out, I
    had to realize that the exponential function of C uses too much
    memory. Therefore, I had to find a replacement and I used a rational
    approximation that uses much less space and works satisfactorily
    accurate. Further, as the NTC sensors are not accurate enough, I had to measure
    the value of each and correct by software.
     
    To supervise the working of the controller I transmit the temperature
    values, the state of the pump and what action is taken to a PC that
    can be connected to the launchpad. This is actually not needed for the
    working of the controller, but it is nice to have a mean to see what
    is going on.
     
     
    Here is how the program works:
     
    After initialization we enter an infinite loop, that does the actual
    work.
     
    - First all 4 temperature values are measured. According to these values
    we decide what to do.
    - If the boiler temp is too high, we switch the pump of for security
    reasons.
    - If the pump is off and the collector temp is higher than the boiler
    temp by some margin and the collector temp is above some minimal
    value, we switch the pump on.
    - If the pump is on, we compare the entry and outlet temp of the heat
    exchanger. If these differ less than some value, that is, practically
    no heat is put into the boiler, we switch the pump off.
    - Finally we toggle a LED every 1 sec to indicate that the controller is
    working and wait 1 minute before we start the next cycle.
     
    To make the temperature measurement more reliable, I measure the temp
    8 times and take the average.
    To minimize current consumption I put the CPU to sleep during wait.
     
    This controller now works for more than half an year to my full
    satisfaction. I get approx. 0.75 kW / m^2 heating power on a sunny day. I only regret, that we do not have more sunny days
    here in Switzerland.
     






     
     
    And here is the program that uses up nearly every bit of the 2K memory:
    =======================================================

    /* Solar collector controller * Daniel Huber 1.7.2011 daniel_huber@sunrise.ch * * Measures Pin 1.3,1.4,1.5,1.7 with average * Calculates temperatures from measured values * If boiler temp too high -> do nothing * If collector temp > boiler+ TDelCol switch on pump, wait 1 min. * If temp of heatexchanger input < heat exchanger output+TDelEx switch off pump, repeat * send values to RS232 */ #include "msp430g2231.h" #include "stdbool.h" #include "stdlib.h" #include "math.h" #include "string.h" #define Tcm 110 // max temp at collector #define Tcmin 30 // min temp at collector #define Tbm 90 // max temp at boiler #define TDelCol 5 // min. temp between Collector and Boiler #define TDelEx 2 // min. temp between heat exchanger in and out #define TXD BIT1 // TXD on P1.1 #define Bit_time 104 // 9600 Baud, SMCLK=1MHz (1MHz/ 9600)=104 #define LEDR BIT0 // LED red #define LEDG BIT6 // LED green #define CHCOLLECT INCH_4 // measure channel collector #define CHHEATEXIN INCH_5 // measure channel heat exchanger #define CHHEATEXOUT INCH_3 // measure channel heat exchanger #define CHBOILER INCH_7 // measure channel boiler // pump on/off #define PumpOn {P1OUT |= BIT0;PumpOnFl=true; } #define PumpOff {P1OUT &= ~BIT0;PumpOnFl=false; } unsigned char BitCnt; // Bit count, used when transmitting byte unsigned int TXByte; // value sent over UART when Transmit() is called int i,j; // 'for' loop variable int TCol,TExIn,TExOut,TBoiler,channel; // Measured ADC Value bool PumpOnFl; // pump on flag unsigned int ADCValue; // aux. value to return value from interrupt short state; // state variable char msg[3]; float cor,R; // Function Definitions void Transmit(); //transmits a byte int Single_Measure(); //measures with avarage void Single_Measure0(); //measure single value void TransmitRecord(/*int TCol,int TExIn,int TExOut,int TBoiler,bool PumpOnFl*/); // transmit one record void delay1(); //delays 1 sec int P2T(int P); // ADC value to degree void main(void) { WDTCTL = WDTPW + WDTHOLD+WDTCNTCL; // Stop WDT: PWD,Hold, Counter Reset BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // SMCLK = DCO = 1MHz // BCSCTL3 |= LFXT1S1; // sets LFXT1Sx to 0b10, VLO mode, bit not set-> 32KHz BCSCTL3 |= XCAP_2; // set 10pF for cristal oscillator P1SEL |= TXD; // Connect TXD to timer pin P1DIR |= TXD | LEDR | LEDG; // use TX PumpOff; // Pump off state=1; __bis_SR_register(GIE); // interrupts enabled while(1){ msg[0]='\0'; // empty string cor=1.01*10.12;channel=CHCOLLECT; //correction factor: TCol=P2T(Single_Measure()); // collector temp cor=1*10.32;channel=CHHEATEXIN; TExIn=P2T(Single_Measure()); // heat exchanger in temp cor=0.89*10.21;channel=CHHEATEXOUT; // 0.937 takes care of R20 difference TExOut=3+P2T(Single_Measure()); // heat exchanger out temp, correct for NTC tolerance cor=1*10.32;channel=CHBOILER; TBoiler=P2T(Single_Measure());// boiler temp if (TBoiler > Tbm && state!=0) {PumpOff;state=0;strcat(msg,"st00");} switch(state){ case(0): if(TBoiler case(1): if((TCol>TBoiler+TDelCol) && TCol>=Tcmin) {PumpOn; state=2;strcat(msg,"12");} break; case(2): if(TExIn } TransmitRecord(); for(i=1;i<60;i++){ P1OUT ^= LEDG; // toggle LED at P1.6 delay1(); } } } // transmit one record void TransmitRecord(){ unsigned int k; i=0; while(i>=0){ switch(i){ case(0): k='SS'; break; case(1): k='tt'; break; case(2): k=TCol; break; case(3): k=TExIn; break; case(4): k=TExOut; break; case(5): k=TBoiler; break; case(6): if(PumpOnFl)k=1; else k=0; break; case(7): if (strlen(msg)>0){k=256*msg[1]+msg[0]; break;} else {i++;} case(8): k='EE'; break; case(9): {k='nn'; i=-2;} }; TXByte = (k & 0x00FF); // Set TXByte Transmit(); // Send TXByte = k >> 8; // Set TXByte to the upper 8 bits TXByte = TXByte & 0x00FF; Transmit(); i++; } } // averaged single measurement int Single_Measure(/*int channel*/){ int ADCAvg = 0; for (i = 0; i < 8; i++){ // add up values Single_Measure0(channel); ADCAvg += ADCValue; } ADCAvg >>= 3; // divide by 8 return ADCAvg; } /** * Reads ADC channel once, using AVCC as reference. **/ void Single_Measure0(/*int channel*/) { ADC10CTL0 &= ~ENC; // Disable ADC ADC10CTL0 = ADC10SHT_3 + ADC10ON + ADC10IE; // 64 clock ticks, ADC On, enable ADC interrupt ADC10CTL1 = ADC10SSEL_3 +channel; // Set 'chan', SMCLK __delay_cycles(1000); ADC10CTL0 |= ENC + ADC10SC; // Enable and start conversion _BIS_SR(CPUOFF + GIE); // sleep CPU } /** * Transmits the value currently in TXByte. The function waits till it is * finished transmiting before it returns. **/ void Transmit() { TXByte |= 0x100; // Add stop bit to TXByte (which is logical 1) TXByte = TXByte << 1; // Add start bit (which is logical 0) BitCnt = 0xA; // Load Bit counter, 8 bits + ST/SP CCTL0 = OUT; // TXD Idle as Mark TACTL = TASSEL_2 + MC_2; // SMCLK, continuous mode CCR0 = TAR; // Initialize compare register CCR0 += Bit_time; // Set time till first bit CCTL0 = CCIS0 + OUTMOD0 + CCIE; // Set signal, intial value, enable interrupts while ( CCTL0 & CCIE ); // Wait for previous TX completion } /** * ADC interrupt routine. Pulls CPU out of sleep mode. **/ #pragma vector=ADC10_VECTOR __interrupt void ADC10_ISR (void) { ADCValue = ADC10MEM; // Saves measured value. __bic_SR_register_on_exit(CPUOFF); // Enable CPU so the main while loop continues } /** * Timer interrupt routine. This handles transmitting and receiving bytes. **/ #pragma vector=TIMERA0_VECTOR __interrupt void Timer_A (void) { CCR0 += Bit_time; // Add Offset to CCR0 if ( BitCnt == 0) // If all bits TXed { TACTL = TASSEL_2; // SMCLK, timer off (for power consumption) CCTL0 &= ~ CCIE ; // Disable interrupt } else { CCTL0 |= OUTMOD2; // Set TX bit to 0 if (TXByte & 0x01) CCTL0 &= ~ OUTMOD2; // If it should be 1, set it to 1 TXByte = TXByte >> 1; BitCnt --; } } /** * function to get temperature from measured ADC value **/ int P2T(int P){ #define P0 0x3FF R=cor*P/(P0-P); return( (159.444F+R*(29.4008F-0.21077F * R))/(1+R*(0.59504F+0.0155797F * R)) ); } //put CPU to sleep for 1 sec void delay1(){ IE1 |= WDTIE; // Watchdog Interrupt Enable WDTCTL = WDTPW+WDTTMSEL+WDTSSEL; // Passwd(WDTPW), Counter-Mode //Intervall(WDTTMSEL),Timer= "0"(WDTCNTCL), //SourceClk=ACLCK(WDTSSEL),Sel:00=Clk/32768 01=Clk/8192 10:Clk/512 11=Clk/64 _BIS_SR(LPM3_bits + GIE); // put CPU to sleep LPM1_bits } // delay interrupt routine, wakes up CPU #pragma vector=WDT_VECTOR __interrupt void WATCHDOG_ISR (void){ // interrupt routine for delay WDTCTL = WDTPW + WDTHOLD+WDTCNTCL; //Password(WDTPW), //Watchdog stop(WDTHOLD),Counter=0, this resets register(exeption: hold bit) // IE1 &= ~WDTIE; // Watchdog Interrupt Disable __bic_SR_register_on_exit(LPM3_bits); // clear LPM3 bits so the main while loop continues }
    ========================================================
  21. Like
    username got a reaction from dacoffey in MSP430 + PC For AR Drone Control   
    Hey all,
     
    My latest project features a G2553 in combination with a FTDI breakout board and a C++ GUI App written on the PC. Using these i'm able to control a AR drone sending Ethernet UDP commands from my PC. My next goal is to do all this at the embedded level and eliminate the need for the computer. Nevertheless, it was some great practice writing GUIs.
     
    Youtube Demo:
     


     
    Drone App Pic
     

     
    Will try to post alittle more info later if anyone has any interest.
     
    Thanks for looking!
    Nate
  22. Like
    username got a reaction from bluehash in MSP430 + PC For AR Drone Control   
    Hey all,
     
    My latest project features a G2553 in combination with a FTDI breakout board and a C++ GUI App written on the PC. Using these i'm able to control a AR drone sending Ethernet UDP commands from my PC. My next goal is to do all this at the embedded level and eliminate the need for the computer. Nevertheless, it was some great practice writing GUIs.
     
    Youtube Demo:
     


     
    Drone App Pic
     

     
    Will try to post alittle more info later if anyone has any interest.
     
    Thanks for looking!
    Nate
  23. Like
    username reacted to wagnerlip in MSP430 Reflow Oven   
    Hello friends, I built a garage-made* SMT reflow oven in 2003, used a simple glass NTC as temperature sensor.
     
    (*) we don't do those things inside "home", it is really made in the only place wife allow us to work on it, the garage, isn't it?
     
    [Forum doesn't allow me to post external URLs, it thinks it is spam, since I am a new user... remove the extra spaces below] :eh:
    http://www.ustr.net/smt/oven.htm
     
    As a sensor, I used a common glass NTC to a small piece of a regular Printed Circuit Board, so it simulates exactly what the real boards are receiving of temperature.
     
    You can not use soldered things inside the oven, solder will melt. So I tied to tiny pcb to the oven's grill using rigid wire, and just twisted the high temperature (green) wire to the NTC leads.
     
    The glass NTC cost around one dollar. The NTC datasheet says it works up to 150
  24. Like
    username got a reaction from gatImmusepete in Rules of a Creator's Life   
    I like "Love what you do, or leave."
     
    Gets old hearing about how much people hate their job.
  25. Like
    username got a reaction from arsviator in MSP430 Reflow Oven   
    Hey all,

    Nate here, made a nice little reflow oven to help me in the construction of surface mount boards. Got a video explaining it all here:

    PCBs and Control Boards for sale here: viewtopic.php?f=22&t=2040
    No longer for sale, no time to pump any out.
     

    Project Video:





    Project Pics:







    Schematic:This is my old V1 schematic. Todo if you want a better board:
    -Use a MSP430G2553 MCU (more pins and flash)
    -Use a non EOL thermocouple driver IC: MAX31855KASA+
    -Add in a FT230XS for a USB interface
    -Add flyback protection to relay LSD if a mechanical relay is used.
     
    Full size at link:
    http://forum.43oh.com/uploads/monthly_12_2011/post-4818-135135531417.jpg
     



    Oven: Convection (30 usd)
    http://www.walmart.com/ip/Black-Decker-Toaster-Oven-Stainless-Steel/16913546
     
    Oven: IR (recommended that you use an IR oven of sorts)
    http://www.walmart.com/ip/George-Foreman-Infrared-Countertop-Oven-with-Rotisserie/19411514
     
     
    C# GUI for live plotting:

     

    Here is the BOM:

    Update: Schematic has most Part #s on it
     
    Thermal-couple: (Important that it is low thermal mass and rated for temp range)
    Digikey: 290-1911-ND
     
    Thermal-couple IC:
    MAX31855KASA+
    MAX31855KASA+T
     
    Relay: (this is a mechanical relay. I salvaged a SSR for my V2. I highly recommend you use an SSR for long life and quicker switching times)
    Digikey: T9AS1D22-5-ND (Relay)

    Misc Digikey Part # (Part Discription)
    MC78M05CDTGOS-ND (5V regulator Dpak)
    445-1590-1-ND ( CAP CER 1.0UF 25V Y5V 0805)
    754-1133-1-ND ( LED 2X1.2MM 630NM RD WTR CLR SMD)
    754-1127-1-ND (LED 2X1.2MM 570NM GN WTR CLR SMD)
    CP-102B-ND (CONN POWER JACK 2.5MM PCB CIRC)
    785-1112-1-ND (MOSFET N-CH 20V 25A TO-252 (Relay))
    IRLML6344TRPBFCT-ND ( MOSFET N-CH 30V 5A SOT23 (SSR Load))
    RMCF0805JT100KCT-ND ( RES 100K OHM 1/8W 5% 0805 SMD)
    RMCF0805JT47K0CT-ND ( RES 47K OHM 1/8W 5% 0805 SMD)
    RMCF0805FT499RCT-ND ( RES 499 OHM 1/8W 1% 0805 SMD)
    296-8247-5-ND (IC 8-BIT SHIFT REGISTER 14-SOIC)
    296-28430-1-ND (IC MCU 16BIT 20TSSOP)
    RMCF0805JT1K00CT-ND ( RES 1K OHM 1/8W 5% 0805 SMD)
    CT94EY104-ND (TRIMMER 100K OHM 0.5W TH)
    MCP1700T3302ETTCT-ND ( IC REG LDO 3.3V 250MA SOT23-3)

    + a 16x2 LCD display
    + some dip headers that are used for jumping and programing.
    + 5mm/.2in lead spacing terminal headers for relay and thermocouple input.
×
×
  • Create New...