4x20 display sample code
Aaron Wall
Posts: 31
Does any one have a sample program with a stamp controlling the 4x20 display in the Accessory page? I learn much better by tinkering with code than reading through the manual.
Thanks,
Aaron
Thanks,
Aaron
Comments
The BS1/2 .zip file contains several files of sample code. In addition, the .pdf has useful little code snippets - all I needed to figure the thing out - plus links to sample code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
I did not buy mine from Parallax, but it is a serial 4X20 LCD with keypad conrtoller built in so the code should work.
If you have any questions, let me know.
I have used some of your example code for the subject backpack, and it was very helpful.
One thing I have not been able to get to work is custom characters. I've tried every combination I can think of, but no success. A line or two of sample code would be appreciated.
That is a great backpack, by the way. I found it very easy to use.
Thanks. . . .
Ken
Here's an excerpt from my manual.
Load Custom Characters
Syntax hexadecimal 0xFE 0x1A [noparse][[/noparse]addr][noparse][[/noparse]d0 … d7]
Parameter Length Description
[noparse][[/noparse]addr][noparse][[/noparse]d0 … d7] 9 bytes Load custom characters,
[noparse][[/noparse]addr] 1 byte – custom character address from 0 to 7,
[noparse][[/noparse]d0 … d7] 8 bytes – custom character pattern bit map
14
Description: LCD module has space for 8 custom characters. Each custom character is 5 pixels
wide by 8 pixels high.
The [noparse][[/noparse]addr] parameter indicates which custom character is defining, and must have a value from 0
to 7.
Following the [noparse][[/noparse]addr] parameter are 8 bytes that define the custom character. Bits 0 to 4 each byte
byte will each define a pixel character.
Example: The bit map for character ‘X’.
Bit 7 6 5 4 3 2 1 0 Hex
Byte 1 0 0 0 1 0 0 0 1 0x11
Byte 2 0 0 0 0 1 0 1 0 0x0A
Byte 3 0 0 0 0 0 1 0 0 0x04
Byte 4 0 0 0 0 1 0 1 0 0x0A
Byte 5 0 0 0 1 0 0 0 1 0x11
Byte 6 0 0 0 0 0 0 0 0 0x00
Byte 7 0 0 0 0 0 0 0 0 0x00
Byte 8 0 0 0 0 0 0 0 0 0x00