I finally implemented the "methods and apparatus" from my previous log into reality. It was a bit more "code expensive" than I anticipated due to fact the LCD is divided into two halves with two separate enable pins, what is a bit of PITA if you are trying to squeeze it into as small space as possible.
Nonetheless it works and now my BF interpreter uses really only 1kB of ROM (FLASH, EEPROM, whatever) along MCU and all its peripherals.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
How fast does it execute BF?
Are you sure? yes | no
The interpreter isn't optimized for speed very much, I tried to get minimal FLASH footprint.
When running at 16MHz (=4MIPS) iIt takes a few microseconds (~5) to execute average BF instruction. Every 16,384ms the BF execution is stopped to check keys, perform editor tasks and refresh display - that takes approximately 3ms. So, the BF interpreter runs at ~200 thousand BF IPS with 3/16,4 interrupt ratio, giving performance approximately 160kBFIPS.
Note you can roughly quadruple the performance by enabling PLL and running the MCU at 64MHz, giving 16MIPS and something like 650kBFIPS.
I didn't bother though - (the LCD routines would need longer wait routines to cope with faster MCU, increasing FLASH consumption) as the execution speed seems to be OK-ish for short programs expected to be typed via the spartan UI.
Are you sure? yes | no