Jump to content


  • Content Count

  • Joined

  • Last visited

Everything 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. 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. lol, perhaps you should make a to do list in the enhancements forum. If u like mplab so much then use it! lol.
  4. also using flash memory as swap space is not a good idea, say u are storing temp regulation data every second for a year: 8 reading x 60 x 60 x 24 x 365 = 252,288,000 which means u got a load of dead memory and bust hardware (user wise). Only write to flash when updating firmware, or when sending new data tables or somming which is done rarly
  5. 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)
  6. 1) BoostC Handles context saving on its own 2) There is no replacement for #pragma origin 4, its been discussed before lol 3) Not sure, there is a pragma etc. Someone else will know I use MPLab for ICD2 debuging and fuses are set in a menu.
  7. http://boostc.lika.be/ - An example / library http://www.picant.com/c2c/examples.html
  8. ok thanks, I came across that bug and updated yesterday lol Also brought the upgrade to full today, great compiler, keep up the good work.
  9. is this full 32bit support? Or just the data types which will have to use 16bit math with them? Sorry for the dum question, lol. There is a 75% chance its too early in the day for me ATM, but the questiom makes sense now!
  10. 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 .
  11. Humm, it was only a small program so perhaps the optimiser / compiler has made some changes, i will play with it some more. If not i will post the program here and see what happens.
  12. 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 cel
  13. I would assume that the extended set is the 18F command set rather than the 16F command set.
  14. 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...
  15. Hi, I want to define a constant via a macro which increments each time it is called. Is this possible??? For example #define MEM_A macro //Assigns 0x00 #define MEM_B macro //Assigns 0x01 Many thanks, - Martyn
  16. i have not checked, but will u make the last 5.x version downloadable?
  17. 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
  18. 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?
  19. 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...
  20. Any chance? I know its a totaly different architectcure, but could be an add-on?
  21. Thanks, block = folding section, i did not have the IDE handy when i was writing the post!
  22. a) Save the closed blocks.... I have to close all the blocks every time i open SB, is it possible to make this saved on exit / when u build / save Force Build option? Ctr + F7 to force a build, even if the IDE thinks nothing has changed (header changes etc.)
  23. any ideas? I could just use a function and use some bit masking to do it, but i would prefer to be able to use a variable like normal variables so i can do quick and easy math rather than read/math/write throughout the code...
  24. 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
  • Create New...