Search Results - MEL PICBASIC Forum


Search:

Type: Posts; User: HenrikOlsson; Keyword(s):

Page 1 of 4 1 2 3 4

Search: Search took 0.05 seconds; generated 39 minute(s) ago.

  1. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    The array transform routine, as posted above executes in 4.66ms on my test hardware (18F46K42 @64MHz).
    It's a small improvement but I managed to reduce that to 4.28ms by changing it into two...
  2. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    This shaved another 4ms off here, instead of:

    IF population > 3 OR population < 2 THEN
    lednew[counter] = 0
    ENDIF

    Do:

    IF Population > 3 THEN LEDNew[Counter] = 0
    IF Population < 2 THEN...
  3. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    From 3 to 15 frames per second in a couple of hours, I call that improvement.
    At one place (at least) you first do IF LED[Counter] = 0 and then a couple of lines further down you do IF LED[Counter]...
  4. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    Great that it all still works!
    I timed it and Richards is a quite a bit quicker. On my test setup it went from 67 to 48ms which is not surprising since, generally speaking, anything involving...
  5. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    There's also an array called colour, how large is that?

    For this I just toggle an output and measure it with the scope but for more precise measurements I use one of the onboard timers. Reset it,...
  6. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    In the Grid Evalutaion section, precalculating the Array index values and replacing the AND-logic with nested IF/THEN saves Another bunch of cycles

    'Grid Evaluation

    CntPlus33 VAR WORD...
  7. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    What size are all the different arrays?
  8. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    Here's another tiny tweak to the array transformation routine that makes quite a difference:

    FOR Row = 0 to 31 ' Cycle thru 32 rows

    TempW = ROW * 32 ' Precalculate this...
  9. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    Hi,
    It might very well be that I don't quite understand what you're doing in the code but replacing all that OR logic with some math increases the performance in that particulat section of the code...
  10. Replies
    43
    Views
    6,938

    Re: Conway's Game Of Life

    Here's an idea, untested, don't know if it compiles.


    InPtr VAR BYTE
    OutPtr VAR BYTE

    Row VAR BYTE
    Col VAR BYTE

    Even VAR BIT
  11. Re: Is it possible to make unidirectional serial port via 1 pin with PBP?

    Because the flow control feature of SERIN/OUT2 uses an aditional pin and CuriousOne specifically specified that there was only one I/O pin available.
  12. Re: Is it possible to make unidirectional serial port via 1 pin with PBP?

    In theory, yes.
    In practice though it depends on what else the two chips are doing because if the sender just "speaks" randomly it's likely that the receiver will miss the message if it's doing any...
  13. Re: Controlling OG-4 Decathron with PBP in an efficient way.

    If you say so :-)
    Do you have a datasheet describing the driving signals, I'm having some difficulties understanding how it works based on your description.

    /Henrik.
  14. Re: Controlling OG-4 Decathron with PBP in an efficient way.

    And stop using HIGH/LOW, those waste both time and space.

    The animation can most likely be done with two FOR loops. An outer that steps thru the starting position from 1 to 29 and an inner that...
  15. Replies
    5
    Views
    743

    Re: PICKIT-3 installation in PBP 3.1

    If you're using the old MPLAB 8.92 then it's you need to point to the MCSP to the pk3cmd.exe, see:
    http://www.picbasic.co.uk/forum/showthread.php?t=12108

    If you update to MPLABX you'll get the...
  16. Replies
    3
    Views
    304

    Re: PIC10F320 not in devices list

    Support for the 10F320 was added in version 3.1.0 so you're one version behind (and three (plus one beta I believe) versions behind current).
    You'd need to update/upgrade the compiler, I don't know...
  17. Replies
    10
    Views
    1,539

    Re: New PBP and MCS -- a few errors

    Just open them with your favourite text editor or in MCS.
  18. Replies
    10
    Views
    1,539

    Re: New PBP and MCS -- a few errors

    Great, you're making progress!

    That #CONFIG / #ENDCONFIG is "new" in PBP3 and it is what you should use for ALL devices.

    In your PBP3 installation folder there's a sub folder called...
  19. Replies
    10
    Views
    1,539

    Re: New PBP and MCS -- a few errors

    No, you don't have to USE MPLAB X but you need to have it INSTALLED so that you have access to the assembler that comes with it. And, it doesn't HAVE to be the assembler from MPLAB X, it can be an...
  20. Replies
    10
    Views
    1,539

    Re: New PBP and MCS -- a few errors

    MCS is what's called an IDE, an Integrated Development Environment or put another way, a glorified text editor. You don't have to use it, you can write your programs in any text editor. I do...
  21. Replies
    2
    Views
    1,100

    Re: Are my variable counts too high?

    You're mixing stuff a bit.
    Variables (BIT, BYTE, WORD, LONG and arrays of these) are stored in RAM. Constants are replaced with there numeric value at compile time and are stored, together with the...
  22. Replies
    4
    Views
    2,577

    Re: Me again :) -- latest PBP?

    The different versions supports a different amount of devices, you mentioned the 16F1847 which is only supported in the Gold-version so that's what you need.

    In MCS, make sure you have the...
  23. Replies
    12
    Views
    2,563

    Re: Snap programmer

    The executable is ipecmd.exe.
    Are you saying you don't have that even though you have the full blown IPE tool installed and working?

    /Henrik.
  24. Replies
    4
    Views
    2,577

    Re: Me again :) -- latest PBP?

    As a matter of fact Charles posted a preliminary v3.1.3 just a few days ago so it's not abandoned but I personally wouldn't expect any earth moving updates.


    It's on the supported device list...
  25. Replies
    12
    Views
    2,563

    Re: Snap programmer

    Hi,
    Like I said, I don't have a Snap but if I'd venture a guess something along the lines of:


    -TPSNAP -P$target-device$ -F$hex-filename$ -E -M -OL
    Programmer exectuable is ipecmd.exe

    In...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4