• PicŪ Basic


  • How To... PPRINT tips and tricks 1

    by Tim Box

    Explanation

    Pprint offer great flexibility, and improves the appearance of a GLCD no end. The fonts though can take a lot of code space, which might be very wasteful when you really only want to display large numbers.

    The trick is to reduce the font to hold just the characters you require.

    This is how to store only the numbers from a font, Chrs48 to Chrs57 / 0 to 9

    Open the font file and remove all CDATA from character " " to "/", but leaving the labels in place. Next remove all the labels and data from ":" onwards. Lastly remove all the labels from the look up table, label 57 onwards.

    Note. you have to leave the labels before "0" to enable the correct character data to be addressed.

    The same technique can be used to store only the characters you use no matter what they are or in what sequence. But remember to save the label names unless they are after the last character you want to use.

    Code:
    '
    ' FONT information for  Arial  - Font Size 16 (Point Size 12) Bold 
    '---------------------------------------------------------------------------------------------------'
    '
    '
    ' Pointers to the actual font table
    '
    Arial_B__12:-
    
    Cdata     word 16 ' Font is 16 High
    
    Cdata      Arial_B__12_0,Arial_B__12_1,Arial_B__12_2,Arial_B__12_3,Arial_B__12_4,Arial_B__12_5,_
               Arial_B__12_6,Arial_B__12_7,Arial_B__12_8,Arial_B__12_9,Arial_B__12_10,_
               Arial_B__12_11,Arial_B__12_12,Arial_B__12_13,Arial_B__12_14,Arial_B__12_15,_
               Arial_B__12_16,Arial_B__12_17,Arial_B__12_18,Arial_B__12_19,Arial_B__12_20,_
               Arial_B__12_21,Arial_B__12_22,Arial_B__12_23,Arial_B__12_24,Arial_B__12_25
              
    ' Font data
    
    Arial_B__12_0:-  
    Arial_B__12_1:-  
    Arial_B__12_2:-  
    Arial_B__12_3:-  
    Arial_B__12_4:-  
    Arial_B__12_5:- 
    Arial_B__12_6:-  
    Arial_B__12_7:-  
    Arial_B__12_8:-
    Arial_B__12_9:-  
    Arial_B__12_10:- 
    Arial_B__12_11:-
    Arial_B__12_12:- 
    Arial_B__12_13:-  
    Arial_B__12_14:- 
    Arial_B__12_15:-  
    Arial_B__12_16:-
    CDATA 9,240,3,252,15,14,28,6,24,6,24,14,28,252,15,240,3,0,0 ' Code for  char 0  
    Arial_B__12_17:-
    CDATA 6,48,0,24,0,12,0,254,31,254,31,0,0 ' Code for char 1  
    Arial_B__12_18:-
    CDATA 9,24,24,28,28,14,30,6,27,134,27,198,25,252,24,56,24,0,0 ' Code for  char 2  
    Arial_B__12_19:-
    CDATA 9,8,6,12,14,6,28,102,24,102,24,230,28,252,15,156,7,0,0 ' Code for  char 3  
    Arial_B__12_20:-
    CDATA 9,0,7,128,7,224,6,112,6,28,6,254,31,254,31,0,6,0,0 ' Code for char  4  
    Arial_B__12_21:-
    CDATA 9,224,6,254,14,110,28,102,24,102,24,230,28,198,15,128,7,0,0 ' Code  for char 5  
    Arial_B__12_22:-
    CDATA 9,240,3,252,15,204,28,102,24,102,24,230,28,206,15,140,7,0,0 ' Code  for char 6  
    Arial_B__12_23:-
    CDATA 9,6,0,6,0,6,30,198,31,246,1,62,0,14,0,6,0,0,0 ' Code for char 7  
    Arial_B__12_24:-
    CDATA 9,56,7,252,15,198,24,198,24,198,24,198,24,252,15,56,7,0,0 ' Code  for char 8  
    Arial_B__12_25:-
    CDATA 9,120,12,252,28,206,25,134,25,134,25,206,12,252,15,240,3,0,0 '  Code for char 9
  • Recent Activity

    John Drew-26

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

    John Drew Yesterday, 08:55 Go to last post
    John Lawton-121

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

    John Lawton Yesterday, 11:32 Go to last post
    John Drew-26

    IR Sensor Codes in Proton IDE

    Thread Starter: Mesgu

    Hello guys can someone help me plsssss... How to write a codes for IR sensor in proton ide? given: Transmitter = portb.1 Receiver = portb.0 Led...

    John Drew Today, 03:12 Go to last post
    picprotonguy-1827

    working weird

    Thread Starter: rverm

    Device = 18F2220 Xtal 4 TRISA = 111 TRISB = 0 TRISC = 0 Declare CCP1_Pin PORTC.2 ' Select Hpwm port and bit for CCP1 module. 'Declare CCP2_Pin...

    picprotonguy Yesterday, 08:03 Go to last post
    mhanley-1294

    18F47J13 or 18F47J53 Definition Files

    Thread Starter: mhanley

    Hi, I want to use either the 18F47J13 or 18F47J53 but Proton does not have a definition file for either micro. I need the extra program...

    mhanley Yesterday, 09:57 Go to last post