Jump to content


  • Posts

  • Joined

  • Last visited

robotchen's Achievements


Newbrie (1/6)



  1. Thanks, Reynard. Just to make sure I do not misunderstanding the data sheet, but I am also hoping that libraries bundled with Sourceboost Compiler is correct. Best regards Chen
  2. According to the PIC16F1827 data sheet (http://ww1.microchip.com/downloads/en/DeviceDoc/41391D.pdf), the channel selection bits in the 'adcon0' register are from bit 6 to bit 2 ( CHS4:CHS0), therefore I suppose to shift left 'two' bits to get the input for CHS4:CHS0. But from the source code for adc_measure function in adc.c, it shows // Clear the channel selection in adcon0 adcon0 &= 11000111b; // Shift the channel value to the appropriate position channel = (channel & 0x07) << 3; <================================= shift left 3 bits // And move it to the appropriate position in adcon0 adcon0 |= channel; Any can point out the mistake ? Thanks
  3. Hi, Jorge, I use HIBYTE, , and MAKESHORT for pic16f1827 programming. For the code: LOBYTE(ccpr1l,temp16); and HIBYTE(ccpr1h,temp16); I will get compiler errors: pichardware31.c(38:2): warning: expression is always false pichardware31.c(38:27): warning: 'if' body was optimised out Any suggestion to avoid these warnings. Chen
  4. Dear Jorge, Thank a lot. Do you have any suggestion as how to locate this error. The linker does not give any message to indicate the missing variable. Happy New Year Chen
  5. I have problem when link the files. The linker fails with error message " failure Internal Error: Var not found id:0x10000D03:0x009:0x00000420 Done " and here is the whole message Anyone could tell me what can I do ? ========================================== Linking... C:\Applications\SourceBoost721rc7\boostlink_picmicro.exe -idx 1 /ld C:\Applications\SourceBoost721rc7\lib libc.pic16x.lib Release\pinchBoost31.obj Release\pinch_main31.obj ..\..\..\..\Applications\SourceBoost\SourceBoost\Lib\adc.pic16x.lib ..\..\..\..\Applications\SourceBoost\SourceBoost\Lib\eeprom.pic16x.lib /t PIC16F1827 -o1 /d "Release" /p CodeGen31 BoostLink Optimizing Linker Version 7.21 http://www.sourceboost.com Copyright© 2004-2013 Pavel Baranov Copyright© 2004-2013 David Hobday Optimisation level:1 Warning unreferenced functions removed: RecordRead in: C:\Users\Sony\workspace\CodeGenTest2\pichardware31.c failure Internal Error: Var not found id:0x10000D03:0x009:0x00000420 Done
  6. Would you mind giving more details about the major bugs fixed in RC721 ? I am eager to know whether this bugs would cause me troubles in my program. Thanks Chen
  7. Thanks Jorge, I know it is bit odd, but the code is generated by a Code Generator not by myself. I noticed that because for the same code the v7.1 will not complain but the v7.11 will. Chen
  8. Hi, David I just used V7.11 to compile a project. I found the v7.11 compiler will give an error message if I use '&(variable_name)' to pass a pointer to a function. But it will succeed if I use '&variable_name' instead. But, in version 7.1, it is okay. Here is the test code. ========================== #include <system.h> int MyFunction(int *ptrValue); void main() { int input=16; int result; result=MyFunction(&input); // this will succeed, but if changed to result=MyFunction( &(input) ); it fails to compile. } int MyFunction(int *ptrValue) { return(*ptrValue); }
  9. Hi, David I attached a screen captured image. There is only one 'debug' option. Best regards Chen
  10. Dave, My IDE menu only show one item 'Debug, Did I miss something?
  11. Thanks Dave, How to change this setting? Say, I want to compile to the release version. But the IDE shows only the DEBUG option. Chen
  12. Hi, Dave I have the same trouble with this debug/release option. I am using IDE for p16f1827 coding. I could not figure out why some projects with the same target will show the 'release' mode, and some shows only 'debug' mode is available. I looked at the TDF for P16F1827, but failed to find any 'TargetConfig DEBUG' session in the TDF for p16f1827. Chen
  • Create New...