SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By s_ridenour
#122311
Last week I bought one of the Serial Enabled LCD Kits (don't have enough free pins to hook up an LCD directly), LCD-10097.

It works pretty well and I'm generally pretty happy with it, except that the firmware has no method to upload custom characters to the LCD, at least nothing documented on the GitHub page or that I could find by searching here.

So I added it to the firmware myself. I didn't feel like paying GitHub just to put my updated firmware on there, so instead I'm posting it here, in case anybody else wants it.

The updated firmware has two changes:
1)It allows you to send over up to 8 custom 5x8 characters. Send 0xFE to put it in special command mode, then 0x64, then the character you want to upload (0-7), then 8 bytes that make up the character bitmap. After that you can print those characters (Serial.print(0x00, BYTE) or whatever). Since the characters are 5x8, only the 5 least significant bits are displayed.
2)The splash screen has been updated to be more helpful. It still shows the SparkFun message, but only for 1 second, then it shows the baud rate setting from EEPROM (4 = 9600, etc.) for 1 second.

You'll need either an FTDI Basic or an ISP programmer (USBtinyISP, etc.) to update the firmware. The SparkFun product page I linked to above has some info about this. Basically you just connect the FTDI Basic and then set the board to "Arduino Duemilanove or Nano w/ATmega328" in the Arduino IDE.
You do not have the required permissions to view the files attached to this post.
Last edited by s_ridenour on Wed Mar 09, 2011 12:22 pm, edited 1 time in total.
By s_ridenour
#122360
Here's a screenshot of the custom character code in action:
Image

Here's some example code:
Code: Select all
// Only the 5 least significant bits are used, the 3 upper bits are ignored
uint8_t sf_flame[8] = {
	0b00000110,
	0b00001100,
	0b00001101,
	0b00000111,
	0b00010011,
	0b00011111,
	0b00011110,
	0b00011100
};

...

Serial.print(0xFE, BYTE);	// Special command
Serial.print(0x64, BYTE);	// Custom character command
Serial.print(0x00, BYTE);	// Custom character 0 (LCD's CGRAM address 0)
for(int i = 0; i < 8; i++) {	// Send it over one byte at a time
	Serial.print(sf_flame[i], BYTE);
}

...

// Now to show it, we just print ASCII 0 (ASCII 0 = custom char. 0, ASCII 1 = custom char. 1, etc.)
Serial.print(0x00, BYTE);
Pardon my crude version of the SparkFun flame :)
Also my really messy soldering :)
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]