Debug bitmap help
 ke4pjw            
            
                Posts: 1,231
ke4pjw            
            
                Posts: 1,231            
            I started a little project this evening with the intent of generating QR codes into a 1 bit bitmap. However the bitmap debug has me a bit baffled. Could someone take a quick look at this an tell me what I might be doing wrong? The template data is the bitmap I am trying to display. The bitmap is 24x24, I am using LUT 1 as that was recommended for 1 bit bitmaps, bytes_1bit for the data type and color depth, TRACE is 0 because the image starts at the top left and goes right and then down, LUTCOLOR rgb24?, and WHITE as the color.
I am sure I am doing something stupid. I'm just too ignorant to figure it out.
CON
    _xtlfreq = 20_000_000
    _clkfreq = 270_000_000
VAR
  byte  qrbmp[72] ' 24x24 bitmap.
PUB gen() | i
    bytefill(@qrbmp,0,576)
  ' Debug the template  
  i := 0
  debug(`bitmap QRCode SIZE 24 24 DOTSIZE 8 LUT1 bytes_1bit TRACE 0 LUTCOLORS rgb24 WHITE)
   repeat 72
    debug(`QRCode `uhex_(template[i++]))
DAT
template byte %00000001,%00000100,%00000000
         byte %01111101,%00000101,%11110000
         byte %01000101,%00000101,%00010000
         byte %01000101,%00000101,%00010000
         byte %01000101,%00000101,%00010000
         byte %01111101,%00000101,%11110000
         byte %00000001,%01010100,%00000000
         byte %11111111,%00000111,%11111000
         byte %00000000,%00000000,%00000000
         byte %00000010,%00000000,%00000000
         byte %00000000,%00000000,%00000000
         byte %00000010,%00000000,%00000000
         byte %00000000,%00000000,%00000000
         byte %11111111,%00000000,%00000000
         byte %00000001,%00000000,%00000000
         byte %01111101,%00000000,%00000000
         byte %01000101,%00000000,%00000000
         byte %01000101,%00000000,%00000000
         byte %01000101,%00000000,%00000000
         byte %01111101,%00000000,%00000000
         byte %00000001,%00000000,%00000000
                
 
                            
Comments
This works, at least to get the pixels displayed... whether it is doing what you want is another matter.
I swear that was my original combination, but it didn't work. Works now!
Now to figure out why it doesn't like my bitmap.
Thank you!
@larryvc Thank you so much! I have it working now perfectly!
CON _xtlfreq = 20_000_000 _clkfreq = 270_000_000 VAR byte qrbmp[72] ' 24x24 bitmap. PUB gen() | i bytefill(@qrbmp,0,576) ' Debug the template i := 0 debug(`bitmap QRCode SIZE 24 24 DOTSIZE 8 LUT1 BYTES_1BIT ALT ) debug(`QRcode TRACE 0 LUTCOLORS BLACK WHITE) repeat 72 debug(`QRCode `ubin_(template[i++])) DAT template byte %00000001,%00000100,%00000000 byte %01111101,%00000101,%11110000 byte %01000101,%00000101,%00010000 byte %01000101,%00000101,%00010000 byte %01000101,%00000101,%00010000 byte %01111101,%00000101,%11110000 byte %00000001,%01010100,%00000000 byte %11111111,%00000111,%11111000 byte %00000000,%00000000,%00000000 byte %00000010,%00000000,%00000000 byte %00000000,%00000000,%00000000 byte %00000010,%00000000,%00000000 byte %00000000,%00000000,%00000000 byte %11111111,%00000000,%00000000 byte %00000001,%00000000,%00000000 byte %01111101,%00000000,%00000000 byte %01000101,%00000000,%00000000 byte %01000101,%00000000,%00000000 byte %01000101,%00000000,%00000000 byte %01111101,%00000000,%00000000 byte %00000001,%00000000,%00000000 byte %00000000,%00000000,%00000000 byte %00000000,%00000000,%00000000 byte %00000000,%00000000,%00000000