• PicŪ Basic


  • SprintImage

    A library module for use with Library Manager by JohnGB. This module has been written by Tim Box (Tim on PDS forum). The library module is offered on an as-is basis with no warranty as to its effectiveness, operation or reliability. Users use it at their own risk.

    Adds a new command called SprintImage

    Syntax

    SprintImage Address

    Or

    SprintImage Yline , Xpos , Address

    Overview

    Print either a full size image (128 x 64) on a Samsung graphic LCD from the data held in a Cdata table somewhere in memory, or a partial image at the y line and x pos from the data provided. It will obtain the size of the image from data held within the image file.

    Operators

    Address - a constant, variable, label, or expression that represents any valid address within the PICŪ micro.

    Yline - a constant, or byte variable pointing to the Y-axis line to start the image printing from. This must be a value of 0 to 7. Where 0 is the top line.

    Xpos - a constant, or byte variable pointing to the X-axis location pixel to start the image printing from. This must be a value of 0 to 127. Where 0 is the far left row of pixels.
    Example

    Code:
          Include "proton_g4.int"    
              Cls
              SPrintImage 4,20,BatterySymbol
              Stop
          BatterySymbol:
          CData 2,8,_
              254,226,227,227,227,227,226,254,255,255,255,255,255,255,255,255
    The above example code will print a 2 Y line x 8 X pixel icon of a battery symbol on the screen at position, line 4 and x pixel 20.

    Notes When only the Address is supplied the image is taken to be 64 x 128 pixels and will start to print at 0,0. If Yline and Xpos is added then the image size is taken from the first 2 bytes in the image file starting with Y lines.


    Download module

    Download: SprintImage
  • Recent Activity

    teo-16018

    Microsoft security essentials blues

    Thread Starter: shantanu@india

    Hi, A strange thing happened just now.My Windows 7 Micrsoft Sercurity Essentials suddenly gave a warning that prplus.exe(Compiler) is a potential...

    teo Today, 19:23 Go to last post
    pic-ignorant-1162

    Proton Runtime Error

    Thread Starter: Paulcc

    I have proton running well on my laptop, but after installing it on my desktop, I get the following runtime error: "Runtime Error 217 at 000709FC" I...

    pic-ignorant Yesterday, 22:11 Go to last post
    David Barker-251

    UMC bootloader 18F46K22

    Thread Starter: shunt010

    Hi all. I am trying to build a UMC bootloader file for the 18F46K22, and it doesn't appear to work. It returns (in the error log) Error ...

    David Barker Today, 11:20 Go to last post
    barak-1433

    SPI mssp

    Thread Starter: picprotonguy

    Just ordered Digital to Analog IC MCP4822 with SPI interface and immediately opened proton manual. I'm very disappointed, it looks like Proton...

    barak Today, 16:06 Go to last post