Hi out there...
I have something to ask about my programming stuff. Currently i am using visual basic 6.0 to do my programming.
What i want is like that:
Base on an ASCII character, my program will able to find the pattern that represent the character and display it on the dot matrix array.
How am i going to store all the patterns for each of the ASCII character? :?:
Eg. for the character 'A', the equivalent display pattern is [c1,b7,77,b7,c1].
*Note: all display pattern is in hex.
How am i going to retreive the pattern for each ASCII character? :?:
Eg. for the character 'A', the display pattern [c1,b7,77,b7,c1] will be send out to the dot matrix array.
declare an array of 8 bytes to be a character pattern, then declare an array of 128 (or 256, depending on your need) character patterns.
By the way, this array is already in the system bios, 400h bytes starting at FFA6E, for the first 128 ASCII characters. The values are a bit different though, an A is, starting at FFC76 ( FFA6E + 8*41h )
38, 6e, c6, c6, fe, c6, c6, 00
Sorry, the PC's built in character pattern is an 8X8 dot matrix, and I don't think there is any way to modify it for your use.
You would need to declare an array of 5 bytes to be your character pattern and then initialize the array of 128 (or however many you need) character patterns by hand.
Dim pattern_array( 0 TO 127 , 1 TO 5 ) as byte
initialize pattern_array
then pattern_array( CByte 'A', i) gives the i'th byte required to make the character A
I haven't used Visual Basic in a while, so i probably have the syntax all wrong.
Thanks..
Can you show me how to initialise a double dimensional array?
How to put [c1,b7,77,b7,c1] in the array?
Somemore, i need to ask you something about how to convert a string type to a hex type.
Eg. how to convert a character 'A' to to hex type, which holds the value of 1010??