I've been working with this LCD, and it almost works. I have difficulty with the screen clearing when it should not, and with what seems like mis-interpretted commands, especially line-drawing end points.
I see that there was a code re-write, but I ordered this after the code was changed, and the SparkFun site assures purchasers that recent devices (such as mine) have the new code.
So, looking at the code, I see problems. I am not new to firmware, although I am new to the AVR processors.
For instance, in the code snippet:
else if (RX_array[RX_read] == 12)//^l
{
//need 5 bytes
for (y = 0; y < 5; y++)
{
RX_read++;
if(RX_read >= 416) RX_read = 0;
while(RX_in == RX_read);//wait for byte
}
line(RX_array[RX_read], RX_array[RX_read-4], RX_array[RX_read-3], RX_array[RX_read-2], RX_array[RX_read+-1]);
RX_read++;
if(RX_read >= 416) RX_read = 0;
}
Notice that the RX_read index is allowed to wrap to zero, BUT there are two problems:
- the interrupt layer code assures us that we will never wrap the buffer while in a command, thus it should not be necessary to wrap to zero, and
- if we ever did wrap to zero, the code that follows which access at negative offsets from RX_read will read bogus data.
I guess I'll need to fix some of these problems, since I want to have reliable use of the display. Maybe I'll implement X_ON/X_OFF at the same time to better manage timing.
The question is, what tools (hopefully FREE) do I need to build, compile, and flash this code? The serial backpack has a 6 pin header (unpopulated), which looks to be the ISP connector. What would I need for a compiler/linker/assembler/loader/programmer? I have the Arduino development environment for "sketches", but nothing else for AVR.
-- Carl