开发者

How to make a scroller on a micro-processor/-controller?

I would like to write a text scroller on a micro-processor with 4 5x7 displays in ANSI-C.

Does anyone know of example source code or anything that can help me get started?

Update

This is the user manual for the micro-processor board I have. On PDF page 17 is a picture of the board with the displays.

开发者_运维百科

The code is written in an IDE called "zds2_Z8Encore493.exe" and then flashed to the micro-controller over serial port.

I would like the text to cascade from one to the next to the next column-by-column, so it is smooth.


There may be a better way, but I would store the text in a block of RAM, and in the routines that update the displays I would include a value to offset the starting point, possibly with a wrap-around to the start. The you store a counter which increments the "global" offset (scrolling).

You can then use string[offset + display-width + scroll_position] as the start pointer, but you need to detect the end and wrap round or just stop.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜