Here is a demo of some graphics manipulation (Sprites?) on a 16x2 LCD & 20x2 OLED displays using the standard HD44780 equivalent interface (4 bit mode).
The brain is an 8bit Atmel ATmega88 running at 2 MHz.
It's based on a program I wrote like a billion years ago on 8051, 2 balls bouncing off edges but not interacting. When playing with PIC's a few years later I never bothered to port it because it reeked of effort. Anyhow after moving onto AVR I wrote another version about 3 years ago.
The interesting thing about that later version (and the current) is that in theory only 2 balls should be able to be displayed reliably because the HD44780 has only 8 user definable characters and it would take all 8 to display 2 balls in the worst possible configuration (Ball's at junction of 4 characters), anyhow because of the flexibility of this AVR version I could easily add more balls, I think it can be pushed to 6 balls without appreciable artefacts on a 2x16 but I don't recall all the facts (A persistence of vision thing).
Anyhow this final version adds ball interaction using polar coordinates and vectors and CORDIC to calculate Sin Cos in realtime.
One of the more useful web pages I used to get the bouncing working was:
[ Ссылка ]
IXIBA
Ещё видео!