Jump to content

chief

EstablishedMember
  • Content Count

    19
  • Joined

  • Last visited

Everything posted by chief

  1. Okay, I've sorted it out. I have a license for the C++ compiler. My main source code has an extension .cpp, but the eeprom code I'm using was .c, so MPLAB-X decided to invoke the unregistered C compiler for that one instead of using the C++ compiler. I think in the old MPLAB, I could choose the particular compiler, but in MPLAB-X, you choose the compiler family, and the program picks the compiler based on the extension. Brian
  2. Actually, I spoke too soon. It works for one project, not others. I'll do a search, but I think there's something about if one of the library files was from before the program license was activated, or something like that. Brian
  3. That worked! Thank you Jorge!
  4. Hi Pavel, I have a similar problem - clean installation of BoostC++ in new Windows 7 Pro machine, copied old source files into new project in MPLabX and when compiler runs it says lite (unregistered) version, and build fails because I'm over the max word limit for the free version. I enabled the Administrator account, logged in as administrator, ran Preg, it said it was successful, but I get the same problem. I also tried running the compiler from the command line, but there are spaces in the path, which make that not work. Help! Brian
  5. Hi Pavel, I now have it working using bit masks. It was a learning experience, but that's a good thing - I learned something I didn't know before! (porte & mask) returns the weight of the bit, not 1 or 0. See my changes and comments to your example below. Thanks for your help! #define OUT_MASK 2 // for bit 1 - mask needs to be the WEIGHT of the bit, not the number. Ex: bit 1 is mask 2, bit 2 is mask 4, etc. #define IN_MASK 4 // for bit 2 void read(unsigned char mask) { if (!(porte & mask)) do_something_if_bit_is_lo; // this will test for all mask bit(s) = 0 if ((porte &am
  6. Thank you Pavel for pointing me in the right direction. I don't have it working yet, but I'm reading up on mask operations to figure out where I went wrong. Best regards, Brian
  7. Hi, I have 2) one wire digital sensors, one on Port E.1 and the other on E.2 . I'm calling the read function with argument 1 for inside sensor or 0 for outside sensor. This is just a snippet of the code - If I change sens in the read function to in_sens, so it works for only the inside sensor, it works fine, but I've been trying to figure out how to make the function work for either sensor, and I'm stuck. sens = in_sens didn't work, a pointer didn't work (at least the way I did it). Can anyone offer a suggestion? volatile bit out_sens @ PORTE.1 volatile bit in_sens @ PORTE.2 void read
  8. Please zip all files in your project directory and send it along with a note that mentions full path to this project location to support@sourceboost.com We'll try to reproduce the problem. Next thing to do is to move your project to a location that does not have spaces in the path. If this does not help you need to re-create project by first creating an empty project, copying source files from the original project to the new project directory and adding them to the new project. Regards, Pavel Hi Pavel, I just sent a zip of the adc test project, which demonstrates the problem, t
  9. Please zip all files in your project directory and send it along with a note that mentions full path to this project location to support@sourceboost.com We'll try to reproduce the problem. Next thing to do is to move your project to a location that does not have spaces in the path. If this does not help you need to re-create project by first creating an empty project, copying source files from the original project to the new project directory and adding them to the new project. Regards, Pavel Hi Pavel, I just sent a zip of the adc test project, which demonstrates the problem, t
  10. I have not.If you could zip up and post a project demonstrating the issue we can investigate further. The installer leaves old version in place if you install in a new folder - old and new versions can co-exist. If you install in the same folder then the installer overwrites the older files. The "cleanest" approach is to uninstall the old version first and install the new version in a folder with the same name as the old version. Then any existing projects will use the newer compiler without any changes. Regards Dave Hi Dave, The same project was working w/ v7.02 just be
  11. I have not.If you could zip up and post a project demonstrating the issue we can investigate further. The installer leaves old version in place if you install in a new folder - old and new versions can co-exist. If you install in the same folder then the installer overwrites the older files. The "cleanest" approach is to uninstall the old version first and install the new version in a folder with the same name as the old version. Then any existing projects will use the newer compiler without any changes. Regards Dave Hi Dave, The same project was working w/ v7.02 just be
  12. Hi, I just uninstalled v7.02, installed v7.03 and v7.03 plug-ins and re-registered everything. I cleaned and rebuilt my project and it compiles fine, but I get the following error when I try to go into debug mode: Debugging... Can't load file 'SB Project4a\Debug\PJ4a.cof' The PJ4a.cof file is in the debug folder, was updated with the last build, and is about 60kB. Any suggestions besides going back to v7.02? Has anyone else seen this? BTW, is the installer smart enough to upgrade, or is it better to uninstall/reinstall as I did? Brian
  13. Thank you Reynard, It was a typo in my declarations. That's what I get for writing code on a netbook! Thanks for your help. I'm also changing them from letters to words. Brian
  14. Can anybody tell me why the compiler doesn't like this bit of code? void startup() { while(1)//startup loop - chk subd conn, last_state, pause, check S1 { if(no_conn) //test if PS subd is connected { lcd_gotoxy( 0, 0 ); lprintf("PS not connected"); } else if (last_state == S)//SC {recover_SC();} else if (last_state == L)//NL {recover_NL();} else if (last_state == X)//exit {recover_exit();} else { lcd_gotoxy( 0, 0 ); lprintf("PS connected"); lprintf("\nS1 to start"); } delay_ms(100); if(S1 == 0) { while( S1 == 1)
  15. You are right, something is wrong with the simulator.Further investigation is required. Regards Dave Hi Dave, Thanks for the prompt replies! I appreciate the effort that goes into a program like this - the powerful simulator is the main reason I bought SB Boost C++. Since I know my adc code works, I'll continue to use the simulator for the rest of my project. Cheers, Brian
  16. Brian, Another thought: use the digital volt meter in the plugins pack to measure the voltage applied to the analog input. Regards Dave Hi Dave, I found the problem, but I haven't yet found a solution. As I said, my project works on my 16F877A target just fine - I have a 5v reference on AN3 and 1/3 of that on AN0, and I'm reading the correct voltage on my LCD. In SB IDE however, both ADRESL and ADRESH stay at zero and I discovered why. Even though I have ADCON1 PCFG3:PCFG0 set to 0001b for VRef+ on AN3 and analog input on AN0, the IDE is setting them as digital inputs. I kno
  17. Another thought: use the digital volt meter in the plugins pack to measure the voltage applied to the analog input. Regards Dave Hi Dave, I hadn't looked at your ADC sample and header, I'll do that. I like to do things my own way, so I don't become dependent on one compiler's libraries and my code is more portable. Using the voltmeter sim to measure the output of the voltage source sim is a great idea! I'll try that! Thanks. Regards, Brian
  18. Hi, I bought the pro version of BoostC++, and I have a project using a 16F877a at 20MHz, and after trying to get the adc to work in the sim for some time, and thinking I had the code correct, I tried writing the code to my development board thru MPLAB and it works fine. Any idea why the same code wouldn't work in the SB IDE simulator? I'm using the LCD sim, buttons, analog voltage source and register window. I'm using AN0 for input and AN3 for reference, and I also tried AN0 for input and Vdd for reference. The LCD and buttons both work fine, the problem is that ADRESL and ADRESH both sta
×
×
  • Create New...