Jump to content

Dave

Administrators
  • Content Count

    2,046
  • Joined

  • Last visited

Posts posted by Dave


  1. I was hoping if somebody could offer some design advice regarding the use case for binary semaphores. In a situation where you have a hardware interrupt eg. rx buffer full and you want to signal to another thread to parse the data packet, is there any advantage of using a binary semaphore instead of simply putting the parsing thread asleep and waking it up from the interrupt? Both seem to work without any noticeable differences but since I do this kind of thing so often I just wanted to make sure there wasnt a reason to use one technique over the other. Thanks

    Good question.

    If more than one task or thread of execution wants to share a resource then semaphores are a much better fit.

    If only two tasks or threads want to share a resource, and one of them wants to do the foreground processing, then waking and sleeping is probably much neater.

     

    Regards

    Dave


  2. Kenn,

     

    Today I tried to download the v7.22 of the plugins, and my AV (Avaast) claims the stopwatch plugin contains a virus:

     



    Infekce zablokována


    URL

    hxxp://sourceboost.com/CommonDownload/Binaries/Plugins/pluginsv722.zip|plugins.exe|{app}\StopWatch.dll|[Armadillo]

    Infection

    Win32:Evo-gen [susp]

    Could you folks please confirm that the current plugin downloads are virus-free?

     

    Thanks.

    There are no virus's in there, it is a false detection.

    We recommend pushing any such files through www.virustotal.com virus checker, which uses a number of antivirus programs, for you own peace of mind.

     

    Regards

    Dave


  3. Chen,

     

    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
    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

     

    This is an Internal Error, ie something gone wrong between compiler and linker - which may or may not be a problem in your code.

    To reproduce this problem we could really do with a simplified project that builds and demonstrates the problem.

     

    Please send to support@sourceboost.com

     

    Regards

    Dave


  4. Remi,

     

     

    Hi guys,
    I found some irregularities which I cannot explain. Perhaps it's the programmer (Velleman VM134=K8076) that I bought because I have to wait for the second EBlock 006, already ordered. The old EB006 also gave problems with the 18F4680.
    What happened? I had no difficulties at all programming a 16F887. But when I loaded the same program (mutatis mutandis) in a 18F4680 some strange things happen.
    Example A.
    It doesn't like if arrays are addressed directly. For instance:
    LcdBuffer[5] = 'A'; has no effect at all.
    I have to use a variable, so:
    char i;
    i = 5;
    LcdBuffer = 'A';
    Which is understood.

     

    Example B.
    If I declare three const arrays of char then the order seems to be important.
    const char HexSigns[] = "0123456789ABCDEF";
    const char CompasText[] = "From compas";
    const char GPSText[] = "From GPS";
    produces nonsense with HexSigns. I have to do it like:
    const char CompasText[] = "From compas";
    const char GPSText[] = "From GPS";
    const char HexSigns[] = "0123456789ABCDEF";
    Same lines, different order.
    I tried both examples out several times because I searched the fault in my own program of course. Perhaps it's the compiler, but I am not sure about that. I suppose that there are complications when indexing. Hopefully the EB006 arrives soon. What can it be?
    Remi

     

    Your problems are unexpected.

    Please provide a small but complete program demonstrating the issue then we can take a look.

     

    Regards

    Dave


  5. Dimitris ,

    Hi. I am using the free version of sourceboost 7.20 ide to see how it compares with mplab x ide. I am having a problem.

    Every time i am writing a function (is been declared in my program) and press the parenthesis symbol "(", the ide freezes for

    about 20-30 secs and then it unfreezes.Now, if i try to write something inside the parenthesis (function arguments) it freezees again.

     

    Thank you.

    Dimitris

    I have never heard of this problem - no one else complains.

    So I can only imagine that it is a function of you system or installation.

    Let us know if you find the cause.

     

    Regards

    Dave


  6. Mike,

     

    Hello all:

     

    I'm trying to figure out which version of BoostC I used to build some old .HEX

    files (want to recompile and compare).

     

    I've been using BoostC since v7.04, but unfortunately didn't manage to keep

    the install files for all the updates I've done. Is there a place to get all the v7.xx

    install files?

     

    I'm interested in:

    7.04

    7.05

    7.10

    7.11

    7.12

    7.20

     

    Thanks,

    -Mike

     

     

     

     

    The url format is (example of V7.10):

    "http://www.sourceboost.com/CommonDownload/Binaries/SourceBoostV7.10/sourceboostv710.exe"

    There is no guarantee that older version will be there as the server space is reclaimed.

     

     

    Regards

    Dave


  7. erikhaverkamp,

    Hi,

    I am working with a PIC16F1782 and use the following code:

     

    set_bit(portb, 4);

    set_bit(portb, 5);

     

    This results in bit 4 not being set, however if add a nop it works.

    I have seen this more.... any ideas?

     

    set_bit(portb, 4);

    nop();

    set_bit(portb, 5);

     

    Thanks,

    Remember that setting single bits directly on a port cause a Read Modify Write process. The read process reading what is actually on the port, rather than what was last written.

    When the port is read as part of setting bit 5 bit 4 must be read as being low, hence low is written back to it.

    Typical cause of such a problem is capacitive loading of the port, causing the voltage on the actual pin to take time to rise.

    On some devices LAT registers exist which don't suffer from this problem as reading them give the last written value rather than the actually pin value.

    Another method is to keep your own shadow register of the whole port and modify that, and then it will be written without reading the port.

     

    I hope that makes sense.

     

    Regards

    Dave


  8. TomF

    Not sure if its a bug?

     

    If i set the simulator clock to < 100k, the simulator simulates at 100k.

     

    Im trying to simulate a device running at 32kHz, and the simulator appears to be running the code at 0.3MHz (300k)

    Not a bug :-)

     

    The simulator always runs as fast as it can.

    Telling the simulation environment a different clock rate tells the plugins what the clock speed is. This enables the stopwatch plugin (for example) to report times in standard units rather than just ticks, or the LCD plugin to determine how many clock ticks for it's fixed time delays.

     

    Regards

    Dave


  9. Micmar,

    Oops I looked in the manual but have not seen it you can cancel the request, may I ask if it is compatible with Proteus? I have to do a hardware simulation also quite heavy.

    thanks again, Marco

    Yes it is compatible with Poteus, but I will admit I haven't tried it lately.

     

    Regards

    Dave


  10. Micmar,

    please, it would be possible for you to add in output by compilers generate a file cof? to simulate both hardware and software exist simulators that use this format,

    and would be very comfortable.

    Thanks in advance Marco

    A COF file is produced during the linking process. What else are you wanting?

     

    Regards

    Dave


  11. Coder,

     

    The reason to use unsigned data types where possible is because extra work has to be done with signed data types such as sign extension.

     

    One thing that might give what you describe is aliasing. What is the sample rate of your Oscilloscope (needs to be at least 2x the frequency you try to measure), if its too low then you get beating effects that make frequencies appear much lower than they are.

    Maybe the signed code was so much slower that the frequency produced did not then suffer from aliasing issues.

     

    Regards

    Dave


  12. JorgeF,

    Now you got me confused :wacko:

     

    When I first checked the link, it lead me to the site download page.

    The 7.20 package was there identified as an RC, now its there but as a full release. :o

     

    What is the correct status after all?

    It sounds like you may have had some issues with your web browser and the page being refreshed.

    What was going to be a release candidate has accidentally been published as a release.

    It actually should be a good stable version so probably wont be changed back to a release candidate.

     

    Regards

    Dave


  13. How about this:

     

     

     

    #define get_byte_3_of_long(long_value)  ((unsigned char)(long_value >> 24))
    #define get_byte_2_of_long(long_value)  ((unsigned char)(long_value >> 16))
    #define get_byte_1_of_long(long_value)  ((unsigned char)(long_value >> 8))
    #define get_byte_0_of_long(long_value)  ((unsigned char)(long_value))
    
    long mylong = 0x12345678;
    unsigned char byte0 1 = get_byte_1_of_long( mylong );
    

     

    Regards

    Dave


  14. davidb,

    In a way I felt that defining the 'rom' within the function might not be the right thing to do but it seemed to work O.K. However, I was slightly surprised to find that although the conditional compilation correctly removed the unused functions the the 'rom' tables inside them were left behind and therefore used more flash than I was expecting.

     

    I would be interested to know if this effect is by design or just a side effect.

    It would be good if you could post a small program that demonstrates what you describe.

     

    Regards

    Dave


  15. I will try to do so but the problem is that in the lates version of the compiler

    i can not find the libMath.lib.

    What is in this library and where did it come from?

     

    The novolib_pic18t5e2ts2.lib is a custom library. I need to recreate this library with the new compiler. The fact is

    that i have tried to do so but i had no result. Could you explain me how to build a new novo lib step by step (the manual is not very clear

    on that).

    To build a custom library you need to have all the Novo the source code - do you have it?

    Included with it are some stand alone projects that do different Novo builds. I would copy one of those and make the required changes.

     

    Regards

    Dave

×
×
  • Create New...