Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by ddr

  1. I recently upgraded to 7.2 from 6.95. I needed to support several new PIC controllers and had to upgrade. After I upgraded none of new projects will link including my old 6.95 projects. I never had a problem linking with 6.95. It appears that the linker does not like spaces in files names. I suspect its a simple fix. Enclosed below is the link log. Notice there are no double quotes around the Debug\16F1825 IO v1.obj parameter Can anyone help me to resolve this problem? Thanks. Building... "C:\Program Files\SourceBoost\boostlink_picmicro.exe" -idx 1 /ld "C:\Program Files\SourceBoost\lib" libc.pic16x.lib Debug\16F1825 IO v1.obj Debug\Power Meter v1.obj /t PIC16F1825 /d "Debug" /p "Power Meter v1" Error: Failed to open:16F1825. Error: Failed to open:IO. Error: Failed to open:v1.obj Error: Failed to open:Power. Error: Failed to open:Meter. Error: Failed to open:v1.obj BoostLink Optimizing Linker Version 7.20 http://www.sourceboost.com Copyright© 2004-2013 Pavel Baranov Copyright© 2004-2013 David Hobday failure error: failed Failed to locate output file 'Debug\Power Meter v1.hex' Done Failed
  2. If you (or anyone) figures this out let me know MLAB has the programming features available within the MLAB GUI. However, MLAB may simply have a version of the PICKit programming applicaiton embedded in it.
  3. It was the 2nd config word which was not defined. Sloppy coding!! After defining both config words it worked like a charm. Interesting that it worked with the previous version of Pickit - the strict check must also alter the way it programmes the device as compared to the older version of PicKit software. Thanks for your assistance.
  4. Anyone having problems programming with latest software version of PICkit 2 (v2.55.01). I have been using PicKit v2.40 with BoostC 6.90 to program PIC 16 and 18 devices without problem. I recently upgraded to v2.55.01 and programming fails. I get the following warning in the PICKit 2 application when programming a PIC 16 device (16F88): Warning: Some configuration words not in hex file. Ensure default values above right are acceptable. Any thoughts or ideas?
  5. I suspected this had something to do with BoostC. Thanks to all for their input & assistance!!
  6. Disabling LVP has no affect. I'm using PICKit2 to program with ICSP as per PICKit 2 documentation. I'll check out the PICKit forum to see if others have had similar problems with programming devices. I tool a look at the asm from pic18 and from pic16 generated code and I noticed that the code is quite different for both devices. I'm no asm guru (this is why I'm using C). I recall seeing something about legacy mode and I found a config parameter (XINST) for legacy mode. When I disabled extended instruction set, it works perfectly!! Do you know why this should make a difference? Thanks.
  7. Sorry I don't know how to add to your source code or how to check it via simulator. Code enclosed below. Hardware config was my first thought. The 18F2620 uses EUSART instead of AUSART but I was told (from Micorchip forum) its bascially the same. The difference is 16 bit baud generator and autobaud (both disabled in my configuration - see below). I will also post init code on Microchip Forum to verify. Thanks!! #pragma CLOCK_FREQ 20000000 // 20 Mhz #pragma DATA _CONFIG1H, _OSC_HS_1H & _IESO_OFF_1H & _FCMEN_OFF_1H #pragma DATA _CONFIG2L, _BOREN_OFF_2L #pragma DATA _CONFIG2H, _WDT_OFF_2H #pragma DATA _CONFIG3H, _MCLRE_OFF_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H void setupUart( void ) { trisc.7 = 1; // Input - Rx trisc.6 = 1; // Ouput - Tx (Mandated by Datasheet) pie1.TXIE = 0; // Disable RS232 TX Int pie1.RCIE = 0; // Disable RS232 RD Int rcsta.SPEN = 1; // set serial port enable rcsta.CREN = 1; // set continuous receive enable rcsta.RX9 = 0; // 8 Bit transmission rcsta.ADDEN = 0; // Disable Addres Detection // Disable Autobaud baudcon.WUE = 0; // Don't monitor RX pin(Autobaud or wakeup) baudcon.ABDEN = 0; // Disable Autobaud // Set Baud baudcon.BRG16 = 0; // Set to 8bit baud rate generator txsta.BRGH = 1; // set high baud rate speed spbrgh = 0; // for 20 MHz and 19200 Kbps (0.16% error) spbrg = 64; // for 20 MHz and 19200 Kbps (0.16% error) // txsta.SENDB = 0; // Don't send break character (transmission complete) txsta.TXEN = 1; // set transmit enable txsta.TX9 = 0; // 8 Bit transmission txsta.SYNC = 0; // set async }
  8. Thank you for pointing that out. Typo in post. No typo in code. I don't think the linker would like that Its supposed to be sendString and sendChar. Sorry bout the confusion. Any help or suggestions would be greatly appreciated.
  9. Thanks. Funny thing is that sendChar in a loop works fine. For example: for (i=0; i<5; i++) putChar ('A'); // Works fine every time!! where as printString does not work printString ("AAAAA"); // Does not work I thought of timing so I put a delay (200 ms) in the while loop within printString and it does not work. i.e. void sendString(const char* text) { char i = 0; while(text != 0) { sendChar(text[i++]); // Does not work delay_ms (200); } } Next, I tried Windmill (thnks for tip) and it receives more characters than expected during sendString. This really seems like a pointer problem or a C compiler problem. The routine works fine (I've debugged it and it also runs on PIC16F). Your point about timing make sense (PIC16 vs PIC18) but in light of above... The only other thing to try is a different compiler or interrupts with txbuffer. Any suggestions?
  10. Help. I am lost and at end of my rope. I'm trying to print stings from 18F2620 using library SUART function thats on the l i k a . b e web site (link found on sourceboost.com). I've been using the same code sucessfully with PIC16 (16f88, 16f777, etc) without any problems!!!! I am NOW trying to get the routines to work on 18F2620 and it won't work. I can send a character ok, I can receive a character ok (i.e. serial link is alive and well). However when I try to print a string I get gibberish (like baud rate is incorrect - but its not since I can send/receive characters). Is this poor C coding, SourceBoost bug or quirk with HyperTerm? I tried changing baud rates, terminal emulation, and nothing seems to work I'm using SourceBoost IDE and SourceboostC v 6.60. Programmer is PICKit2 v 2.10 on Windows 2000. Here are the functions: void sendChar(char value) { while((txsta & 1 << TRMT) == 0); txreg = value; } void sendString(const char* text) { char i = 0; while(text != 0) sendChar(text[i++]); } NOTE: sendChar ('A') ; // works ok!!! sendString ("AAAA"); // Fails Any help would be greatly appreciated. Thanks.
  11. Thanks guys. I'm not interested in using the simulator just the boostc compiler. The sample is based on How do I code Maybe I'm missing something. Please explain. Here is the code I'm running: #include <boostc.h> #include <system.h> #define ON 0x0 #define OFF 0x1 char flag; void blink ( unsigned char dly, char off ) { clear_bit (latb, RB7); delay_ms (dly); set_bit (latb, RB7); delay_ms (dly); if (off) clear_bit (latb, RB7); } void interrupt ( void ) { if ( intcon3&INT1IE && intcon3&INT1IF ) { set_bit (latb, RB7); clear_bit (intcon3, INT1IF); flag = 0x1; set_bit (intcon3, INT2IE); // Enable Int } if ( intcon3&INT2IE && intcon3&INT2IF ) { clear_bit (latb, RB7); clear_bit (intcon3, INT2IF); flag = 0x1; } } void main () { clear_bit (trisb, RB7); clear_bit (latb, RB7); set_bit (trisb, RB1); set_bit (trisb, RB2); clear_bit (latb, RB1); clear_bit (latb, RB2); set_bit (intcon2, INTEDG1); // Enable rising edge Int set_bit (intcon2, INTEDG2); // Enable rising edge Int set_bit (intcon3, INT2IE); // Enable Int set_bit (intcon3, INT1IE); // Enable Int clear_bit (intcon3, INT1IF); // Clear Int Flags clear_bit (intcon3, INT2IF); // Clear Int Flags clear_bit (intcon3, INT2IP); // Disable Priority Int clear_bit (intcon3, INT1IP); // Disable Priority Int blink (250, OFF); blink (250, OFF); flag = 0x1; clear_bit (rcon, IPEN); // Disable Global Priority Int clear_bit (intcon, PEIE); // Disable Peripheral Int set_bit (intcon, GIE); // Enbable Global Int while (1) { if (flag) blink (250,OFF); else nop(); } }
  12. I'm trying to get interrupts to work (both HIGH/LOW priority as well as compatibility mode). I'm using sourceboost ide 5.8 with boostc toolset. Boostc appears to be the only toolset to support 18f252. I'm folloing the 18f252 pdf from micochip. Here is what I do: define a function called "void interrupt (void)" which toggles a led. I also clear int3con,int1if and int3con,int2if in the "void interrupt (void)" isr. In main, I: - set intcon2,intedg1 - set intcon2,intedg2 - clear int3con, in2ip - clear int3con, in1ip - set int3con,int2ie - set int3con,int1ie - clear int3con,int1if - clear int3con,int1if - clear rcon,,ipen - set intcon,gie - set intcon,gieh I compile and program the PIC. Then I trigger int1 and it appears to work once. Then either the PIC goes off in never never land or a second int1 trigger does not work. Is there something I'm missing? Do I need to do something to trigger the interrupt a second time.
  • Create New...