Arduino Retro Computer with SD card and LCD

20,142

Circuit Image

A BASIC preprocessor has been developed using Python, enabling code writing without line numbers and allowing the use of labels. This preprocessor automatically assigns line numbers to the code and converts labels accordingly. An example of its application is demonstrated through the creation of an American Football BASIC game. Additionally, minor updates have been made to the firmware, which should be updated accordingly. On May 10, 2012, a bug was fixed that previously limited BASIC programs to 127 lines; the new limit is now 255 lines, with plans for further increases in the future. The AmericanFootball.BAS program has been tested successfully. Users are advised to update all files. A potential hack for connecting an SD card using a 5.25-inch floppy disk connector is mentioned, with a warning that the SD card library does not utilize a FAT file system, resulting in data loss on the SD card unless reformatted for PC use. It is noted that the LCD module used is rare; users with standard LCDs are encouraged to modify the driver and replace print2nl() and print2 with lcd.print and lcd.printnl, and to share their working sketches for inclusion in the project. The GOSUB command is designed to navigate to specified line numbers and return upon encountering a RETURN command, though there may be bugs to address. The SDmemBASIC.ino sketch should be uploaded to the Arduino. A terminal program such as Tera Term should be used for connection, with specific settings for character and line wait times. This version operates solely with the SD card and serial terminal, requiring no LCD screen. The BASIC programs are constrained by available RAM.

A BASIC preprocessor implemented in Python facilitates an enhanced programming experience by allowing users to write code without the necessity of line numbers, instead utilizing labels that the preprocessor automatically converts into corresponding line numbers. This functionality streamlines the coding process, making it more intuitive for users familiar with label-based programming. The preprocessor has been exemplified through the development of an American Football BASIC game, showcasing its practical application and providing a reference for users.

Recent updates to the firmware have addressed limitations in the previous version, notably increasing the maximum number of lines in a BASIC program from 127 to 255. This enhancement significantly expands the potential complexity of programs that can be created, with future updates planned to further increase this limit. The successful testing of the AmericanFootball.BAS program indicates the effectiveness of the preprocessor and the reliability of the firmware.

Users are cautioned regarding the integration of an SD card with a 5.25-inch floppy disk connector, as the SD card library does not support the FAT file system. This limitation poses a risk of data loss, necessitating reformatting of the SD card for compatibility with PC systems. Moreover, users employing standard LCD modules are advised to modify their implementations by replacing specific function calls to ensure compatibility with the preprocessor, thereby contributing to the collective improvement of the project through shared experiences and code.

The GOSUB command, which directs program flow to specified line numbers, is designed to return control to the subsequent line upon encountering a RETURN command. However, potential bugs in this feature have been acknowledged, with ongoing efforts to resolve these issues. The SDmemBASIC.ino sketch serves as the primary codebase for Arduino users, who can connect via a terminal program such as Tera Term, with specific settings recommended for optimal performance. This version of the BASIC interpreter operates without the need for an LCD screen, relying solely on the SD card and serial communication, while the limitations imposed by RAM dictate the complexity of the BASIC programs that can be executed.Added a BASIC preprocessor made in python that allows you to write code withought line numbers and to use labels. the preprocessor adds the lines and changes the labels to line numbers. Also made an AmericanFootball BASIC game, as an example of how to use the preprocessor. Also made some small changes to the firmware, so make sure to update that t oo. May 10 2012: Fixed a bug that allowed only 127 lines of BASIC in one program, now allows 255 lines, I will increase this number when I get a chance. AmericanFootball. BAS now works, I have finally tested it. Update all your files! I did not use this, but you may consider using this hack to connect an SD card using a 5. 25 inch floppy disk connector: WARNING, the SDcard library does not use a FAT file system. so any data you may have on the SD card will be lost. you will need to reformat the SD card to use it again on a PC. I realize that few people will use the LCD module I used(which is a rare Japanese one), if someone uses a normal LCD remove the driver for mine, and replace all the print2nl() and print2 with lcd.

print and lcd. printnl and send me a copy of the working sketch to usmpadow@gmail. com so I can put it up with this project. L# GOSUB L# - goes to the line number specified and will return to the next line when a RETURN is encountered (it seems this might be buggy too. I will try to fix it) Upload the SDmemBASIC. ino sketch to the arudino. Use a terminal program like Tera Term, connect to your arduino(if it is terraterm, set the wait to 20ms for each char and 200ms for each line in setup=>Serial Port) this one only uses the SD card, and the Serial Terminal to communicate, no LCD screen required: this one uses RAM, so you only need an arduino, no SD card or LCD screen, the BASIC programs are very restricted by RAM:

🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713