Jump to content

teunizz

EstablishedMember
  • Posts

    69
  • Joined

  • Last visited

Posts posted by teunizz

  1. After a fresh install of Windows XP, I have a problem with registering the plugins voor SB 6.86. Registering of SB and plugins (preg.exe) works OK.

     

    dvm.dll: OK (registered)

    siggen.dll: OK (registered)

    stimuli.dll: OK (registered)

    stopwatch.dll: OK (registered)

    i2ceprom.dll: OK (registered)

    lcd.dll: OK (registered)

     

    However, when I start SB IDE, I see the following messages:

     

    Ready...

    Loading plugins...

    Plugin 'Digital Volt Meter' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Plugin 'I2c EEprom' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Plugin 'LCD AlphaNumeric' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Plugin 'Signal Generator' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Plugin 'Logic Analyzer' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Plugin 'Stop Watch' needs to be registered and unlocked. Was not loaded. (For registration visit http://www.sourceboost.com)

    Ready...

     

    How do I solve this?

  2. It is flakey under wine, what does wines log tell you?

    It could simply be waiting for the correct window type, which sometimes means you need tell wine to use an older OS othertimes its a missing font etc.

     

    teuniz@linux-1g99:~/.wine/drive_c/Program Files/SourceBoost> wine preg.exe

    fixme:reg:RegSetKeySecurity :(0x7c,4,0x398e00): stub

    fixme:exec:SHELL_execute flags ignored: 0x00000400

     

    From here the mousecursor changes in a waitingcursor and nothing happens anymore, I have to kill the program.

  3. QT is very far from hassle free ...

     

    Not my experience, just code once and compile and run on Windows, Mac and Linux

    without the need to tweak the code.

     

    and the open versions of thier libraries that they release are very old (3+yrs).

     

    What are you talking about? You can download the latest release of Qt 4.2.3 at Trolltech

    website including the sourcecode. It's not older than a couple of months...

    Maybe the GPL'ed version of Qt lags behind the commercial version regarding some

    features. But if you need to keep your program closed source you need the commercial

    version anyway.

     

    Any way, I don't have the illusion that the guys from SB will try any attempts to make

    it available for other platforms as well. Even trying to make the registration process

    getting to work with Wine is too much of an effort for them...

    So talking about this is just hypothetic.

     

    Regards.

  4. Today I installed SB 6.70 on openSuSE 10.2 with Wine 0.9.35. Installation went well.

    I am able to start the IDE and to compile and link the sample/demo sourcecode.

     

    The only problem I have is to register. When I start preg.exe with Wine, I'm able to

    insert the name and the registrationkey. Then, after some time, I get the following

    message:

     

    boostc.pic16.exe: failed to register (code:259)

    boostc.pic18.exe: failed to register (code:259)

     

    What am I doing wrong here? I hope somebody can help me because SB is the only

    windowsprogram I am still using. It's crazy to reboot every time for this program!

     

    Regards.

  5. Can you advise when the Vista BoostC 32bit compiler is expected?

     

    Pls give us a Linux-version first... ;)

     

     

    *I get tired from rebooting the computer when I need to modify the software in the

    Pic's. These days I can do everything with Linux (drawing electronic schematics,

    create boardlayouts, drawing mechanics, (all the CAD-stuf), programming the

    userinterface for the pc, write the documentation, etc. The only exception are the

    Pics, this is very annoying... :(

  6. Bug description:

    A variable declared as unsigned long, can not contain values higher than 2147483647.

     

    Steps to reproduce:

     

    Compile the following code for a PIC18F4620 and run it in the debugger,

    at the same time watch the variable "var".

     

    #include <system.h>
    
    
    void main()
    {
     unsigned long var;
    
     var = 2147483648;
    
     while(1);
    }

     

    Expected behaviour:

    A variable declared as unsigned long should be able to contain values in the range

    of 0 ~ 4294967295.

     

    Is the problem 100% reproduceable:

    Yes, this problem is 100% reproducable.

     

    IDE version: SourceBoost 6.60

    Compiler: BoostC

    Compiler version: 6.60

    Target device: PIC18F4620

    OS: Windows XP

     

    Comments:

    I hope this will be patched soon instead of waiting for a newer version.

     

    Regards,

    Teuniz

  7. Bug description:

     

    Dividing a member of an array of signed long's gives wrong result.

     

    Steps to reproduce:

     

      unsigned char i;
    
     signed long array[3];
    
     i = 2;
    
     array[i] = 107643;
     array[i] /= 377;

     

    Expected behaviour:

    After running this code array[2] should have the value 285

    but instead it has the value 486646907.

     

    Is the problem 100% reproduceable:

     

    Yes, this problem happens every time.

     

    IDE version: 6.40

    Compiler: BoostC

    Compiler version: 6.40

    Target device: PIC18F4620

    OS: Windows XP

     

    Comments:

    This is a very annoying bug!

     

     

    Regards, Teuniz

     

    (edit: typing error)

  8. BoostC compiler fails with the following code:

     

    #include <system.h>
    
    union{
          unsigned short pntr;
          unsigned char  segment;
          unsigned char  index;
        } buf_out;
    
    
    void main(void)
    {
     while(++buf_out.index)
     {
       i++;
     }
    
     while(1);
    }

     

     

    Building...

    BoostC Optimizing C Compiler Version 6.35 (for PIC18 architecture)

    http://www.sourceboost.com

    Copyright© 2004-2006 Pavel Baranov

    Copyright© 2004-2006 David Hobday

     

    Licensed to XXXXX under Single user Full License for 1 node(s)

    Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited, Non commercial use only

     

     

    test_project.c

    C:\Program Files\SourceBoost\projects\test_project.c(208:8): internal error: prefix operation inside conditional expression on non variable

    C:\Program Files\SourceBoost\projects\test_project.c(208:8): error: failed to generate expression

    C:\Program Files\SourceBoost\projects\test_project.c(208:8): internal error: failed to generate 'while' expression

     

    failure

    Exit code was 1.

    Removing target: test_project.obj

    Failed to locate output file 'test_project.obj'

    Done

     

    Failed

     

    This happens with structs as well, also with pic16 architecture.

    When you change the code to:

     

    while(buf_out.index++)

     

    then the compiler succeeds.

     

     

    IDE version: current

    Compiler: BoostC Optimizing C Compiler Version 6.35 (for PIC18 architecture)

    Compiler version: Version 6.35

    Target device: PIC18F4620

    OS: Windows XP

     

     

    Regards, Teuniz

  9. Maybe this will help?

     

    From the PIC18FXXXX programming spec DS39622F page 34

     

    http://ww1.microchip.com/downloads/en/DeviceDoc/39622F.pdf

     

    5.5 Embedding Data EEPROM

     

    Information In the HEX File

     

    To allow portability of code, a PIC18F2XX0/2X21/

    2XX5/4XX0/4X21/4XX5 programmer is required to

    read the data EEPROM information from the hex file. If

    data EEPROM information is not present, a simple

    warning message should be issued. Similarly, when

    saving a hex file, all data EEPROM information must be

    included. An option to not include the data EEPROM

    information may be provided. When embedding data

    EEPROM information in the hex file, it should start at

    address F00000h.

     

    Regards, Teuniz

  10. Try this:

    unsigned char read_eeprom(unsigned char addr)
    {
     eeadr = addr;                 // low byte
     eeadrh = 0;                   // high byte
     clear_bit(eecon1,EEPGD);      // select eeprom memory
     set_bit(eecon1,RD);           // set read bit
     return(eedata);
    }
    
    void write_eeprom(unsigned char addr, unsigned char data)
    {
     eeadrh = 0;                  // high byte
     eeadr = addr;                // low byte
     eedath = 0;                  // high byte
     eedata = data;               // low byte
     clear_bit(eecon1,EEPGD);     // select eeprom data memory
     set_bit(eecon1,WREN);        // enable write
     clear_bit(intcon,GIE);       // disable interrupts
     eecon2 = 0x55;
     eecon2 = 0xaa;
     set_bit(eecon1,WR);          // write command
     set_bit(intcon,GIE);         // enable interrupts <- remove this line if u don't use interrupts
     while(eecon1&2);             // wait untill writing is ready
     clear_bit(eecon1,WREN);      // disable write
    }

  11. What order are 2 and 4 byte integers stored in a PIC16?

     

    Thanks...

    Compile the following code and run the debugger, add the variable "var"

    to the watchwindow, then you will see it's "little endian".

     

    #include <system.h>
    
    
    
    union{
         unsigned long four;
         unsigned short two[2];
         unsigned char one[4];
        }test;
    
    
    unsigned char array[]={0x11,0x22,0x33,0x44};
    
    unsigned long result;
    
    
    int main(void)
    {
     test.four = 0x44332211;
     result = test.four;
     result = test.two[0];
     result = test.one[0];
    
     result = *((unsigned long *)test.one);
     result = *((unsigned short *)test.one);
     result = *((unsigned char *)test.one);
    
     result = *((unsigned long *)array);
     result = *((unsigned short *)array);
     result = *((unsigned char *)array);
    
     while(1);
    }

     

    p.s.: I am not sure if this is always the case, maybe Dave or Pavel can acknowledge

    this? Is it safe to use a union this way in BoostC?

     

    Grtz, Teuniz

  12. Hi,

     

    I found a bug in BoostC 6.25.

     

    #include <system.h>
    
    
    unsigned char subtract(void);
    
    
    struct{
           unsigned short a;
           unsigned long b;
          } test;
    
    unsigned char result;
    
    
    void main()
    {
     test.a = 545;
     test.b = 1000944;
     result = subtract();
     while(1);
    }
    
    
    unsigned char subtract(void)
    {
     unsigned long var;
     
     var = test.b - test.a;
     
     if(var==1000399) return(1);
     else return(0);
    }

    After var = test.b - test.a var is 0 instead of 1000399!

     

    Regards, Teuniz

  13. Hi,

     

    I was wondering if arrays can have 256 elements yet, or is it still at 255? It would be nice if it was 256 so you could just use a char to loop through the array.

     

    Thanks,

    Steve.

     

    Yep:

     

    unsigned char array[256];

     

    or:

     

    unsigned char array[]={0x80,0x83,0x86,0x89,0x8c,0x8f,0x92,0x95,0x98,0x9c,0x9f,0xa2,0xa5,0xa8,0

    xab,0xae,

    0xb0,0xb3,0xb6,0xb9,0xbc,0xbf,0xc1,0xc4,0xc7,0xc9,0xcc,0xce,0xd1,0xd3,0xd5,0xd8,

    0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8,0xea,0xec,0xed,0xef,0xf0,0xf2,0xf3,0xf5,

    0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfc,0xfd,0xfe,0xfe,0xff,0xff,0xff,0xff,0xff,

    0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfe,0xfd,0xfc,0xfc,0xfb,0xfa,0xf9,0xf8,0xf7,

    0xf6,0xf5,0xf3,0xf2,0xf0,0xef,0xed,0xec,0xea,0xe8,0xe6,0xe4,0xe2,0xe0,0xde,0xdc,

    0xda,0xd8,0xd5,0xd3,0xd1,0xce,0xcc,0xc9,0xc7,0xc4,0xc1,0xbf,0xbc,0xb9,0xb6,0xb3,

    0xb0,0xae,0xab,0xa8,0xa5,0xa2,0x9f,0x9c,0x98,0x95,0x92,0x8f,0x8c,0x89,0x86,0x83,

    0x80,0x7c,0x79,0x76,0x73,0x70,0x6d,0x6a,0x67,0x63,0x60,0x5d,0x5a,0x57,0x54,0x51,

    0x4f,0x4c,0x49,0x46,0x43,0x40,0x3e,0x3b,0x38,0x36,0x33,0x31,0x2e,0x2c,0x2a,0x27,

    0x25,0x23,0x21,0x1f,0x1d,0x1b,0x19,0x17,0x15,0x13,0x12,0x10,0x0f,0x0d,0x0c,0x0a,

    0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x03,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,

    0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x02,0x03,0x03,0x04,0x05,0x06,0x07,0x08,

    0x09,0x0a,0x0c,0x0d,0x0f,0x10,0x12,0x13,0x15,0x17,0x19,0x1b,0x1d,0x1f,0x21,0x23,

    0x25,0x27,0x2a,0x2c,0x2e,0x31,0x33,0x36,0x38,0x3b,0x3e,0x40,0x43,0x46,0x49,0x4c,

    0x4f,0x51,0x54,0x57,0x5a,0x5d,0x60,0x63,0x67,0x6a,0x6d,0x70,0x73,0x76,0x79,0x7c}

    ;

×
×
  • Create New...