fatal: out of memory (pbpw.exe)


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,605


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    The pic im using is a PIC18LF46K22 and it does have an MSSP module. Just a question on using the MSSP in terms of speed, are we talking 2x 3x 4x speed increase. I can currently completely fill the screen in less than a second.
    Hi, it's my understanding that SHIFTOUT runs at 50kHz with a 4MHz oscillator and then scales linearly with increased oscillator speed, but I'm not 100% sure on that. The MSSP module can run at Fosc/4 which at 4Mhz is 20 times faster than SHIFTOUT.

    Now, the code must be able to keep up with the increased speed, and must be able to feed the MSSP module with data to shift out. Basically you have only 8 instructioncyles to get the next byte and then load it to the MSSP module as soon as there's room in its output register. If you're not able to do it in 8 cycles the overall thruput will drop - obviously.

    So, just because the "clock" runs 20times fater than SHIFTOUT I don't think you should expect a 20 times increase, somewhere around 5-10 sounds more realistic.

    /Henrik.

  2. #2
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    Thanks all for the replies. Now where's that darn lookup table gone.

    Cheers Sphere.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    something like that should give some hints
    Code:
            goto init
            ASM
            ifdef BSR
    PIC_TYPE = 2 ; 2=PIC18
            else
    PIC_TYPE = 1 ; 1=PIC16
            endif
            
    ;%00000001,10,%11111111,%10000001,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000, %00000000]
    tbl10   dt 1,10, b'11111111',b'10000001',b'11111111',b'11111111', 0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0   
            dt 0,0
                 
    ;11,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000]
    tbl11   dt 11, b'11111111',b'00111100',b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0   
            dt 0
     
    ;12,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, 
    ;%00000000]
    tbl12   dt 12,b'11111111',b'00111100',b'11111111',b'11111111', 0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0
    
    ;13,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000]
    tbl13   dt 13, b'11111111',0,b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0
    
    ;14,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, 
    ;%00000000]
    tbl14   dt 14, b'11111111',0,b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0
    
    ;15,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, 
    ;%00000000]
    tbl15  dt 15, b'11111111',b'00111100',b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0
    
    ;16,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, 
    ;%00000000]
    tbl16   dt 16, b'11111111',b'00111100',b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0
    
    ;17,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,
    ;%00000000,%00000001]
    tbl17   dt 17, b'11111111',b'00111100',b'11111111',b'11111111',0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0
            dt 0,0,0,0,0,0,0,0,0,0  
            dt 0,1
            
    tblend = $ - PIC_TYPE
    
            endasm
    init:
            PIC_TYPE    CON EXT
            tbl10       CON EXT 
            tbl11       CON EXT 
            tbl12       CON EXT 
            tbl13       CON EXT 
            tbl14       CON EXT 
            tbl15       CON EXT 
            tbl16       CON EXT 
            tbl17       CON EXT 
            tblend      CON EXT 
            addr        VAR WORD
            dta         VAR BYTE
            cntr        VAR BYTE
            
            CLEAR
            TRISC = 0
            TRISB = 0
            PAUSE 50
            
    MAIN:   
            HIGH PORTB.2 'CHIP SELECT
            FOR addr=tbl10 TO tblend STEP PIC_TYPE
                    READCODE addr, dta
                    SHIFTOUT portb.1, portb.0,0,[dta]
                    cntr=cntr+1
                    HSEROUT ["%",BIN8 dta,", "]
                    IF cntr=10 THEN
                            HSEROUT [13,10]
                            cntr=0
                            ENDIF
                    NEXT
            LOW  PORTB.2 'CHIP SELECT
            HSEROUT [13,10,"----- done ------<", 13,10,_
                    dec ((tblend-tbl10)/PIC_TYPE), " Byte sent>"]
                    
    HERE:   GOTO HERE
    there's still room for improvement.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts