all the magic is done with conditional formatting , a 1 in a field turns it black ,an empty field is blankMay I ask for that magic excel file please?
make sure no field is greater than 1 or the math is incorrect
complete number font
all the magic is done with conditional formatting , a 1 in a field turns it black ,an empty field is blankMay I ask for that magic excel file please?
make sure no field is greater than 1 or the math is incorrect
complete number font
Last edited by richard; - 29th May 2018 at 00:05.
Warning I'm not a teacher
Great work Richard, I hope Mike has success also we can learn from.
Speaking of... will there be a PBP version arriving anytime soon? Knowing zero languages other than PBP (and I'm still an infant here) I marvel at what you experts can achieve and am quite envious
Kind regards,
Bill
PS
no time at present to test your reply to my last problem, hopefully the weekend will allow.
don't hold your breath , since pbp has no pointer variable type its a bit tedious to codewill there be a PBP version arriving anytime soon?
maybe ART will grace us with some of his framebuffer code , I think a 504 byte buffer is not out of the question on a 16f1847and a driver that can use an hpos (0..83) and vpos (0..47) starting point for drawing characters.
Warning I'm not a teacher
latest iteration
frame buffer, bitmap graphics, left/right scrolling, text at any x,y offset
Warning I'm not a teacher
Nice work, Richard. Bravo!
I finally imported that Noritake 10x14 Font into Excel today. It took a bit of work. The Noritake Font file was 1920 separate "retlw 0x00" type lines. Not an ideal format for importing into Excel so I wrote a quick JustBASIC program to generate 96 lines with 10 comma separated words per line. After importing that file into Excel I discovered that Noritake maps the b15 bit to row 0 with the b0 bit all the way down at row 15 so I modified my JustBASIC program to exchange the bit order and finally got the Font into Excel. Whew!
If you need it, here's the converted "decimal" version of the Noritake 10x14 Font in CSV format for Excel;Code:' ' Noritake 10x14 Font Table Converter 30-May-2018, Mike McLaren ' ' Reads the 1920 line one-hex-byte-at-a-time Noritake Font file and ' reformats it as 96 lines (one line per character), 10-words-per-line, ' reversed bit order (row 0 = bit 0), and as CSV text for Excel import. ' Does not alter the source file. ' ' Instructions ' ' 1 - select the Noritake 10x14 text file from the File Dialog ' 2 - output text displayed in console window ' 3 - select text and copy to clipboard using <ctrl-C> or <edit> <copy> ' 4 - paste into your spreadsheet (use text import tool) ' ' JustBASIC v1.01 ' filedialog "Source File?", "*.txt", fileName$ ' output$ = "hex" ' select "dec" or "hex" if fileName$ <> "" then ' open fileName$ for input as #f ' while eof(#f) > -1 ' for asciichar = 32 to 127 ' 96 characters (32..127) for n = 1 to 10 ' 10 words per line ' ' read in an MSB and an LSB line (' retlw 0x00') and turn them into ' a single decimal or hexidecimal word ('0x0000' or '00000') with a comma ' delimiter for CSV (comma separated value) import into Excel. ' line input #f, aLine$: line input #f, bLine$ ' ' ' reverse bit order... Noritake uses row 0 = b15 but we want row 0 = b0 ' dec = hexdec(aLine$+right$(bLine$,2)) ' convert hex to decimal dec = xcgbits(dec) ' exchange bit order ' if (output$ = "dec") then ' if "dec" output if (dec < 10000) then print " "; ' print "dec" value if (dec < 1000) then print " "; ' " if (dec < 100) then print " "; ' " if (dec < 10) then print " "; ' " print dec; ' " else ' else print "0x"; ' print "hex" value print dechex$(dec); ' " end if ' print ", "; ' print separator if (n = 10) then ' if last word in line if (asciichar < 100) then print " "; ' print ascii, 32..127 print asciichar;: print " "; ' " print "'";:print chr$(asciichar);: print "'" ' print ascii character end if ' next n next asciichar ' next character line print ' wend close #f end if end ' ' Converts hexadecimal number (string) to decimal number. ' Processes the hex number from right to left, so any hex notation is allowed. ' Examples: &hFF = 0xFF = FF ' function hexdec(HexString$) Hex$ = "0123456789ABCDEF" power = 0 hexdec = 0 for i = len(HexString$) to 1 step -1 HexDigit$ = upper$(mid$(HexString$, i, 1)) ' ' exit at first non-hexadecimal digit ' if instr(Hex$, HexDigit$) = 0 then exit for hexdec = hexdec + ((instr(Hex$, HexDigit$) - 1) * (16^power)) power = power + 1 next end function ' ' convert decimal number to 4-digit hexidecimal string ' function dechex$(DecValue) Hex$ = "0123456789ABCDEF" dechex$ = "" for power = 3 to 0 step -1 digitndx = int(DecValue/16^power) DecValue = DecValue - digitndx*16^power dechex$ = dechex$ + mid$(Hex$,digitndx+1,1) next power end function ' ' exchange bit order b15<>b0, b14<>b1, b13<>b2, ... ' function xcgbits(decval) xcgbits = 0 newpwr = 0 for power = 15 to 0 step -1 if (decval >= 2^power) then decval = decval - 2^power xcgbits = xcgbits + 2^newpwr end if newpwr = newpwr + 1 next power end function
Code:0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32 ' ' 0, 0, 0, 0, 13311, 13311, 0, 0, 0, 0, 33 '!' 0, 0, 15, 15, 0, 0, 15, 15, 0, 0, 34 '"' 816, 816, 16383, 16383, 816, 816, 16383, 16383, 816, 816, 35 '#' 1584, 3704, 3324, 3276, 16383, 16383, 3276, 4044, 1948, 792, 36 '$' 6, 12303, 15375, 3846, 960, 240, 6204, 15375, 15363, 6144, 37 '%' 3900, 8190, 14531, 12771, 13299, 14139, 7710, 3084, 16128, 13056, 38 '&' 0, 0, 0, 34, 55, 31, 14, 0, 0, 0, 39 ''' 0, 0, 1008, 4092, 7710, 6150, 12291, 12291, 0, 0, 40 '(' 0, 0, 12291, 12291, 6150, 7710, 4092, 1008, 0, 0, 41 ')' 1584, 1904, 992, 448, 8188, 8188, 448, 992, 1904, 1584, 42 '*' 192, 192, 192, 192, 4092, 4092, 192, 192, 192, 192, 43 '+' 8704, 14080, 7936, 3584, 0, 0, 0, 0, 0, 0, 44 ',' 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 45 '-' 6144, 15360, 15360, 6144, 0, 0, 0, 0, 0, 0, 46 '.' 0, 12288, 15360, 3840, 960, 240, 60, 15, 3, 0, 47 '/' 4092, 8190, 16135, 13187, 12739, 12515, 12403, 14399, 8190, 4092, 48 '0' 0, 0, 12300, 12302, 16383, 16383, 12288, 12288, 0, 0, 49 '1' 12300, 14350, 15367, 15875, 14083, 13187, 12739, 12519, 12414, 12348, 50 '2' 3084, 7182, 14343, 12291, 12291, 12483, 12483, 14535, 8190, 3900, 51 '3' 960, 992, 880, 824, 796, 782, 16383, 16383, 768, 768, 52 '4' 3135, 7231, 14387, 12339, 12339, 12339, 12339, 14451, 8163, 4035, 53 '5' 4092, 8190, 14535, 12483, 12483, 12483, 12483, 14791, 8078, 3852, 54 '6' 3, 3, 3, 3, 16323, 16355, 115, 59, 31, 15, 55 '7' 3900, 8190, 14823, 12483, 12483, 12483, 12483, 14823, 8190, 3900, 56 '8' 60, 126, 12519, 12483, 14531, 7363, 3779, 2023, 1022, 508, 57 '9' 0, 0, 0, 1560, 3900, 3900, 1560, 0, 0, 0, 58 ':' 0, 0, 0, 8728, 14140, 7996, 3608, 0, 0, 0, 59 ';' 0, 192, 480, 1008, 1848, 3612, 7182, 14343, 12291, 0, 60 '<' 816, 816, 816, 816, 816, 816, 816, 816, 816, 816, 61 '=' 0, 12291, 14343, 7182, 3612, 1848, 1008, 480, 192, 0, 62 '>' 12, 14, 7, 3, 14211, 14275, 195, 103, 126, 60, 63 '?' 3852, 8078, 14791, 12483, 16323, 16323, 12291, 14343, 8190, 4092, 64 '@' 16380, 16382, 775, 771, 771, 771, 771, 775, 16382, 16380, 65 'A' 16383, 16383, 12483, 12483, 12483, 12483, 12483, 14823, 8190, 3900, 66 'B' 4092, 8190, 14343, 12291, 12291, 12291, 12291, 14343, 7182, 3084, 67 'C' 16383, 16383, 12291, 12291, 12291, 12291, 12291, 14343, 8190, 4092, 68 'D' 16383, 16383, 12483, 12483, 12483, 12483, 12483, 12483, 12291, 12291, 69 'E' 16383, 16383, 195, 195, 195, 195, 195, 195, 3, 3, 70 'F' 4092, 8190, 14343, 12291, 12291, 12483, 12483, 14535, 8142, 4044, 71 'G' 16383, 16383, 192, 192, 192, 192, 192, 192, 16383, 16383, 72 'H' 0, 0, 12291, 12291, 16383, 16383, 12291, 12291, 0, 0, 73 'I' 3072, 7168, 14339, 12291, 12291, 14339, 8191, 4095, 3, 3, 74 'J' 16383, 16383, 480, 480, 1008, 1848, 3612, 7182, 14343, 12291, 75 'K' 16383, 16383, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 76 'L' 16383, 16383, 14, 28, 248, 248, 28, 14, 16383, 16383, 77 'M' 16383, 16383, 56, 112, 224, 448, 896, 1792, 16383, 16383, 78 'N' 4092, 8190, 14343, 12291, 12291, 12291, 12291, 14343, 8190, 4092, 79 'O' 16383, 16383, 195, 195, 195, 195, 195, 231, 126, 60, 80 'P' 4092, 8190, 14343, 12291, 13059, 14083, 15875, 7175, 16382, 14332, 81 'Q' 16383, 16383, 195, 451, 451, 963, 963, 3815, 15486, 14396, 82 'R' 6204, 14462, 12519, 12483, 12483, 12483, 12483, 14787, 8071, 3846, 83 'S' 3, 3, 3, 3, 16383, 16383, 3, 3, 3, 3, 84 'T' 4095, 8191, 14336, 12288, 12288, 12288, 12288, 14336, 8191, 4095, 85 'U' 1023, 2047, 3584, 7168, 14336, 14336, 7168, 3584, 2047, 1023, 86 'V' 4095, 8191, 14336, 15360, 7936, 7936, 15360, 14336, 8191, 4095, 87 'W' 15375, 15903, 1848, 1008, 480, 480, 1008, 1848, 15903, 15375, 88 'X' 63, 127, 224, 448, 16256, 16256, 448, 224, 127, 63, 89 'Y' 15363, 15875, 14083, 13187, 12739, 12515, 12403, 12347, 12319, 12303, 90 'Z' 0, 0, 16383, 16383, 12291, 12291, 12291, 0, 0, 0, 91 '[' 12, 12, 48, 48, 192, 192, 768, 768, 3072, 3072, 92 '\' 0, 0, 12291, 12291, 12291, 16383, 16383, 0, 0, 0, 93 ']' 48, 56, 28, 14, 7, 7, 14, 28, 56, 48, 94 '^' 12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 12288, 95 '_' 0, 0, 3, 7, 14, 28, 24, 0, 0, 0, 96 '`' 3072, 7776, 16240, 13104, 13104, 13104, 13104, 13168, 16352, 8128, 97 'a' 16383, 16383, 12480, 12480, 12480, 12480, 12480, 14784, 8064, 3840, 98 'b' 4032, 8160, 14448, 12336, 12336, 12336, 12336, 14448, 7392, 3264, 99 'c' 3840, 8064, 14784, 12480, 12480, 12480, 12480, 12480, 16383, 16383, 100 'd' 4032, 8160, 15216, 13104, 13104, 13104, 13104, 15216, 7136, 2496, 101 'e' 0, 192, 16380, 16382, 199, 199, 14, 12, 0, 0, 102 'f' 6336, 14816, 13296, 13104, 13104, 13104, 13104, 15152, 8176, 4064, 103 'g' 16383, 16383, 192, 192, 192, 192, 448, 16256, 16128, 0, 104 'h' 0, 0, 0, 0, 16344, 16344, 0, 0, 0, 0, 105 'i' 0, 3072, 7168, 14336, 12288, 12288, 14336, 8179, 4083, 0, 106 'j' 0, 16383, 16383, 1792, 1920, 4032, 7392, 14448, 12336, 0, 107 'k' 0, 0, 12291, 12291, 16383, 16383, 12288, 12288, 0, 0, 108 'l' 16368, 16368, 112, 224, 960, 960, 224, 112, 16368, 16368, 109 'm' 16368, 16368, 192, 224, 112, 48, 48, 112, 16352, 16320, 110 'n' 4032, 8160, 14448, 12336, 12336, 12336, 12336, 14448, 8160, 4032, 111 'o' 16368, 16368, 816, 816, 816, 816, 816, 1008, 480, 192, 112 'p' 192, 480, 1008, 816, 816, 816, 816, 816, 16368, 16368, 113 'q' 16368, 16368, 448, 224, 112, 48, 48, 112, 224, 192, 114 'r' 6336, 14816, 13296, 13104, 13104, 13104, 13104, 16176, 7792, 3168, 115 's' 0, 48, 48, 4095, 8191, 14384, 14384, 7216, 3120, 0, 116 't' 4080, 8176, 14336, 12288, 12288, 12288, 12288, 14336, 8176, 4080, 117 'u' 1008, 2032, 3584, 7168, 14336, 14336, 7168, 3584, 2032, 1008, 118 'v' 4080, 8176, 14336, 14336, 7936, 7936, 14336, 14336, 8176, 4080, 119 'w' 12336, 14448, 7392, 4032, 1920, 1920, 4032, 7392, 14448, 12336, 120 'x' 48, 112, 12512, 14784, 8064, 3968, 448, 224, 112, 48, 121 'y' 12336, 14384, 15408, 15920, 14128, 13232, 12784, 12528, 12400, 12336, 122 'z' 0, 192, 480, 4092, 7998, 14343, 12291, 12291, 12291, 0, 123 '{' 12480, 12480, 16380, 16382, 12487, 12483, 12291, 12295, 12302, 12300, 124 '|' 0, 12291, 12291, 12291, 14343, 7998, 4092, 480, 192, 0, 125 '}' 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 126 '~' 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 127 ''
Last edited by Mike, K8LH; - 31st May 2018 at 02:47.
Richard, here's something fun... Someone over on the MrExcel forum helped me with a VBA macro that allows you to toggle the value in a cell within your 10x16 matrix between "null" and "1" by simply clicking on it. The attached file is your spreadsheet with macros enabled (xlsm rather than xlsx file extension). I'm not sure if you have to enable "developer" mode in Excel or not, but give it a try...
Cheerful regards, Mike
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'Modified 5/30/18 9:50 PM EDT If Not Intersect(Target, Range("B30:K45")) Is Nothing Then If Target.Cells.CountLarge > 1 Then Exit Sub If Target.Value = "1" Then Target.Value = "" Else Target.Value = "1" End If Range("b28").Select End If End Sub
Last edited by Mike, K8LH; - 31st May 2018 at 05:05.
thanks mike , its just whats needed and works perfectlty
Warning I'm not a teacher
Ok, I'm almost ready to play with real hardware. I located my old 5110 display and an old 5110 test board that I had started to assemble (below). It looks like I need to solder a few wires onto the 8-pin 5110 connector. Maybe I can get this up-n'-runnin' this weekend...
Are you running the PIC and 5110 display at 3.3 volts, Richard?
Last edited by Mike, K8LH; - 1st June 2018 at 14:31.
yes the contrast won't accommodate 5v for me.Are you running the PIC and 5110 display at 3.3 volts,
I still have a bug in the bitmap routine, but my eldest son is getting married tomorrow so I have to play
happy families
Warning I'm not a teacher
Bookmarks