Jump to content

JB99

EstablishedMember
  • Content Count

    12
  • Joined

  • Last visited

Everything posted by JB99

  1. #pragma config LVP = ON This was my mistake, I had this turned on in my config. Someone on the PIC forums noticed
  2. I want to use an 18K14K50 in a project but I can't get it to work at all. In an attempt to get *anything* to work I've removed all the hardware and software and failed to even get the basics to work now... I've connected a PICKIT2 programmer to it to program it and a single LED and resister to pin 16 which is RC0. No other hardware is attached. I want to configure it to use the internal oscillator to to simplify things until I get it to work at all. And then written the program like this - I can think of two things that might be wrong, either my config settings which are suppose
  3. Yes, that's what I'm using now and it seems to work fine. Pity it's not sourceboost compilable though, I need to build a slightly different version at some point and have no way to compile it at the moment. I'm guessing that porting it would be a seriously large amount of effort...
  4. Ok thanks, good news for me that it's safe anyway. Can I add a feature request for a way to disable the warning on a function by function basis (I wouldn't want to supress the message for unexpected misuses). It would be handy if you could put a #pragma before a function with two options 1) Disable the warning for calling that function 2) "Clone" the function for each thread it is called from. Low priority but would be a handy enhancement.
  5. This isn't *just* about delay_us, that's just meant as an example. I get this warning when i compile my program :- Serious Warning: Possible sw stack corruption, function 'delay_us' called by more than one asynchronous thread (main/Task, interrupt, interrupt low) I understand that functions are not reentrant using sourceboost c. In this case though I know that the function will only be called during initialisation from the main program, and once interrupts are enabled will never be called except from the interrupt handler. Can I confirm that this is safe to do? (Even if th
  6. Thank you, I've looked at several bootloaders since I posted this and got my sourceboost code to work perfectly with them
  7. Well the data sheet says that the internal oscillator is accurate to 1% so you are already getting better than that. If you need more accurate timing you're going to have to use an external crystal. Figure 5.3 in http://ww1.microchip.com/downloads/en/DeviceDoc/41364D.pdf shows you how.
  8. Well I got this mostly working. I can receive data from the PC to the PIC and it all works. But the data received is truncated to the size of the EP0 buffer. I'm using the usb_handle_class_ctrl_write_callback method. It's working well enough for my application anyway. Is there somewhere better I can ask questions about this USB library as it's not really a compiler question.
  9. I'm trying to use the picpack usb library to implement usb on my 18f2550 board. I want to use a generic HID interface and need to be able to send 40 byte long messages to the board. At this point I don't need to receive anything. There isn't much documentation for this library though past the point of configuring it so I'm wondering if anyone else has got such a thing working? The hardest part seems to be setting up the usb configuration, I'm wondering if anyone else has a configuration for a similar project they would be willing to share?
  10. I'm considering using this usb bootloader on my 18F2550 for my next project http://www.diolan.com/pic/bootloader.html But before I start my question is will my sourceboost c work with it? It looks like I just have to add an -rb xxxx option to the linker to make it locate the compiled code after the bootloader and all will be happy, but is that correct and is there anything else I need to be aware of? Also, does anyone have any experience of that bootloader, or of any others? I'd like to be able to update my code frequently during development over USB as my design of board makes using my p
  11. Ah, yes that's it. I even avoided that problem in my assembly language version and completely forgot about it in the C version. It works properly now. Thank you and sorry for such a trivial problem!
  12. Hello all, I'm evaluating the C compiler to see if it will be suitable for a small project I want to do so first of all thank you producing it Now my problem, I have a pickit2 and the low pin count board that comes with it. It has a 16F690 chip and LEDs on portc bits 0-3 and a switch on porta bit 3 As a simple test I've made the following program. All if is supposed to do is to flash one LED and have the other reflect the state of the input bit. However it only displays the state of the input bit. If I swap around the two lines that set the port bits then it only flashes. It's as if
×
×
  • Create New...