USB Gizmo (2) - LED bargraph scrolling message

I have actually built a display drive circuit, using 74hc595 serial buffers, and 5x digital MOSFETs.

Most of the electrical connections are now made. A 12 MHz crystal was added! There is very little space remaining on the board.

The 18f13k50 only has 8K memory (4096 program words). Normally more than 6K are used up by the USB stack. I managed to reduce it by nearly 1000 bytes! And also the RAM usage was reduced. After all, I only need to transmit a small amount of data. The extra space is needed to add font data!

This font data was entered specially for this chip, using 16bits for 2 data bytes, and in a format so it does not need to be rotated for displaying. Even so, 2K program space is not much to implement the scrolling algorithm, and the USB transmission code (the message will be stored inside the EEPROM- 256 bytes).

Using the USB stack like it is, only about 90 bytes are remaining. There is more space available, but somehow it can not be used freely. I changed the USB buffer only to use 8 bytes. After that, recompilation of the Windows side software was neccessary. Downloaded the driver developement kit...

I have some of these 18F13k50 around here but never really built anything with them, except a LED dot matrix clock (in assembler). This is not so much maintainable of course... Eventually I should modify this circuit too, so it can synchronize using USB.

The memory of the 18f13k50 is very small, the 18f14k50 has double FLASH memory, and 256 extra bytes RAM. Back then some years ago, I used assembler, and I really believed it is important to save memory space.

Actually I modified the USB stack a little, since some of the code using array access is repeating a few times, and it needs about 50 bytes each time.

Today I have built up most of the font table, entering about 2560 individual 1's and 0's. There are about 20% left to do, as well some additional wires are required.

1574646785395.png

1574646792415.png

Blog entry information

Author
takao21203
Views
755
Last update

More entries in General

More entries from takao21203

Share this entry

Top