Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Sparky1039

  1. By the lack of any forum activity or updates from the compiler authors over a significant amount of time it appears SourceBoost products are now abandon ware. Too bad... 😡
  2. Can some one tell me what error code 133 "failure" means? I keep getting this error when trying to compile a project. It's associated to a *.h file line #133. I'm not sure what I did to break my code which compiled ok before, but after a bunch of edits I can't seem to figure out what I did to generate this error. The error "failure" seems a bit vague. Using SB 7.42 Also is there a document listing of all the error codes this compiler can generate? thanks Edit. I found the problem: I had mistakenly declared an emum element the same as a function name.
  3. // In the include file "pic18f26k22.h", "RC1REG" is defined as a constant with the value "0xfae", the address of the receive register for EUSART1. The register itself is accessed with "rc1reg". Yes, you are right about the RC1REG identifier. I had it upper case and as you pointed out it needs to be lower case. This is was an artifact of porting back and forth between SB and XC8 and hence the illusion of being a bug. I'm surprised SB didn't flag this as a warning. If anything I wish there were more consistency by compiler makers on hardware register naming conventions. Either way good catch o
  4. The problem is my UART functions are a compiled library so there isn't much to see. I have been using this library for years without issue on many different 8-bit PICs (16F and 18F). It's only with the recent use of the 26K22 have I encountered this problem. I've ported my project over to Mchip XC8 and everything is working fine so I don't have high incentive to spend much effort on debugging this problem. However when time permits I may put together a special simplified test code block example. UPDATE: test code below. // UART receive bug test code. // Target: PIC18F26K22 // Source
  5. I believe I have uncovered a compiler bug with the EUSART receive peripheral on the PIC18F26K22. Working on a larger application I found that my tried and true UART receive library functions were not working properly. However, the transmit processes do work correctly. Thinking I may have made some simple mistake I wrote a smaller test application to validate that my project code wasn't the culprit. This test code exhibited the same problems, lack of receive response. I then ported this test code over to another compiler and it worked perfectly. Analyzing the problem with Proteus VSM the Sour
  6. Sorry, I mistakenly placed my bug report in the wrong place. It has now been moved to the appropriate forum location.
  7. Thanks Jorge. After pondering the issues it became very obvious that it wasn't possible to do this kind of number crunching with a small 8-bit PIC. Exponentiation generates such enormous sized numbers that 64-bit variables are a must. Even if I could get the 8-bit PIC to deal with this math it would take equally large amounts of time to process it, completely negating the whole purpose of the exercise. Even a big lookup table would seen lightning fast in comparison. So that was the route I have taken, and by applying a binary tree search process it actually isn't so bad time wise. Cheers.
  8. I couldn't find anything in the documentation indicating that SB supports the C math library which has the POW(x,y) function. What I'm trying to do is compute this equation... y = 52080 x^-0.8754 (note X is an unsigned integer variable) It is a curve fit formula of a non-linear transform. My goal is to see how computationally intensive this is and if it's worth developing a look-up table as an alternative approach. The issue with the lookup table is the amount of memory I have available (both ROM or RAM). External RAM/EEPROM may work but the timing delay involved scanning a couple
  9. SB UART library is designed only for those PIC's that contain a UART (EUSART) hardware module. See users manual for details. It does not offer software UART capability. To create you own software UART transmit output, it's really a simple matter of applying a timer set up to generate an interrupt every 416uS indicating when to write a data bit to a port pin (+ start and stop bits too).
  10. Will there be a version log update for this release? I'm interested to know what the fixes/changes are before using. thx
  11. Thx. Didn't think so but want to check anyway. Perhaps this could be a feature added to the IDE whereby user defined typedefs could be added to the highlighter list.
  12. Is there a way to tell the IDE to highlight a user specified typedef? For example the declaration "unsigned char" will be highlighted in a different color, but if I declare typedef unsigned char uint8_t the new typedef name will be normal text color. Any way to make uint8_t get the color highlight too? thx
  13. Thanks Reynard. I went with this and it seems to work correctly and is very fast. However I may revert to the example you provided for the long term since it's more flexible for different data types. unsigned int sqrt32 (unsigned long n) { unsigned long c = 0x8000; unsigned long g = 0x8000; for(; { if(g * g > n) g ^= c; c >>= 1; if(c == 0) return g; g |= c; } }
  14. Unfortunately Boost C math library doesn't support the square root function for a data type greater than unsigned int. I'm looking for some suggestions or code examples on how to accomplish the square root of an unsigned long. Currently working on a project where the customer has requested code enhancements that calculate standard deviation of 12-bit ADC sensor readings. The averaged sum of squares value can be quite large hence the unsigned long data type. Any help would be appreciated. thx Sparky
  15. I suspected as much. I just want to be sure I wasn't missing a PP directive somewhere that allowed for this capability. In my case it's not a big deal to scale the delays appropriately (in this case 6x). With most PIC's hosting multiple clock sources nowadays I thought maybe industry compiler developers would have offered this kind of flexibility to support them. Thanks
  16. Question, does Boost C support dual clock frequencies for the final compiled code? I looked in the help file and found nothing, but wanted to ask here. My project uses two primary clock frequencies, one at 2 MHZ (INTOSC), and another at 12MHZ (external crystal). It's a ultra low power sensing device that uses the 2MHz clock for data gathering from sensors (SPI, internal ADC ect...) and periodically will switch over to 12MHz for high speed serial coms (230.4Kbaud). I use a bunch of delays in code for both clock frequencies and I wish to preserve the values as they are. But obviously if I compi
  17. Thanks Pavel. Explaining what to look for made finding the error easier to spot, which I did in less than 2 mins worth of searching.
  18. The project I'm working on started giving me a preprocessor error that I'm unfamiliar with. Could someone tell me what this error is and what I should be looking out for to clear it? "thefilename.c(1146) EOF in comment" If i click on the error it takes me to the line number where a problem is located (1146) but all I see is the closing brace for the last function. What does "EOF" stand for? Any help would be appreciated. thx
  19. The HopeRF web page for this device offers application notes that contain C code examples. Perhaps you can port over this code to C2C. Hope RF
  20. Thanks Dave, yes this helps clarify things greatly. I suspected as much that it was only a matter of including the #ifdef’s - #endif's in the code body, and I tried that but it failed to work. What I didn’t realize was the need for an underscore in front of the target device name. Once added it worked like a champ.
  21. Simple question. I do I go about performing a conditional compile to code within “void main ()” ? For code development I’m switching between two processors, one real hardware, other in Proteus simulation i.e. F67J11 and F67K22 respectively. Proteus lacks a 67J11 model so I’m using the 67K22 as a close substitute for my testing. The biggest difference between the two in my application is how the ADC registers are set up. The “J” part requires writing to a secondary SFR to set the ANCONx registers, where as the “K” part has no secondary SFR but has a 3rd ANCONx register. I know #ifdef is appli
  22. Thanks that fixed it. Not sure why I would see it at times and others not. Perhaps I wasn't specifically looking for it and missed it. However this begs the question should Novo headers be enabled as IDE default or not? It would seem to me that Novo is something a user specifically wants and can envoke as needed vs. always "on" and a default setting.
  23. Pavel, Here is another oddity I've encountered after upgrading to V7.04. When working on projects sometimes for no apparent reason the IDE inserts the novo.h file into my code. It's really strange when out of nowhere I'll notice that "SysReadSemaphore" is included in my function lists after a compile. The only declared include files I am using are ... #include <system.h> #include <stdio.h> #include <memory.h> #include <stdlib.h> Not sure why novo.h is showing up. Care to explain?
  24. Thanks for the update on this. It seems like a minor issue but it had me scratching my head over it.
  25. I'm having the same problem. Version 7.04. I created a project "Test 1" using "new project" and selected "with empty source file". In void main I added a "while (1);" statement, and used default device and clock settings under target and clock rate respectively. I then selected "release" and hit build. The compiler generates this error. It seems as though the IDE is looking for a file it failed to create when the new project was built. Yet if I hit compile only it works ok according to the output status window. The weird part is there is no *.hex file or *.lst or *.asm files generated.
  • Create New...