Jump to content

richard_s

EstablishedMember
  • Content Count

    15
  • Joined

  • Last visited

Everything posted by richard_s

  1. That's a good suggestion. I'll implement it as soon as I can and give it to SourceBoost for inclusion in a subsequent release but my time is currently limited so no guarantees as to when. Thanks for the feedback! richard.
  2. A new plugin "FlexiButtons" is available for free download from here FlexiButtons offers up to 16 buttons that can be assigned to any Port / Pin combination each with independent "active low" and "2 state" settings. To install, unzip the file into your SourceBoost directory (the one containing ide.exe) making sure the unzip process retains directory structure. This will install flexibuttons.dll & flexibuttons.html and images/flexB?.jpg files. Documentation is in the .html file. Support is directly with myself: richard AT thinicezero DOT com Comments, bug reports etc. welcome. Enjoy! richard.
  3. Edward, what you really want to do is: global.h #define DEBUG main.c #include "global.h" #include "serial.h" void main() { } serial.c #include "global.h" void ser_printf(char value) { #ifdef DEBUG return; #endif while ((txsta & 1 << TRMT) == 0) ; txreg = value; } By including the global.h in ALL of your .c files you effectively copy it's content into each of them, so the DEBUG define (and anything else you care to put in there) is available to each source file in your project. Then you can modify global.h to add or remove the DEBUG define as appropriate, and the change will be incorporated into all your source files. richard.
  4. Hi David Yes. The actual limit is a function of interrupt frequency and clock speed - the processor must be able to excecute all the interrupt code (and exit the interrupt) before the next one occurs. In real life you never want to get anywhere near this limit and must strive to keep your interrupt code 'short and sweet'. How you achieve this is dependent on the nature of the project but have a look at NOVO - Sourceboost's real-time OS for an elegant solution. This is hardware-related. The idea of programming in C is to distance you from these hardware issues, though in the world of microcontrollers that distance is necessarily quite short! The Linker will sort it all out for you so the sequence of functions in the source code is immaterial and should be designed for ease of human consumption rather than for the hardware.
  5. Hi Dave, Then the documentation is confusing :-) It states '“label” is an optional text label used to reference data'. This reads (to me) that I can optionally give the data a name and then use that name later to reference the data. Thanks for clarifying it anyway! richard.
  6. Hi Dave, Then the documentation is confusing :-) It states '“label” is an optional text label used to reference data'. This reads (to me) that I can optionally give the data a name and then use that name later to reference the data. Thanks for clarifying it anyway! richard.
  7. I had a simiar problem - albeit when using NOVO. Was related to interrupts being re-enabled before I had reset one of the interrupt flags. richard.
  8. Extraneous code generated for the logically identical 'if' statements in: #include <system.h> #define FIVE 5 #define FOUR 4 unsigned char thing; void main() { if (thing > FIVE) thing = 0; if (thing > (FOUR+1)) thing = 0; } Generated code: ; { main; function begin BCF STATUS, RP0 BCF STATUS, RP1 MOVF gbl_thing, W SUBLW 0x05 BTFSS STATUS,C CLRF gbl_thing MOVF gbl_thing, W SUBLW 0x05 MOVLW 0x00 // ????? XORLW 0x00 // ????? BTFSC STATUS,C RETURN BTFSC STATUS,Z // ????? CLRF gbl_thing RETURN ; } main function end Does not appear to be target-dependent. richard.
  9. That's good news - for me anyway! I must say that your level of support exceeds anything I've ever experienced in 30 years of using software. Well done
  10. I get the above error when linking with NOVO. Should I be concerned? richard.
  11. Can anyone confirm that the SB IDE simulator does or doesn't support interrupt-on-change of portA (PIC16F684) The simulator docs mention IOC support for portB (which my device doesn't have) but do not explicitly deny support on portA Ta! richard
  12. Yeah, I got it to compile ok but it didn't want to run either in the simulator (put breakpoint in tasks but they're never hit) or in hardware. I'll keep playing though... Ahhh that makes sense . I'll finish my evaluation first then consider getting the Pro licence. Thanks for the speedy reply Dave. richard.
  13. Does RTOS support 16F684? The example LED flash programs appear not to work on this device. Also, in a post to another member you mention 'rebuilding the RTOS library'. How can I do this? I want a custom number of tasks & events. richard.
×
×
  • Create New...