Jump to content

nyordanov

Members
  • Content Count

    10
  • Joined

  • Last visited

  1. So... This error is thrown when you compile your code with a wrong mmcu flag I was still using mspgcc4 which doesn't support 2452. When I switched to uniarch everything came back to normal. Many thanks to Gordon and Daniel Beer, the author of mspdebug.
  2. Well, after all it's by-sa, so the only effect of the license is that you should not forget to mention the author, it doesn't have the nc clause.
  3. I think the SA clause is effective only if you modify the library. It should not be a problem to use it with code licensed under other terms, but I'm not a lawyer
  4. It's the same story when I use a powered hub. The 2231 is doing just fine being the only thing changed in the test system. My launchpad is a rev. 1.4 device with a 110324807 serial number (not one of those which required a firmware update).
  5. The same error is thrown every time. I can program the 2231, though. The strange part is that it does recognize the device: Device: MSP430G2452 Code memory starts at 0xe000 But if it run prog and it fails it outputs these errors every consecutive time I run mspdebug (doesn't output them the first time after I connect the launchpad): fet: FET returned error code 4 (Could not find device (or device not supported)) fet: command C_IDENT1 failed fet: identify failed
  6. I'm trying to program one of the 2452 samples I've got but with little success. I've compiled the code with a 2252 flag in msp430-gcc and all went fine, but it's not the same story with mspdebug: $ sudo mspdebug rf2500 MSPDebug version 0.16 - debugging tool for MSP430 MCUs Copyright (C) 2009-2011 Daniel Beer This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Trying to open interface 1 on 004 rf2500: warning: can't detach kernel driver: No data available Initializing FET... FET protocol version is 30066536 Configured for Spy-Bi-Wire Set Vcc: 3000 mV fet: FET returned error code 4 (Could not find device (or device not supported)) fet: command C_IDENT1 failed fet: identify failed Trying again... Initializing FET... FET protocol version is 30066536 Configured for Spy-Bi-Wire Sending reset... Set Vcc: 3000 mV Device ID: 0x2452 Device: MSP430G2452 Code memory starts at 0xe000 Number of breakpoints: 1 Available commands: = delbreak gdb load opt reset simio alias dis help locka prog run step break erase hexout md read set sym cgraph exit isearch mw regs setbreak Available options: color gdb_loop iradix fet_block_size gdbc_xfer_size quiet Type "help " for more information. Press Ctrl+D to quit. (mspdebug) prog main.elf Erasing... Programming... Writing 1672 bytes to c000... fet: FET returned error code 7 (Could not write device memory) fet: failed to write to 0xc000 As you can see, I'm using the latest mspdebug (0.16) and as far as I can see there are people who have managed to use mspdebug for 2452. What am I missing?
  7. I ended up buying a lcd mounded on a pcb from ebay and got some code running, but the other lcd doesn't do anything, so I'll call it dead
  8. The forks are the same. Another interesting effect. If I unplug the lcd from the circuit, wait a second, plug it back and reset the launchpad, it flashes for a brief moment with a kind of a gradient (darkest on top). It does this every time.
  9. High-res photo of my setup. I've got the idea of that kind of connection from there
  10. Hi, I've got an old Nokia phone that I don't need any more and I've salvaged its LCD. The problem is that I haven't been able to find any reasonable way to deal with the LCD's pins, so I've decided to take the original header off and use the metal parts of a female break-away header as connectors. The glass is as wide as a male connector, so they fit well, but I fear that some pins may not contact the lcd that well. I've checked the connections to the LCD and they are ok, but I don't know whether I can check if my home-made connector contacts the strips over the glass. The LCD itself was working connected to the phone. For a while the LCD would flash its top half after reset, but now I've lost that too. My circuit uses 10uF capacitor on Vout. Here's the code I'm using, it's been taken from another project posted here: #include #include #define SEND_CMD 0 #define SEND_CHR 1 #define LCD_X_RES 84 #define LCD_Y_RES 48 #define COUNTDOWN 1 #define SCEPORT P1OUT #define SDINPORT P1OUT #define DCPORT P1OUT #define SCKPORT P1OUT #define RESPORT P1OUT // 0 #define RES BIT1 // 3 #define SCE BIT2 // 4 #define DC BIT3 // 5 #define SDIN BIT4 // 6 #define SCK BIT5 short second, minute, hour, day, subsec = 0; unsigned char displayString[14] = { 0x00,0x00,0x0a,0x00,0x00,0x0a,0x00,0x00,0x0a,0x00,0x00,0x0a,0x00,0x00 }; const unsigned char ofYouth[][41]={ { 0xFC,0xFF,0xFF,0x07,0x03,0x03,0x06,0x1E,0xFC,0xF0,0x80, 0x00,0x00,0x60,0x30,0x30,0x30,0x30,0xE0,0xE0,0x80,0x00, 0x70,0xF0,0xF0,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00, 0xC0,0xE0,0x20,0x30,0x30,0x70,0x60 }, { 0x7F,0xFF,0xFF,0xE0,0xC0,0xC0,0xE0,0x70,0x7F,0x3F,0x0F, 0x00,0x30,0x7C,0x6E,0xC6,0xC2,0xC2,0xE3,0xFF,0xFF,0x00, 0xE0,0xE1,0x67,0x7F,0x3C,0x1C,0x0F,0x07,0x00,0x00,0x00, 0x70,0x63,0xC3,0xC7,0xE6,0x7E,0x7C,0x18 } }; const unsigned char nums[][2][10] ={ {// 0 {0xE0,0xFC,0xFE,0x06,0x03,0x03,0x06,0xFE,0xFC,0xE0}, {0x07,0x3F,0x7F,0x70,0xE0,0xE0,0x70,0x7F,0x3F,0x07} }, {// 1 {0x00,0x00,0x00,0x04,0x06,0xFE,0xFF,0xFF,0x00,0x00}, {0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0x00,0x00} }, {// 2 {0x00,0x00,0x1C,0x0E,0x07,0x83,0x87,0xFE,0xFE,0x38}, {0x00,0x60,0xFC,0xFE,0xEF,0xE7,0xE3,0xE1,0x60,0x30} }, {// 3 {0x00,0x00,0x0E,0x0E,0xC6,0xE6,0xF6,0xBE,0x1E,0x06}, {0x00,0x60,0x70,0xF0,0xE0,0xE0,0xF1,0x7F,0x3F,0x0E} }, {// 4 {0x00,0xC0,0xE0,0x78,0x1C,0x0E,0x86,0xE2,0x10,0x00}, {0x06,0x07,0x07,0x06,0x06,0xE6,0xFF,0xFF,0x0E,0x0E} }, {// 5 {0x00,0x70,0xF8,0xFE,0xCE,0xC6,0xC6,0x86,0x86,0x00}, {0x00,0x30,0x71,0x71,0xE0,0xE0,0xF0,0x7F,0x3F,0x0E} }, {// 6 {0xC0,0xF8,0xFC,0x8E,0x86,0xC7,0xC3,0x87,0x82,0x00}, {0x0F,0x3F,0x7F,0x71,0xE0,0xE0,0x61,0x7B,0x3F,0x0E} }, {// 7 {0x00,0x00,0x0E,0x0E,0x06,0x86,0xE6,0x7E,0x1E,0x0E}, {0x00,0x00,0x00,0x38,0x7F,0xFF,0xE1,0x40,0x00,0x00} }, {// 8 {0x18,0x7E,0xE6,0xC3,0xC3,0xC3,0xE6,0xBE,0x18,0x00}, {0x18,0x7E,0x7F,0xE1,0xE1,0xE1,0xF3,0x7F,0x7F,0x1C} }, {// 9 {0xFC,0xCE,0x06,0x03,0x03,0x07,0x86,0xFE,0xFC,0xE0}, {0x41,0xE3,0xE3,0xE3,0x63,0x73,0x79,0x3F,0x1F,0x03} } }; void updateTime( void) { second = (second -1); if ( second == -1 ) { // new minute second = 59; minute = (minute - 1); if ( minute == -1) { // new hour minute = 59; hour = (hour -1); if ( hour == -1) { // new day hour = 23; day = (day -1); displayString[0] = day / 10; displayString[1] = day % 10; } displayString[3] = hour / 10; displayString[4] = hour % 10; } displayString[6] = minute / 10; displayString[7] = minute % 10; } displayString[9] = second / 10; displayString[10] = second % 10; } void LCDSend(unsigned char data, unsigned char cd) { volatile unsigned char bits; unsigned short cnt=8; // assume clk is hi // Enable display controller (active low). SCEPORT &= ~SCE; //RESET SCE // command or data if(cd == SEND_CHR) { DCPORT |= DC; //set to send data } else { // reset to send command DCPORT &= ~DC; } ///// SEND SPI ///// bits=0x80; // bits is mask to select bit to send. select bit msb first //send data while (0 { // put bit on line // cycle clock SCKPORT &= ~SCK; if ((data & bits)>0) { SDINPORT |= SDIN; } else { SDINPORT &= ~SDIN; } //Delay(1); SCKPORT |= SCK; //Delay(2); // SHIFT BIT MASK 1 right bits >>= 1; } // Disable display controller. SCEPORT |= SCE; } void LCDClear(void) { int i,j; LCDSend(0x80, SEND_CMD ); LCDSend(0x40, SEND_CMD ); for (i=0;i<6;i++) // number of rows for (j=0;j LCDSend(0x00, SEND_CHR); } void LCDString(unsigned char *character, unsigned int start, unsigned int layer, unsigned int stop) { int i; for(i=start;i<(stop+1);i++) { int j; for (j = 0; j < 10; j++) { LCDSend(nums[character[i]][layer][j], SEND_CHR); } } } void LCDInit(void) { // assume ports set up and initialized to output // Reset LCD SCEPORT &= ~SCE; // RESET SCE to enable // toggle RES // RESPORT |= RES; // Set RES char l; for(l=0;l<10;l++) l=l; RESPORT &= ~RES; // reset RES for(l=0;l<100;l++) { l=l; } RESPORT |= RES; // Set RES // Cycle Clock SCKPORT &= ~SCK; SCKPORT |= SCK; // Disable display controller. SCEPORT |= SCE; // bring high to disable for(l=0;l<100;l++) l=l; // Send sequence of command LCDSend( 0x21, SEND_CMD ); // LCD Extended Commands. LCDSend( 0xBf, SEND_CMD ); // Set LCD Vop (Contrast). LCDSend( 0x06, SEND_CMD ); // Set Temp coefficent to 2. LCDSend( 0x13, SEND_CMD ); // LCD bias mode 1:100. LCDSend( 0x20, SEND_CMD ); // LCD Standard Commands, Horizontal addressing mode. LCDSend( 0x08, SEND_CMD ); // LCD blank LCDSend( 0x0C, SEND_CMD ); // LCD in inverse mode. LCDClear(); } int main(void) { // Stop watchdog WDTCTL = WDTPW + WDTHOLD; P1DIR = 0xFF; BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; // Set DCO step + modulation BCSCTL2 = 0xF8; BCSCTL3 = LFXT1S_0 + XCAP_3; subsec=0x00; second = 0x05; minute = 0x00; hour = 0x16; day = 0x03; TACCTL0 = CCIE; TACCR0 = 0; TACCR0 = 0x3FF; TACTL = 0x0211; P1OUT |= BIT0 + BIT6; P1OUT ^= BIT0; LCDInit(); P1OUT ^= BIT6; // Silly return to make gcc happy return 0; } interrupt(TIMERA1_VECTOR) ta1_isr(void) { subsec = (subsec + 1) % 32; P1OUT ^= BIT0; if (subsec == 0) { // New second updateTime(); } } Can someone help me troubleshoot this, please?
×
×
  • Create New...