Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Badejavu

  • Rank

Profile Information

  • Gender
  1. Thanks Davidb for your time. As you suggested, I have upgraded to V7.21 and also included the -idx 2 command option for both the linker and the compiler options. It initially shows success, but comes up with numerous errors shortly after, I have pasted a few of the errors: success Executing: "C:\Program Files (x86)\SourceBoost721\SourceBoost\boostlink_picmicro.exe" "C:\Users\BAdegoke\Desktop\MXproj\Main.obj" "C:\Program Files (x86)\SourceBoost\Lib\libc.pic18.lib" "C:\Program Files (x86)\SourceBoost\Lib\float.pic18.lib" "C:\Program Files (x86)\SourceBoost\Lib\eeprom.pic18.lib" -O1 -p
  2. Hi, I use Boost C for PIC18 version 7.04 with a PIC18F67K22(128K FLASH, 4K SRAM). Question: 1. Is it possible to declare an array of integers with and index of over 256? e.g unsigned short Array[340]; 2. I used -idx 2 command in the build options, to increase the array index limit and I still get an error. Error: Array index size does not match linker '-idx' option. Expected:1 byte(s), while array index size of 2 byte(s) used in File: 'C:/Users/ Is there a way to use array index greater than 256? Thanks Bade
  3. Hi, I am using boostC with MplabX for PIC18F67K22. I have tried to : 1. Use fixed address like " int x@0x100" . This has worked for me previously in Mplab. Do I need to include any libraries to make this work in MplabX? 2. When I add an interrupt service routine as instructed in the boosC manual " void interrupt ( ) " the compiler shows error on all code lines in the isr. it does not see it as an interrupt. Is there a particular way to declare this in the MplabX environment? 3. Even when I include the "string.h" directive, the string length function "strlen(string)" is not re
  4. Thanks Pavel, I used the pragma config and it worked….although quite lengthy Regards Badejo
  5. Hi Pavel, How do I set the CONFIG bits in MplabX using boost C. Has this been sorted out now? it gives me this error: invalid pragma DATA argument '_CONFIG1L' Regards Bade
  6. Thanks..I was hoping I could address it directly using the compiler. P.S .Your second approach(?: conditional assignment) was helpful . I just learned it, hopefully it will help me shorten other "if else" statements
  7. I am trying to send a 16bit data with MSB first over serial comm. How can I get around sending the individual bits 15-0 using the boostC compiler using the sample below e.g. SIN = data.15……SIN = data.0. void play_AUDIO_COMMAND(unsigned short data) { for (unsigned char loop =15; loop>=0; loop--) { SIN = data.loop;// Compiler gives error SCLK = HIGH; delay_us(50); SCLK = LOW; } SCLK = HIGH; } Error message: Main1.CAudio.C(47:17): error: unexpected '.' operator Audio.C(47:12): error: failed to generate expression Audio.C(47:12): error: invalid operand 'data.loop' Audio.C(47
  8. Hi Jorge, Please can you explain what you did in your ceil function? I copied and pasted the piece of code but it doesn't compile Thanks Badejo
  9. Thanks Jorge …for the thorough explanation. I will try it out and update the thread shortly. 2 cents? Best regards Badejo
  10. Please any information or suggestion is welcome. Question: 1. Does boostC have any inbuilt "rounding" function? One that rounds to the nearest integer e.g. like python's "maths.ceil ( ) function" . I want to manipulate a float number say 3.4 to become 3.5. If I were to do this using the ceil ( ) function: ceil (2 * raw_decimal) / 2 where : raw_decimal = 3.4 , the function rounds 6.8 to 7 then dividing by 2 gives 3.5. I basically want to get my numbers to the nearest whole or 0.5 decimal. 2. Is there any work around in boostC if there is no inbuilt compiler
  11. I am not using a secondary clock.The PIC uses the internal oscillator. The PIC can only wake up to a portb 0 interrupt, but this is not the case.It just never goes to sleep, and there are no codes after the sleep instruction this way i can detect a current drop on the ammeter…Could it be because I am using the internal oscillator? Thanks Badejo
  12. When I call the sleep function in boost C, using mplab IDE, the PIC does not go to sleep.I have tried inline assembly as well and still the PIC does not sleep.I observed the current consumption when the sleep function is called and still no current drop. I also included the "boosts.h" and it still does not work. Has anyone used the sleep routine and it worked? Or is this problem PIC related? Thanks Badejo
  13. Hi Reynard, Any suggestions.I am new to boost C. Thanks
  • Create New...