Code: Select all
'PIC18F452
DEFINE OSC 4 'OSC speed, you may have to tweak the 'strobe'
'routine's e_pause constant for other speeds
ADCON1 = 7 'Make all pins digital, you may adjust as needed
dat VAR PORTD 'LCD bus Pins 7-14 LSB-MSB
scl VAR PORTC.3 'I2C SCL for ext eeprom
sda VAR PORTC.4 'I2C SDA for ext eeprom
e VAR PORTB.4 'Enable pin on LCD
cd VAR PORTB.2 'Data/Command Pin 4 on LCD
rw VAR PORTB.3 'Read/Write Pin 5 on LCD
cs1 VAR PORTB.0 'ChipSelect1 Pin 15 on LCD
cs2 VAR PORTB.1 'ChipSelect2 Pin 16 on LCD
rst VAR PORTB.5 'Reset Pin 17 on LCD
'Set pins for output
TRISA=%0000000
TRISB.0 = 0 'CS1
TRISB.1 = 0 'CS2
TRISD = 0 'DATA PORT
TRISB.4 = 0 'ENABLE
TRISB.3 = 0 'RW
TRISB.2 = 0 'DATA COMAND
TRISC.3 = 0 'SCL
TRISC.4 = 0 'SDA
TRISB.5 = 0 'RESET
'Constants used
ctl CON $A0 'EEprom control code
'Word variables used
addr VAR WORD
'Byte Variables used
in_byte VAR BYTE 'The incoming byte
k VAR BYTE 'General counter
'Initialize variables
in_byte = 0
addr = 0
main:
'COOL KAT SLIKA
PORTA.0=1
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $80, $C0, $40, $40, $60, $20, $20, $30, $10,_
$10, $10, $10, $10, $10, $10, $10, $10, $10, $10, $10, $10, $08, $08, $08, $08,_
$08, $08, $08, $08, $08, $08, $08, $18, $10, $10, $10, $10, $10, $10, $10, $10,_
$10, $10, $10, $10, $10, $30, $20, $20, $20, $20, $20, $60, $40, $80, $80, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $FC, $03, $00, $00, $00, $00, $FC, $00, $80, $40, $30,_
$08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $F0, $00, $00, $C0, $20, $10, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $F8, $04, $F8, $00, $00, $00, $01, $07,_
$EC, $30, $00, $00, $00, $00, $00, $00, $00, $00, $18, $E8, $90, $30, $70, $D0,_
$30, $20, $60, $40, $C0, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80,_
$40, $40, $20, $A0, $A0, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $7F, $C0, $80, $00, $00, $00, $3F, $02, $03, $0C, $10,_
$20, $00, $1E, $21, $21, $1E, $00, $1E, $21, $21, $1E, $00, $3F, $20, $20, $20,_
$00, $00, $00, $00, $7F, $02, $0D, $30, $40, $00, $70, $18, $16, $18, $60, $02,_
$02, $7E, $02, $02, $02, $00, $00, $80, $5F, $86, $01, $00, $F0, $18, $06, $03,_
$01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $3C, $E4, $9C, $71,_
$06, $7C, $C0, $00, $00, $01, $03, $9E, $D0, $50, $50, $50, $50, $CC, $8C, $18,_
$18, $08, $18, $90, $90, $B0, $E0, $C0, $20, $30, $08, $0C, $06, $01, $C1, $60,_
$F8, $2C, $36, $F5, $18, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $01, $03, $06, $0C, $18, $10, $30, $20, $20,_
$40, $40, $40, $40, $40, $40, $80, $80, $80, $80, $80, $80, $80, $80, $80, $80,_
$80, $80, $80, $80, $80, $80, $C0, $C0, $40, $40, $40, $40, $20, $20, $10, $10,_
$10, $08, $08, $08, $08, $08, $08, $08, $09, $04, $04, $04, $05, $05, $06, $06,_
$04, $04, $80, $C0, $40, $60, $20, $20, $20, $20, $20, $20, $20, $20, $63, $46,_
$44, $78, $CF, $80, $80, $00, $FC, $83, $00, $7C, $76, $7E, $00, $00, $39, $1F,_
$06, $03, $F9, $ED, $FC, $00, $20, $01, $06, $FC, $00, $00, $DC, $23, $30, $17,_
$18, $04, $83, $81, $80, $80, $80, $80, $80, $80, $80, $80, $80, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$02, $C3, $72, $1A, $0E, $86, $84, $80, $C0, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $50, $00, $00, $01, $11, $22, $06, $88, $3C, $7F, $FF, $FF, $7F, $FF,_
$FD, $F2, $E6, $EC, $F8, $20, $12, $1A, $01, $08, $08, $8C, $85, $02, $82, $01,_
$01, $01, $00, $00, $00, $04, $06, $0A, $1A, $33, $C1, $81, $01, $00, $00, $00,_
$00, $00, $F0, $08, $08, $88, $88, $80, $00, $00, $F8, $00, $00, $00, $00, $00,_
$A0, $00, $00, $00, $F8, $88, $88, $88, $70, $00, $00, $00, $08, $F8, $08, $00,_
$00, $F0, $08, $08, $08, $08, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $03, $03, $01, $01, $FF, $01, $00, $80, $C0, $C0, $40, $60, $20, $20, $30,_
$10, $10, $1A, $18, $38, $48, $86, $80, $00, $01, $00, $10, $00, $01, $E1, $F1,_
$83, $83, $03, $0B, $01, $00, $80, $81, $60, $22, $38, $0F, $08, $10, $10, $30,_
$60, $C0, $E0, $22, $42, $C1, $07, $0D, $39, $E2, $02, $03, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $83, $44, $04, $04, $84, $83, $00, $00, $47, $84, $04, $04, $00, $00,_
$07, $80, $80, $80, $07, $00, $00, $00, $80, $80, $80, $00, $04, $87, $04, $00,_
$00, $83, $04, $04, $84, $84, $82, $00, $00, $00, $00, $80, $80, $80, $00, $80,_
$00, $00, $00, $80, $00, $00, $80, $80, $80, $00, $00, $00, $00, $80, $00, $00,_
$00, $00, $80, $00, $00, $07, $06, $03, $81, $80, $80, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $01, $07, $05, $0C, $39, $C1, $84, $1C,_
$30, $61, $81, $03, $07, $0D, $71, $C0, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $03, $00, $00, $00, $01, $02, $03, $01, $00, $00, $00, $00, $00, $00,_
$00, $07, $08, $10, $00, $07, $08, $08, $05, $00, $10, $08, $07, $00, $00, $00,_
$0F, $10, $10, $10, $09, $00, $00, $0F, $10, $10, $10, $0F, $00, $1F, $02, $04,_
$02, $1F, $00, $00, $1F, $04, $04, $03, $00, $00, $11, $12, $12, $0C, $00, $00,_
$01, $1E, $01, $00, $00, $11, $12, $12, $0C, $00, $00, $00, $00, $1F, $10, $10,_
$00, $00, $1F, $10, $10, $00, $00, $0F, $10, $10, $10, $09, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $03, $06,_
$0C, $18, $21, $22, $20, $20, $10, $1F, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
'********************************************************************************
'SLIKA 2
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $40, $E0, $F8, $70, $38, $F8, $58, $D8,_
$D8, $D8, $F8, $F8, $F8, $F0, $E0, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $80, $C0, $E0, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $10, $20, $20, $60, $60, $60, $C0, $40, $C0, $C0, $C0,_
$C0, $E0, $E0, $E0, $E0, $E0, $C0, $C0, $D0, $C0, $F0, $E0, $E0, $E0, $E0, $E0,_
$C0, $C0, $C0, $C0, $80, $80, $00, $00, $01, $03, $07, $0F, $1F, $7F, $FD, $FF,_
$F9, $F3, $F3, $E1, $81, $01, $00, $00, $00, $00, $00, $00, $00, $C0, $C0, $F0,_
$E0, $FF, $F7, $FF, $FF, $FC, $F8, $E0, $E0, $F0, $60, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $38, $3C, $FE,_
$FE, $EE, $FE, $FE, $BF, $FE, $BE, $BE, $BE, $BC, $C0, $C0, $C0, $C0, $C0, $C1,_
$C1, $E1, $E3, $E3, $E3, $E3, $E7, $C7, $C7, $CF, $CE, $FE, $FE, $FE, $FD, $FD,_
$FD, $FF, $F9, $F9, $FF, $FF, $FF, $FE, $FE, $FE, $7C, $7C, $7C, $7E, $7F, $7F,_
$7F, $7F, $7F, $FF, $FF, $F8, $FC, $FC, $FC, $F8, $FC, $FE, $FF, $FF, $FF, $FF,_
$FF, $FB, $F9, $F8, $FF, $FF, $7F, $1F, $1F, $87, $81, $80, $80, $80, $C0, $C0,_
$E0, $F0, $F8, $78, $1C, $0C, $0E, $3E, $7E, $7E, $FE, $FE, $FE, $FE, $66, $7E,_
$7C, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $80, $80, $81, $C1, $C1, $C1, $C1, $E1, $E0, $E0, $E0, $F0, $F0, $F1, $F1,_
$F1, $F1, $F1, $F3, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $1F, $0D, $0F,_
$03, $03, $01, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $03, $07, $05, $0F,_
$1F, $3F, $7F, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $EF, $E7, $E7, $E3, $E3,_
$C1, $C1, $C0, $C0, $E0, $40, $E0, $E0, $E0, $C0, $E0, $C0, $C0, $E0, $E0, $F0,_
$70, $70, $30, $30, $10, $10, $10, $00, $10, $10, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $40, $40, $40, $40, $40, $60, $70, $70, $78,_
$3C, $3C, $3C, $3E, $3F, $3F, $1F, $1F, $1F, $1D, $1D, $0D, $1E, $1E, $9E, $8F,_
$8F, $DF, $CF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $F8, $E0, $C0, $80,_
$80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80,_
$C0, $F0, $F8, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $9F, $9F, $9F, $1F, $1F,_
$1D, $1D, $1D, $1D, $1D, $1F, $1F, $1F, $1F, $0F, $0F, $0F, $05, $05, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $60, $70, $F8,_
$F8, $98, $98, $F8, $F8, $F8, $F8, $78, $F0, $80, $80, $C0, $FC, $FE, $3F, $1F,_
$0F, $0F, $07, $07, $03, $03, $03, $03, $E7, $F7, $FF, $FF, $FF, $FF, $7F, $7F,_
$FF, $FF, $FE, $FE, $FE, $FE, $FC, $FC, $FC, $FC, $F8, $F8, $F8, $F8, $F8, $F8,_
$F8, $F8, $F8, $F8, $F8, $FC, $FC, $FC, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FF,_
$FF, $FF, $FF, $FF, $FF, $E7, $C7, $87, $87, $07, $07, $0F, $0F, $0F, $0F, $0F,_
$07, $0F, $0E, $0E, $0E, $06, $06, $76, $F6, $FE, $FE, $FE, $F6, $FE, $8E, $FC,_
$FC, $F8, $F8, $70, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01,_
$01, $03, $03, $03, $07, $07, $03, $03, $03, $03, $01, $01, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $11, $1F, $06, $0F, $3F, $7F, $F8, $F8, $FC,_
$FF, $3F, $3F, $1F, $07, $03, $00, $00, $00, $00, $00, $00, $03, $07, $0F, $1F,_
$1F, $39, $7F, $FD, $F0, $E0, $C0, $80, $01, $01, $03, $07, $07, $0F, $0F, $1E,_
$1E, $1C, $1D, $3D, $7F, $5F, $1F, $1F, $1F, $1F, $1E, $1E, $1C, $1C, $18, $38,_
$30, $30, $30, $60, $C0, $00, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01,_
$01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $11, $0B, $0F,_
$07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0E, $1E, $3F, $3F, $7F, $7F,_
$3D, $7D, $73, $37, $35, $39, $3F, $1F, $07, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub eep_loop
next
'*****************************************************************************************
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $80, $80, $80, $C0, $C0, $C0, $C0, $E0, $E0, $E0, $E0, $E0, $E0,_
$70, $70, $F0, $F0, $B0, $B0, $B8, $B8, $98, $98, $9C, $0C, $0C, $0C, $06, $06,_
$02, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $C0, $C0, $80, $80, $C0, $C0, $E0, $F8, $FC, $FE, $FE, $FF, $FF,_
$FF, $EF, $EF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $7F, $7F,_
$7F, $7F, $7F, $7F, $7F, $6F, $6F, $6F, $6F, $EF, $FE, $FE, $FC, $FC, $DC, $FC,_
$BC, $FC, $7C, $F8, $E0, $E0, $C0, $80, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $38, $7C, $FE, $7F, $3F,_
$3F, $1F, $3F, $2F, $3F, $3F, $3F, $3F, $37, $3F, $3F, $3F, $2F, $7F, $3F, $1F,_
$1F, $0F, $0F, $0F, $0F, $0F, $1F, $1F, $03, $01, $01, $00, $00, $00, $00, $00,_
$80, $80, $C0, $C0, $C0, $E0, $E0, $E0, $F0, $F0, $F8, $FC, $FF, $FF, $FF, $FF,_
$FF, $FF, $FF, $F9, $FF, $3F, $0F, $3F, $7F, $60, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $C0, $C0, $E0,_
$E0, $F0, $F0, $F0, $F8, $F8, $F8, $FC, $FC, $FC, $FE, $7E, $7F, $7F, $3F, $3F,_
$1F, $1F, $9F, $9F, $9F, $9F, $9F, $8F, $8F, $8F, $87, $87, $83, $83, $85, $87,_
$83, $03, $01, $01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $F0, $F8, $FE, $FF, $FF, $FF, $3F, $FF, $FF, $FF,_
$FF, $FF, $07, $03, $0F, $07, $07, $03, $01, $01, $00, $00, $00, $00, $00, $00,_
$00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $03, $03, $03, $07, $0F, $1F,_
$1F, $3F, $7F, $FF, $FF, $EF, $9E, $3E, $7E, $FC, $FC, $F8, $F8, $F0, $F0, $E0,_
$C0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $03, $0F, $0F, $07, $0F, $1F, $3F, $79, $73, $EF,_
$CF, $DF, $BF, $BE, $FC, $78, $F8, $D8, $D8, $C0, $80, $80, $80, $80, $80, $C0,_
$C0, $C0, $C0, $C0, $E0, $E0, $E0, $80, $80, $80, $80, $80, $C0, $E0, $E0, $FE,_
$FC, $FC, $FC, $7C, $FF, $BF, $FF, $FF, $FF, $FE, $FF, $FF, $7F, $00, $03, $0F,_
$0F, $0C, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $01, $01, $FB, $FB, $F3, $F3, $E7, $E7, $C7, $C7, $C7, $C7, $C7, $CF, $CF,_
$CF, $CF, $CF, $CF, $CF, $CF, $CF, $CF, $CF, $EF, $EF, $E5, $E7, $F7, $F7, $F6,_
$FE, $7F, $7F, $7F, $3F, $3F, $1F, $1F, $0F, $07, $03, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $07, $1F, $1F, $3F, $78, $71, $71, $EF, $DF, $FF, $F7, $F7, $E7,_
$E6, $E7, $E3, $E3, $E3, $C3, $E3, $E3, $E1, $61, $61, $21, $31, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
'****************************************************************************************
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $00, $00,_
$00, $80, $80, $00, $80, $00, $00, $80, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $80, $80, $80, $80, $40, $00, $00, $60, $00, $00, $B0, $70, $30, $10,_
$70, $E0, $E0, $C0, $C4, $C4, $A6, $22, $00, $20, $20, $29, $6A, $6E, $6F, $FC,_
$95, $87, $83, $B7, $3F, $B7, $BF, $B3, $96, $98, $08, $40, $31, $68, $C3, $06,_
$02, $F2, $E2, $EA, $E6, $FA, $D0, $F2, $BE, $B0, $FE, $F8, $90, $F0, $90, $10,_
$B0, $B8, $98, $98, $A0, $60, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $30, $78, $78, $78, $FC,_
$FC, $F0, $FC, $54, $FC, $90, $F8, $9C, $F0, $F2, $F6, $F6, $F6, $F4, $F4, $F0,_
$E3, $F3, $F2, $F0, $71, $71, $19, $0C, $00, $00, $00, $00, $03, $0F, $1C, $38,_
$70, $F0, $F1, $E3, $83, $03, $03, $07, $1F, $1E, $3C, $78, $E0, $C0, $80, $80,_
$C1, $E3, $73, $31, $39, $19, $ED, $ED, $9F, $3B, $34, $10, $C2, $6F, $61, $00,_
$00, $80, $C6, $C6, $EF, $FF, $FF, $FF, $FF, $FD, $FB, $79, $99, $1B, $0B, $9C,_
$19, $18, $7F, $3F, $1E, $0A, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $40, $40, $30, $19,_
$89, $C5, $E5, $FC, $3E, $1E, $0E, $0F, $03, $02, $00, $04, $84, $0F, $15, $03,_
$03, $07, $07, $C1, $80, $00, $00, $00, $00, $00, $01, $03, $06, $1C, $2C, $FC,_
$C0, $80, $01, $03, $07, $0E, $FC, $F0, $E0, $00, $00, $80, $BE, $3F, $07, $21,_
$7C, $F8, $00, $00, $00, $C0, $C1, $03, $03, $01, $E0, $F0, $F8, $FC, $FE, $7E,_
$9F, $8D, $8F, $03, $81, $83, $C2, $3F, $1F, $07, $07, $07, $01, $03, $00, $00,_
$01, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$80, $C0, $80, $E0, $F0, $70, $78, $3C, $9C, $86, $C1, $40, $60, $3C, $1E, $0F,_
$03, $01, $01, $00, $00, $00, $00, $80, $00, $00, $0C, $1E, $3F, $07, $00, $00,_
$00, $00, $10, $79, $7F, $DE, $CC, $80, $00, $00, $00, $00, $00, $00, $00, $01,_
$01, $0F, $3C, $78, $00, $04, $09, $0F, $07, $02, $03, $83, $E7, $FF, $BF, $02,_
$00, $00, $00, $E0, $C4, $8E, $8F, $03, $00, $01, $0F, $1F, $3F, $FD, $FF, $FC,_
$F8, $F1, $F1, $FF, $F3, $E1, $C0, $80, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $80, $40, $20, $10, $08, $86, $C2, $41,_
$26, $F3, $31, $31, $18, $08, $0E, $67, $C3, $01, $01, $00, $80, $80, $00, $00,_
$00, $00, $00, $00, $00, $00, $18, $3E, $7F, $1E, $18, $10, $10, $00, $00, $00,_
$00, $00, $30, $FC, $FE, $D7, $03, $00, $00, $00, $10, $18, $18, $30, $3C, $1C,_
$1C, $27, $03, $00, $00, $00, $00, $00, $04, $04, $0D, $0D, $1D, $1B, $1B, $33,_
$36, $6E, $2E, $1C, $1C, $18, $31, $31, $27, $0C, $00, $00, $80, $81, $03, $07,_
$07, $07, $0F, $0F, $07, $17, $2F, $0E, $CE, $0E, $4C, $1C, $48, $10, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $01, $08, $1E, $0E, $07, $39, $78, $9C,_
$8F, $83, $80, $00, $00, $00, $00, $00, $01, $1F, $FE, $FC, $C0, $81, $03, $07,_
$0E, $1E, $3C, $7C, $78, $60, $E0, $C0, $C0, $C0, $C0, $E0, $60, $E0, $E0, $F2,_
$F2, $F3, $D3, $D1, $F9, $E8, $E8, $68, $6C, $64, $64, $64, $22, $22, $22, $02,_
$02, $02, $80, $80, $80, $C0, $C0, $E0, $E0, $20, $20, $10, $00, $00, $20, $00,_
$10, $00, $00, $08, $04, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $02,_
$02, $04, $04, $04, $04, $04, $04, $04, $02, $02, $03, $01, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $01, $01, $01, $02, $02, $02, $04, $04, $07, $07, $0F, $08, $08,_
$08, $08, $18, $10, $10, $10, $10, $10, $10, $00, $10, $20, $21, $20, $00, $20,_
$20, $21, $20, $20, $30, $30, $38, $28, $28, $28, $2C, $3C, $34, $3C, $3A, $3C,_
$3E, $0E, $1F, $1F, $17, $13, $13, $09, $08, $08, $0C, $02, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub eep_loop
next
toggle PORTA.0
PAUSE 10000
GOTO MAIN
eep_loop:
I2CWRITE sda,scl,ctl,addr,[in_byte]
pause 10
addr=addr+1
RETURN
END
Citanje slike i prikaz na GLCD displayu,jedna slike se nalazi u procesoru ,a 4 slike u memoriji 24c64
Code: Select all
'PIC18F452
DEFINE OSC 4 'OSC speed, you may have to tweak the 'strobe'
'routine's e_pause constant for other speeds
ADCON1 = 7 'Make all pins digital, you may adjust as needed
dat VAR PORTD 'LCD bus Pins 7-14 LSB-MSB
scl VAR PORTC.3 'I2C SCL for ext eeprom
sda VAR PORTC.4 'I2C SDA for ext eeprom
e VAR PORTB.4 'Enable pin on LCD
cd VAR PORTB.2 'Data/Command Pin 4 on LCD
rw VAR PORTB.3 'Read/Write Pin 5 on LCD
cs1 VAR PORTB.0 'ChipSelect1 Pin 15 on LCD
cs2 VAR PORTB.1 'ChipSelect2 Pin 16 on LCD
rst VAR PORTB.5 'Reset Pin 17 on LCD
'Set pins for output
TRISB.0 = 0 'CS1
TRISB.1 = 0 'CS2
TRISD = 0 'DATA PORT
TRISB.4 = 0 'ENABLE
TRISB.3 = 0 'RW
TRISB.2 = 0 'DATA COMAND
TRISC.3 = 0 'SCL
TRISC.4 = 0 'SDA
TRISB.5 = 0 'RESET
'Constants used
ctl CON $A0 'EEprom control code
row CON $b8 'LCD page 0
last_row CON $bf 'LCD page 7
col CON $40 'Line byte position 0
last_col CON 63 'Last column (1-64)
first_col CON 0 'First column
max_col CON 128 'Last column (1-127)
max_line CON 8 'Line 8 (based on 1-8)
max_pos CON 64 'Column 64 positon per side (1-64)
disp_on CON $3f 'LCD Display ON
disp_off CON $3e 'LCD Display OFF
disp_ram CON $c0 'Ram Display 0 (Page 0 at top of display)
blank CON $00 'Blank character
e_pause CON 10 'Pauseus 6 for Strobe routine
'Word variables used
eepaddr VAR WORD
addr VAR WORD
'Arrays used
in_array VAR byte[64]
in_ctl VAR byte[8]
'Byte Variables used
buf_cnt VAR BYTE 'buffer counter
byte_pos VAR BYTE 'To keep track of a byte's position
in_byte VAR BYTE 'The incoming byte
index VAR BYTE 'Index for arrays
j VAR BYTE 'General counter
k VAR BYTE 'General counter
line VAR BYTE 'An LCD row
delay VAR BYTE 'Execution delay, used with 'pause'
'Initialize variables
byte_pos = 0
delay = 10
in_byte = 0
index = 0
'Reset LCD
dat = 0 ' Clear PORTD
cd = 0
rw = 0
e = 0
cs1 = 0
cs2 = 1
rst = 1
pause 100 'Let things stabilize
rst = 0
pause 10 ' Reset LCD
rst = 1
pause 500
'Jump over subroutines to main program
goto main
' **** (GO)SUB ROUTINES ****
strobe:
e = 1
pauseus e_pause
e = 0
return
clearall:
cd = 0 ' Command mode
dat = disp_off ' Display Off
gosub strobe
cs1=0
cs2=1
for index = 1 to 2
for j = row to last_row
cd = 0 'Command mode
gosub strobe ' Write the data
dat = col ' Column address = 0
gosub strobe
dat = j
gosub strobe
cd = 1 ' Write mode
for k = first_col to last_col
dat = blank
gosub strobe
next
next
swap cs1,cs2
next
cs1=1
cs2=0
cd=0
dat=row
gosub strobe
dat = disp_ram ' Ram Line 0
gosub strobe
dat=col
gosub strobe
dat = disp_on 'display on
gosub strobe
cs1=0
cs2=1
dat=row
gosub strobe
dat = disp_ram ' Ram Line 0
gosub strobe
dat=col
gosub strobe
dat = disp_on 'display on
gosub strobe
cd = 1 ' Set Data command
cs1 = 0 ' Left side active
cs2 = 1
return
init: 'Initialization
cd = 0 ' Set command mode
cs1 = 0 ' Left Side on
cs2 = 1 ' Right Side off
for index = 1 to 2
dat = disp_off ' Display Off
dat = disp_ram ' Ram Line 0
gosub strobe ' Write the data
dat = col ' Y address = 0
gosub strobe
dat = row ' Page = 0
gosub strobe
dat = disp_on ' Display On
gosub strobe
swap cs1,cs2
next
cs1=0
cs2=1
return
'****Place char on LCD Routine *****
'Place byte of data on lcd assumes in_byte, byte_pos and line (line)
'Char position on LCD byte_pos = 0-127 (Horiz), ROW 0-7 (vert)
putbyte:
dat = in_byte 'Display the byte
gosub strobe
byte_pos=byte_pos+1 'Increment position
'Now do some LCD house cleaning and adjust counters
if byte_pos=max_pos then
cs1=1
cs2=0
cd = 0
dat = col
gosub strobe
dat = disp_ram
gosub strobe
dat = row + line
gosub strobe
cd = 1
endif
if byte_pos = max_col then 'Check if
line = line + 1 'New Line
if line = max_line then
line = 0
endif
byte_pos = 0 'Reset byte_pos
cs1=0
cs2=1
cd = 0
dat=col
gosub strobe
dat = row + line
gosub strobe
dat = disp_ram
gosub strobe
cd =1
endif
return
'===============================
' **** BEGIN MAIN PROGRAM ******
'===============================
main:
gosub init ' Initialize LCD
gosub clearall ' Clear all pages
byte_pos = 0
line = 0
gosub lookup_img
pause 10000
gosub logo
goto MAIN
'***********************************************************************************************
logo:
gosub init ' Initialize LCD
gosub clearall ' Clear all pages
byte_pos=0
line =0
for addr = 0 to 4096 '8192
I2CREAD sda,scl,ctl,addr,[in_byte]
gosub putbyte
if (addr=1024) OR (addr=2048) OR (addr= 3072)then ' OR (addr=4096) OR (addr=5120) OR (addr=6144) _
'OR (addr=7168) OR (addr=8192)
pause 4000
gosub init
gosub clearall
endif
next
pause 4000
gosub init
gosub clearall
goto main
'******************************************************************************
eep_loop:
I2CWRITE sda,scl,ctl,addr,[in_byte]
pause 5
addr=addr+1
goto eep_loop
'0 to 255 bytes
lookup_img:
for k = 0 to 255
lookup k,[_
$00, $00, $F8, $04, $04, $24, $E0, $00, $FC, $00, $00, $00, $E8, $00, $00, $FC,_
$44, $44, $38, $00, $04, $FC, $04, $00, $00, $F8, $04, $04, $04, $88, $00, $00,_
$00, $00, $00, $C0, $E0, $F0, $A8, $F4, $E2, $32, $84, $1F, $97, $A1, $00, $02,_
$32, $3C, $34, $08, $08, $18, $78, $60, $40, $80, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $F0, $08, $64, $94, $94, $04, $08, $F0, $00, $00, $F0,_
$08, $08, $08, $90, $00, $00, $F0, $08, $08, $08, $F0, $00, $00, $F8, $10, $20,_
$20, $10, $F8, $00, $F8, $48, $48, $48, $30, $00, $90, $28, $48, $90, $00, $E0,_
$00, $00, $E0, $00, $60, $50, $D0, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $01, $01, $01, $01, $00, $01, $01, $01, $00, $01, $00, $00, $01,_
$00, $00, $00, $00, $01, $01, $01, $00, $00, $00, $01, $01, $01, $00, $C0, $F0,_
$F8, $FC, $7F, $F7, $7F, $78, $B8, $C3, $73, $F3, $F3, $F3, $6B, $7B, $7C, $40,_
$00, $00, $00, $04, $04, $74, $AC, $C2, $01, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $01, $02, $02, $02, $02, $01, $00, $00, $00, $00,_
$01, $01, $01, $00, $00, $00, $00, $01, $01, $01, $00, $00, $00, $01, $00, $40,_
$40, $40, $41, $80, $01, $80, $40, $40, $40, $80, $00, $81, $41, $40, $40, $84,_
$09, $49, $47, $40, $41, $81, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub putbyte
next k
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $7F,_
$F7, $BF, $FF, $FF, $F7, $F7, $3F, $0F, $0E, $07, $07, $06, $06, $06, $08, $0C,_
$18, $18, $70, $C0, $20, $40, $41, $03, $CF, $FE, $8C, $08, $10, $F0, $60, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $0C,_
$0A, $0B, $09, $08, $00, $07, $08, $08, $08, $07, $00, $07, $08, $08, $08, $07,_
$00, $0C, $0A, $0B, $09, $08, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $C1, $71, $1D, $07, $00, $00, $00, $80, $C0, $C0, $F0, $F8, $FC, $EC, $E4,_
$E0, $F0, $D0, $CF, $C7, $C0, $C0, $40, $60, $30, $FD, $06, $03, $01, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $80, $40, $40, $20, $20,_
$10, $10, $18, $08, $04, $04, $04, $04, $04, $04, $08, $18, $30, $60, $80, $40,_
$20, $20, $20, $40, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00],in_byte
gosub putbyte
next k
for k = 0 to 255
lookup k,[_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $C0, $40, $10, $08, $04,_
$03, $01, $80, $E0, $10, $08, $04, $02, $01, $01, $03, $0F, $0F, $FF, $FF, $7F,_
$FF, $C7, $87, $03, $13, $11, $00, $08, $14, $0E, $0B, $0C, $04, $04, $08, $80,_
$C0, $70, $28, $18, $18, $0C, $04, $02, $02, $01, $01, $00, $00, $00, $00, $00,_
$00, $80, $C0, $E0, $F0, $F0, $F8, $E0, $C0, $00, $00, $00, $00, $00, $00, $03,_
$02, $0C, $10, $20, $40, $81, $02, $04, $08, $10, $30, $20, $C0, $80, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $C0, $F0, $1C, $07, $00, $00, $80, $C0, $60,_
$10, $0C, $07, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $07, $3C,_
$7D, $FF, $3F, $7E, $E0, $88, $98, $04, $8C, $66, $F6, $1E, $03, $01, $01, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $80, $40, $60, $30, $18, $0E,_
$0F, $07, $07, $03, $03, $01, $01, $01, $00, $01, $02, $04, $08, $08, $10, $20,_
$40, $40, $00, $00, $00, $01, $03, $04, $08, $30, $40, $40, $80, $81, $01, $02,_
$04, $08, $10, $20, $40, $40, $80, $00, $00, $00, $00, $00, $00, $00, $00, $00_
],in_byte
gosub putbyte
next k
for k = 0 to 255
lookup k,[_
$40, $C0, $C0, $C0, $80, $A0, $C0, $C0, $C0, $C0, $C0, $C0, $E0, $E0, $20, $A0,_
$A0, $90, $10, $10, $30, $18, $0E, $87, $C0, $70, $38, $0E, $03, $01, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $20, $00, $00, $00, $28, $28, $28, $28, $38,_
$A8, $F9, $BB, $AF, $EF, $FB, $F3, $FF, $FD, $FC, $FF, $DC, $F0, $E0, $E0, $E0,_
$C0, $E0, $E0, $E0, $F0, $F0, $E8, $E4, $E0, $F2, $E1, $E8, $F8, $F8, $F8, $E8,_
$F8, $F8, $F8, $E8, $E8, $E0, $E0, $E8, $C0, $C0, $C0, $E0, $E0, $C0, $C0, $C0,_
$C0, $C0, $C0, $40, $01, $02, $00, $04, $08, $10, $E0, $C0, $C1, $63, $63, $36,_
$1A, $10, $14, $28, $48, $90, $F0, $31, $3B, $8E, $04, $04, $08, $10, $00, $00,_
$02, $02, $03, $03, $01, $07, $07, $07, $07, $07, $0F, $0F, $0F, $0F, $0F, $0F,_
$0F, $0F, $0F, $0F, $07, $07, $07, $07, $07, $07, $07, $07, $03, $02, $00, $00,_
$00, $00, $00, $00, $00, $00, $00, $00, $06, $04, $04, $05, $05, $05, $05, $05,_
$07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07, $07,_
$07, $07, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03,_
$03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $03, $01,_
$01, $01, $01, $08, $08, $0C, $0C, $0C, $1C, $1C, $1C, $1F, $38, $3B, $3A, $3A,_
$78, $78, $78, $70, $70, $74, $71, $31, $3E, $7E, $7E, $7E, $3E, $3E, $00, $00_
],in_byte
gosub putbyte
next k
return
'*********** E N D ************
end