I don't have a nokia display so I can't really try any of this.
you have not shown how u modified the macro
Code:'for @ printstr Addr VAR WORD 'Char VAR byte ' lcdchardata[0] [WJS] as it was Char VAR word ' lcdchardata[0] [WJS] now for modification StringOut: ' Edits for 16F devices. Readcode Addr, Char ' Get a character if Char = 0 then StringDone ' Look for Null char, Stop if found will not work as intended since either the high byte or the low byte could be a null not necessarily both packedbit = char.7 ' Store bit 7 value of low byte char.lowbyte = char.lowbyte&127 ' Bitwise And (&) the low byte with 127 Char.highbyte = (Char.highbyte <<1) ' left shift the high byte 1 digit (multiplying by 2n) if packedbit <> 0 then Char.highbyte = Char.highbyte+1 endif Gosub Lcd_GotoXY Lcd_Data = Char gosub Lcd_SendChar ' puttext Addr = Addr + 1 ' Point to next character the address would now need to incremented by 2 and when did you send the highbyte to the screen ? PosX = PosX + 6 if PosX > 78 then ' If end of line, cycle to next line PosY = PosY + 1 PosX = 0 endif goto StringOut ' Continue with rest of the string
if codespace is a big issue then
Lcd_SendChar:
lookdown Lcd_data,_
[" !\#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"],CharNum
Lcd_data = CharNum +32
wastes 117 words of code space for no appreciable reason
SELECT CASE lcd_data
Case 32
FC(0)=$00:FC(1)=$00:FC(2)=$00:FC(3)=$00:FC(4)=$00 ' // sp
Case 33
FC(0)=$00:FC(1)=$00:FC(2)=$2f:FC(3)=$00:FC(4)=$00 ' // !
Case 34
FC(0)=$00:FC(1)=$07:FC(2)=$00:FC(3)=$07:FC(4)=$00 ' // " (shown as \ in Lookdown table)
.......................
manages to use 1662 words of code space to store 235 words of data, it could be far more efficient
see http://www.picbasic.co.uk/forum/showthread.php?t=23758
where I use a 7x8 font that is stored as a packed 14bit array for pic16 chips , the posted code has routines to unpack the font
Bookmarks