Jump to content

pittuck

EstablishedMember
  • Posts

    53
  • Joined

  • Last visited

Posts posted by pittuck

  1. Ok,

     

    1.98k means < 1k instruction code. The hex file is in ASCII, so with each byte being represented by 2 bytes (0x3F = 3F in the files) and with instructions, line endings etc. u get a load of extra stuff which pads the file.

     

    A project i am working on uses 633 bytes according to the compiler, and the hex file is 1.83k (according to windows)

  2. do you understand the difference between debugging c source and debugging asm source?

     

    apparently not.  anyways, I did use it, and found my problem.  It should definitely be noted somewhere that this debugger doesn't support simulating the ee registers.

     

    yup i do, infact i debug simple win32 c programs using the asm output of the compiler.

     

    anyhow, if u did use mplab then why is this bug / non feature cause u problems. I just ran ur code with no problems.

     

    No disrepect to picant guys, but the mplab enviroment is much better than the sourceboost ide for debugging. You can go from SIM to ICD without having to port the project to mplab format. I only wish you could get ICD2 to work with sourceboost ide :( lol.

  3. c = (((b-a)*100)/b); // Equation 1
    
    c = (b-a);
    c = (c*100);
    c = (c/b); //Equation 2

     

    [assuming a and b are decimal]

     

    Lets take Equation 2:

     

    c (which can be negative) = (b-a) = (9 - 80) = -71 (i will do the 2s compelment at the end)

    c = (c * 100) = -71 * 100 = -7100

    c = (c / 9) = -7100 / 9 = -788.9 = 0xFCEC

     

    But with EQ 1 (b-a) will be somming like 0xFFB9 as it cannot go negative, hence there is an error (a unsigned int - unsigned int = unsigned int to the compiler)

  4. Hello,

     

    do you intend to add support for the PIC10Fxxx devices?

     

    If not, how can I program these devices? Maybe I can add support from the specification or include files...

     

    Thanks in advance,

     

    Marcos

     

     

    10F are not C compatible by nature, they have too little memory to warent a C Compiler!

     

    If u need a small C'able PIC go for a 12F.

     

    BUT, if you got the time, go for a 10F and learn ASM (even if it turns out too difficult) as it will help you loads to know it. EXP when debuging code / possible compiler problems :D.

  5. Hi,

     

    I have been playing with MPLab and my ICD2 and a 18F1320. I can't seem to get it to watch a variable...

     

    I open the watch window and choose the variable from the drop down list, i then click add symbol. Then i refresh the window and i get "Reserved Memory".

     

    I know that the variable is at 0x0000 in the memory as in the file registers window it appears with the symbol name as expected. And when i add the variable as a absolute address to the watch window that works.

     

    I think this could be because the address of te variable is not being given, in the watch window the address cell for the variable is empty.

     

    One other thing, when i hover over the variable in the code editor window, it gives me info on the wrong address, it gives the wrong address and then i assume the value for that address.

     

    Does anyone else have these problems??? Is this fixable???

     

    lol.

     

    Thanks all

     

    - Martyn

  6. The Microsoft Runtimes are kinda outdated and are not distributed with XP, they are usually installed at some point by another program using VS6 as the dev studio. I think it is standard for the library to be included in the install, perhaps somone can correct me tho...

  7. ok do this:

     

    header.h =============
    
    #ifdef DECLARE_MY_VARS
      int myglobal;
    #else
      extern int myglobal;
    #endif
    ....
    
    main.c ==============
    
    #define DECLARE_MY_VARS
    #include "header.h"
    
    void main()
    {
      myglobal = 0;
      ....
    }
    
    other.c ==============
    
    #include "header.h"
    void foo()
    {
      myglobal++;
    }

     

    From an earlier post by Dave :blink:

  8. Hello everyone,

     

    BoostC finally reaches maturity it moves from Beta to final release :(

     

    This means you now have the oppertunity to buy a license, or you can use the Lite version in its unregistered form for FREE.

     

    The final release has a number of improvements including:

    Reduction of code size on PIC18.

    Improved code optimization

    Interrupts and I/O in PIC18 simulator.

    Improved IDE speed when opening large projects.

    Programming of PIC18 Ez-controller board.

     

    We hope you enjoy the package as we have putting it together.

     

    You can find the new version here.

     

    Regards

    Dave

     

    Does the lite version have any limitations apart from the time one?

     

    I dont have the money at this point in time. Also, are there plans for the 10F series to be supported?

  9. head over to microsoft and search for the dll. its a common library using in Microsoft Visual C++, problem is u dont have it!

     

    Download it and it will work.

     

    Most people dont ahve problems as 7 time out 10 they are installed with new software, just seems u have not had any software thats needed it explicitly...

  10. Ok well i am trying to implement some PWM control on my robot/micromouse and have come across a small problem (No thanks to microchip on this one).

     

    Basically the duty of the PWM module is controlled by a 10 bit register, which is split with the high 8bits in CCPR1L and the lower 2bits in CCP1CON<6:5>

     

    I would idealy like to use the whole 10bit regsister like a psudo 16bit register, which then would allow me to use a 16bit unsigned short to control it (rather than setting the 8bit regsiter and then sorting the 2 lsb)

     

    Any ideas? I am sure its possible but cannot think of how to do it, my C books dont really apply to this sort of thing.

     

    Many thanks,

     

    - Martyn

×
×
  • Create New...