Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Thack

  1. Why use a third party editor? I ask only because I think the editor in MPLAB has greatly improved in recent releases, and in particular like the code-folding; keyword recognition and highlighting; auto-indenting and out-denting; bracket matching; etc. What extras do Textpad and UltraEdit bring to the party? SteveT
  2. If you could be specific about what the correct information should be for the items you list above, I'd be very happy to get in touch with CCS and try to persuade them to update their table. Let's be honest: ALL of those tables will gradually get out of date as the various manufacturers develop and upgrade their products, so they must be used to amending them. And I agree completely - without the source code the benchmarks are pretty meaningless, but I think most people will realise that. Pavel - please publish the correct information for your list of items in this thread, and I'll do my best to get the information to CCS. Steve
  3. OK, every aspect of PICkit2 seems to work perfectly from inside an XP Virtual Machine. To summarise: I've set up an XP virtual machine in "Windows Virtual PC"*, hosted by Windows 7, for my PIC programming activities. The SourceBoost IDE, MPLAB and the PICKit2 applications all run nicely in the virtual XP machine. The PICStart Plus and PICKit2 programmers both work fine (serial port and USB respectively). The following PICKit2 functions have been tested and work fine: * In-circuit programming * In-circuit debugging * Programming-To-Go mode In my experience MPLAB and the SB IDE are much happier in XP, so the use of a virtual machine is a good way to have the best of both worlds. I recommend it. Steve * This is NOT the same as "Virtual PC 2007", which doesn't support USB port capture and thus won't work with PICKit2.
  4. Further to our discusion about using PICKit 2 from within an XP virtual machine...... I can confirm that the Programmer-To-Go feature works OK, too.* The only thing left to check is the ICD function. I'll report back. Steve *I must say, Programmer-To-Go is a fabulous feature! The ability to "fill up" the PICkit with the code, take it out to the target hardware, and "empty" it into the target is just brilliant.
  5. Well, come on then, tell us which facts are wrong! Obviously the table will get out of date as all the products get developed. But it would great to hear which bits you know to be wrong - please tell us. Perhaps we could compile a list and get CCS to update the table. That would be an enormous benefit for SourceBoost. Steve
  6. Remember, so far I've worked only with PICStart Plus and I can say for sure it's fine in a Virtual Machine. It's only a serial port, after all. However, these past couple of days I've been playing with the PICKit2, also in the VM. I thought it might be trickier, as it's a USB device, but Windows Virtual PC lets the VM capture the USB port with no problems. I've programmed the PIC on the demo board a few times , but I haven't yet tried any in-circuit debugging. I can control the the PICKit2 (programming, and switching the VDD and MCLR lines) from the PICKit software and also from within MPLAB. It seems to work perfectly in both cases. As the VM is able to "see" the PICkit2 for programming purposes, I'm pretty confident it'll see it just the same for in-circuit debugging. Oh, I should point out that I'm using the new "Windows Virtual PC", NOT "Virtual PC 2007". The latter doesn't support the capture of USB ports. The former is still in beta (I think) and is used in the soon-to-be-released Windows 7. I realise you might not be in a position to go this route yourself, Ian, but for anyone else who might be watching this thread, I can honestly say that a virtual XP machine hosted in Windows 7 (or Windows Vista, maybe) is great for PIC development. Apps like PICKit2, MPLAB and SB IDE play much more nicely in XP than in Windows 7 or Vista. Finally, I will experiment with some in-circuit debugging from within a virtual XP machine, and report back to this thread. Steve
  7. I totally agree with you about the lousy stability of MPLAB. I think it's a weird mix - buggy and fragile, and with a Windows 95 look-and-feel, but with some great modern features like code folding, etc. However, I've found it works much better if I run it in a Virtual XP machine (I'm running Windows 7 here) with nothing else competing with it. I open all my reference documents, websites, etc from Windows 7. If you don't do this already, I would strongly recommend you set up a Virtual XP machine dedicated solely to PIC programming. It seems much better that way. Steve
  8. Ah, sorry, I've found it. In case anyone else is interested, there is a pretty good comparison page here: http://www.ccsinfo.com/content.php?page=newcompilercomp Obviously it's trying to sell the CCS compiler, but it looks like a useful, detailed and fair comparison of seven different PIC 'C' compilers. Steve FORUM OWNER: Please feel free to close this topic. I'm sorry to have opened it in error.
  9. Sorry for the one-man flood at the moment! You can tell I'm rather enthusiastic! When I first looked into BoostC (a year or two ago), I remember reading something about how it compared with Hi-Tech 'C'. I've searched this site, and Googled, and can find no useful information. It seems to have gone. I would like find out what benefits BoostC has over the ubiquitous Hi-Tech 'C', especially now that Hi-Tech 'C' has been taken over by Microchip and will no doubt get a pretty serious level of support. Is there a feature comparison list somewhere? If not, your own opinions on the strengths and weaknesses of the two products would be great. Thanks again for tolerating all this traffic! Steve
  10. (Not sure if this is the right forum; please move it if you wish) I am a complete newbie to SourceBoost products, although I've been programming PICs using MPLAB and the PICStart Plus for several years, now. My requirements are that I want to be able to write my code in 'C', program a range of PICs, and experiment with in-circuit debugging (I've never done this before). I'll be using the PICkit2 for in-circuit programming, and the PICStart Plus for programming uninstalled PICs. What benefits does the SourceBoost IDE have over MPLAB? In your experience, what are the strengths, weaknesses and unique features of both? Which would you recommend? Obviously I'm trying to decide whether to migrate over to the SourceBoost IDE, or stick with MPLAB. Any thoughts or reactions would be gratefully received. Thanks, Steve
  11. Fantastic! Thank you, IanM, I really appreciate you going to this trouble. I'll give it a try. Thanks again for all your help. Steve
  12. ChipGuy: nope, it definitely wasn't me! I haven't been near the Hi-Tech forums for as long as I can remember. I've decided to stick with BoostC for now (while I'm learning the ropes), although I ought to take a look at Hi-Tech C some time. However, I have asked a related question in the Microchip forum, although it wasn't in the context of using it with BoostC. Anyway, ChipGuy and kenn, thank you both very much for such encouraging words about the PICkit 2. You've encouraged me to look at it again, and I think you are right - I should build ICSP into my circuits from now on, and make proper use of it, instead of messing about taking the PIC in and out all the time. According to the manual, the SourceBoost IDE doesn't have built-in support for any programmer. Is there an on-line guide somewhere saying how to use PICkit 2 with the SourceBoost IDE? Many thanks again, Steve
  13. Don't be so rude. I was trying to help. Your question was incredibly unclear. Here's how your question looks in REAL English: "I have performed an A/D conversion in the PIC. I now want to display the results of the conversion in the SourceBoost IDE Terminal Page. I am using an RS232 link from the PIC and can send letters, numbers and strings to the Terminal Page successfully. How do I convert the binary data from the A/D conversion into human-readable numbers for display in the Terminal Page?" THAT is English. Young man, you need to learn some manners. Steve
  14. I still don't understand. Do you mean you've done the A/D conversion in the PIC, and want to send the result of the A/D conversion up the RS232 link into the computer, and display it there? Or do you mean you want to receive some A/D data via the RS232 link and display it using your PIC and some sort of LCD display? Or is the RS232 stuff nothing to do with the A/D stuff? It's just that A/D conversion and serial comms aren't obviously related, so we're having to guess what you are trying to do. SteveT
  15. I don't think I really understand the question. Do you mean you want to know how to perform an A/D conversion and then display the result? If so, are you planning to use the internal A/D, or an external A/D chip? Or do you mean the A/D conversion has already been done and this is what is coming in via your RS232 link, and you want to display the incoming numbers? Perhaps you could explain more fully exactly what you are trying to do. Steve
  16. I've been using a PICStart Plus programmer for years, which integrates very nicely with MPLAB. Now that I've discovered BoostC, it looks like getting the PICStart Plus to work with the SourceBoost IDE may be rather challenging. So, could any of you recommend a programmer that is proved to work nicely (and easily) with the SourceBoost IDE? What I really like about the PICStart Plus is that it handles pretty well every PIC ever made, from 6 pins to 40 pins. That is a really good point. Also, as I say, using it with MPLAB is utterly painless. What I dislike is that every so often it has a little sulk and has to be reset. Also, it uses a serial port rather than USB, which is a bit clunky these days. I bought a "Microchip PICkit 2" some time ago, and I haven't played with it yet, but as far as I can see you have to build a circuit board to mount the chip you are programming, which seems a great deal less convenient than a 40-pin ZIF socket! Or perhaps I've misunderstood. So, any advice on a programmer that plays nicely with SourceBoost IDE and has the flexibility I like would be much appreciated. Regards, Steve
  17. Guys, I've taken your advice, and have two things to report: Firstly, getting PICStart Plus to work with SourceBoost IDE looks to be a bit of a nightmare, although I haven't actually worked through it in detail, yet. (This will lead on to another question, in a new thread.) Secondly, sticking for now with MPLAB, I've made the changes to the code as suggested by IanM, and also added 'float.pic16.lib' and 'libc.pic16.lib' as Library files in the MPLAB Project window (again, as suggested by IanM). And now it builds perfectly. Thank you, again! HOWEVER - I'm worried about why I made this mistake. Is there anything I should have read, but didn't, that tells me I've got to explicitly add those two .lib files to my MPLAB project? I've read through the SourceBoost C compiler Help document and there is nothing obvious that I can see explaining this. Incidentally, I strongly believe that the Help should explicitly state that the compiler does not handle floating point operations! It is silent on the matter. Anyway, I feel I've made a big step forward with your help. I fear I may have more questions. If they are too trivial, don't hesitate to say so! Thanks, Steve
  18. Guys, that's a superb and incredibly helpful set of replies! Thank you! I am truly grateful. I should tell you I've been using MPLAB with BoostC, purely because I wasn't sure how to make the SourceBoost IDE work with my PICStart Plus programmer. The target chip was the 16F818, which I think is a great step up from the 16F84 I learned on. I must say, I do find MPLAB damn tricky to work with sometimes. It's a bizarre mix of nice, modern stuff - like code folding in the editor - and some really clunky Windows 95-style dialogs and other user interface challenges. I should also point out that the code I gave was only a sample to illustrate the problem: my real project doesn't actually calculate watts! I'm actually making a digital gear indicator for my motorcycle, and the need to use a couple of floating point calculations came up. (I've avoided it for now by using integer maths instead - a perfectly good alternative in this case). So, there seem to be three things I must do: 1/ Move over to the SourceBoost IDE 2/ Get my PICStart Plus working (I've now spotted the instructions elsewhere in this forum) 3/ Follow your instructions to use the floating point libraries properly Incidentally, I do realise that floating point maths is a lot to ask of a little 8-bit micro, but it can sometimes be the most elegant solution. I'll follow my three-point plan above and promise to report back on the results. And I must close by thanking you guys again - you've been exceptionally helpful to a newbie! Steve
  19. I'm sure I'm missing something obvious, but I just can't seem to get anywhere with this. I'm a complete newbie to BoostC and am finding my way around it, but have hit a roadblock. I want to declare some floating point numbers, and multiply them together. Here is the sample code I'm playing with: //BoostC Standard V6.96 #include <system.h> float volts = 0; float amps = 0; float watts = 0; void main(void) { volts = 2; amps = 3; watts = amps * volts; } It compiles OK, but the linker generates several identical Error lines: BoostLink Optimizing Linker Version 6.96 http://www.sourceboost.com Copyright© 2004-2009 Pavel Baranov Copyright© 2004-2009 David Hobday Optimisation level:1 Error: Unresolved external function:'__mul_32u_32u(unsigned long,unsigned long)' Error: Unresolved external function:'__mul_32u_32u(unsigned long,unsigned long)' Error: Unresolved external function:'__mul_32u_32u(unsigned long,unsigned long)' Error: Unresolved external function:'__mul_32u_32u(unsigned long,unsigned long)' .....etc What is happening here? I'm completely confused. (In fact, I don't think I really understand what the linker actually does). Anyway, I suspected it might be something to do with a missing '.h' file, so I added the only one that looked vaguely relevant - float.h - as an include, but it has made no difference. I should warn you that I've got some other "challenges" I might need your help with, but I'll leave those for later! I'd be really grateful if someone could point out what I'm doing wrong. Many thanks in advance. SteveT
  20. Thanks for those comments. Presumably there is some sort of hidden "magic" going on when addressing the I/O ports like variables, is there? I mean, writing to an I/O port would result in a read-modify-write sequence, rather than a plain write. Is that correct? Thanks, Thack
  21. I've come to realise that it uses the PICC model ("treat registers like variables"), and the translation between the "official" Microchip names and the names used in BoostC are in the <device number>.h file. Is there any chance you could mention that in the compiler reference manual, perhaps with an example? Thanks, Thack
  22. Colleagues, I'm completely new to using BoostC for programming PICs (although I've programmed in C years ago). I wanted to tell you about a significant stumbling block which - if corrected - would make life much easier for complete newbies like me. Apart from the code examples, the only reference material that is obviously available is "boostc.pdf", which covers most features of the compiler very well, including the PIC-specific libraries (timing functions, clear_bit and set_bit, etc). However, nowhere does it explain how to address the various special registers in the PIC. This is a major hole! Competing compilers (e.g. CCS C and HiTech PICC use quite different concepts for reading/writing registers such as TRIS and OPTION_REG and the timers/counters). The former hides the registers behind function calls, the latter treats registers like variables. I needed to know how to set up the port directions and option register in BoostC, but nowhere in the compiler reference is there any mention of it. Try it for yourself - open boostc.pdf and do a search on "option register". Nada. After poring over the example files I saw a variable called "option_reg", which makes me think it uses the "treat registers like variables" system like HiTech. Just to be sure I searched the compiler reference but there is no mention of option_reg at all! There is a single, cryptic mention of "tris" in the section on one-wire bus functions. Really there should be a section on how to use BoostC to talk to the PIC registers, and in particular there needs to be a cross-reference between the official Microchip name and the name of the variable in BoostC. For instance, Microchip calls it "OPTION_REG", but BoostC seems to call it "option_reg", and of course "optionReg" and "OptionReg" would also be valid names in C and could have been used, for all I know. In the section on Volatile Data Types, there is the text "...if a bit variable is mapped to a port pin...", but no explanation of HOW to do that mapping. Two questions: firstly, is there any way the documentation could be enhanced have a brief explanation of the principles used to talk to the PIC special registers, at bit and byte level, including this concept of "mapping"? Secondly, has anyone produced such a guide for people new to this compiler? Thanks! Thack
  • Create New...