Hi Eric,
It's not a matter of speed, it's a matter of been able to draw graphics - as you can't read from the screen you can't draw a line (or any other shape) on the screen without it wiping out an 8 bit high area across the display. By using aRAM buffer, you can write the line to the buffer, which as you can read it you can avoid over writing existing data, and then refresh the entire screen from the buffer.
I've been playing with the 16F1827 version more today, and I've got the hardware working again (at LAST!!) - I knew it'd be something stupid, and I had CKE set the wrong way
Here's a routine for drawing a horizontal line on the 5110, using a screen buffer, and the routine which copies it to the screen. You draw whatever you want to the buffer, then call Nokia_Update() to display it. If you're just displaying text, and you're not concerned with upsetting what's already on the screen, then there's no need to buffer.
Code:
void Nokia_ClrHLine(int x, int y, int l)
{
int by, bi, cx;
if ((x>=0) & (x<84) & (y>=0) & (y<48))
{
for (cx=0; cx<l; cx++)
{
by=((y/8)*84)+x;
bi=y % 8;
scrbuf[by+cx] &= ~(1<<bi);
}
}
}
void Nokia_Update()
{
unsigned int b;
if (_sleep==FALSE)
{
Nokia_WriteCmd(PCD8544_SETYADDR);
Nokia_WriteCmd(PCD8544_SETXADDR);
for (b=0; b<504; b++)
Nokia_WriteData(scrbuf[b]);
}
}