ok i fixed it: I havent noticed on the manual the 0's i had to put in between the names of the fonts files .DAT $00 .GCI $00
Inside the uSD i have renamed the FONTs to FONT.DAT and FONT.GCI
HSEROUT2[$00,$09,"FONT.DAT",$00,"FONT.GCI",$00,$00,$01]
This is the code in PBP3:
My problem now is:
The main loop cannot display every time the text. I have put to clear the LCD, and ask to do the same text again and again. But it doent do it for the second time.
Anyway my problem regarding displaying the FONT from the uSD is solved.
Inside the uSD i have renamed the FONTs to FONT.DAT and FONT.GCI
HSEROUT2[$00,$09,"FONT.DAT",$00,"FONT.GCI",$00,$00,$01]
This is the code in PBP3:
Code:
main: pause 3000 high pwrled HSEROUT2 [$FF,$03] ' MOUNT FILE, this is very imporntat command in here. Hserin2 [wait(6),wait(21),wait(75)] 'this is the response from the LCD ACK 5451 or $154B Pause 100 HSEROUT2 [$FF,$00,$00,$46] ' SOUND VOLUME to 70 Hserin2 [wait(6)] Pause 100 HSEROUT2 [$00,$0B,"LASER2.WAV",$00] Hserin2 [wait(6),wait(0),wait(65)] ' this is the response from the LCD for the wav file $06 $00 $41 Pause 200 '-------------------------------------------------------------------------------| ' $46,$4f,$4e,$54,$2e,$44,$41,$54 = FONT.DAT (ASCII to HEX) ' $46,$4f,$4e,$54,$2e,$47,$43,$49 = FONT.GCI (ASCII to HEX) 'HSEROUT2[$00,$09,$46,$4f,$4e,$54,$2e,$44,$41,$54,$00,$46,$4f,$4e,$54,$2e,$47,$43,$49,$00,$00,$01] ' SPE serial graphic interface - CALL FONT from SD '-------------------------------------------------------------------------------| HSEROUT2[$00,$09,"FONT.DAT",$00,"FONT.GCI",$00,$00,$01] Hserin2 [wait(6)] Pause 200 HSEROUT2[$FF,$E5,$10,$fd] ' SPE serial graphic interface - SET FONT Hserin2 [wait(6),wait(0),wait(2)] pause 100 hserout2[$00,$18,"Leonardo",$00] 'SPE serial graphic interface - PUT STRING Hserin2 [wait(6)] Pause 2000 HSEROUT2 [$FF,$CD] ' clear the LCD Hserin2 [wait(6)] low pwrled goto main
The main loop cannot display every time the text. I have put to clear the LCD, and ask to do the same text again and again. But it doent do it for the second time.
Anyway my problem regarding displaying the FONT from the uSD is solved.
Code:
' -----------------------------------------------------------------------------|
' [ LCD Initialization ] |
'------------------------------------------------------------------------------|
' FIRST TIME BOOTUP: We give plenty of time for tbe LCD '
pause 3000
HSerout2[$FF,$9E,$00,$01] 'SPE serial graphic interface -SET THE LANDSCAPE R
Hserin2 [wait(6)]
HSEROUT2 [$FF,$03] ' MOUNT FILE, this is very imporntat command in here.
Hserin2 [wait(6),wait(21),wait(75)] 'this is the response from the LCD ACK 5451 or $154B
HSEROUT2[$00,$09,"FONT.DAT",$00,"FONT.GCI",$00,$00,$01]
Hserin2 [wait(6),wait(20),wait(28)]
'-------------------------------------------------------------------------------|
' $46,$4f,$4e,$54,$2e,$44,$41,$54 = FONT.DAT (ASCII to HEX)
' $46,$4f,$4e,$54,$2e,$47,$43,$49 = FONT.GCI (ASCII to HEX)
'HSEROUT2[$00,$09,$46,$4f,$4e,$54,$2e,$44,$41,$54,$00,$46,$4f,$4e,$54,$2e,$47,$43,$49,$00,$00,$01] ' SPE serial graphic interface - CALL FONT from SD
'-------------------------------------------------------------------------------|
main:
pause 1000
high pwrled
HSEROUT2 [$FF,$00,$00,$46] ' SOUND VOLUME to 70
Hserin2 [wait(6)]
HSEROUT2 [$00,$0B,"LASER2.WAV",$00]
Hserin2 [wait(6),wait(0),wait(65)] ' this is the response from the LCD for the wav file $06 $00 $41
pause 100
HSEROUT2[$FF,$E5,$14,$1C] ' SPE serial graphic interface - SET FONT
Hserin2 [wait(6),wait(0),wait(2)]
HSEROUT2[$FF,$E9,$00,$01,$00,$02] ' SPE serial graphic interface - SET Y,X position
Hserin2 [wait(6)]
hserout2[$00,$18,"Leonardo Bilalis",$00] 'SPE serial graphic interface - PUT STRING
Hserin2 [wait(6),wait(0),Wait(16)]
Pause 1000
HSEROUT2 [$FF,$CD] ' clear the LCD
Hserin2 [wait(6)]
low pwrled
goto main

Comment