I need someone to explain this to me.

BASIC for some beefy AVR chips

klBASIC is a BASIC interpreter written in C for AVR microcontrollers. [Karl Lunt] developed the project based on an assembly language BASIC interpreter for 68HC11 chips written by [Gordon Doughman]. The transition from assembly to C bulked up the code, so you’ll need a beefy AVR chip in order to store all of it.

The idea is that one AVR chip can run BASIC with just a serial monitor. But like this Arduino BASIC interpreter build, it would be a snap to run this with a keyboard and small LCD screen. We see binaries available for several different AVR devices including ATmega128, ATmega1284, and Xmega128. They range from 1.5k to 16k of program memory. We didn’t find a link to the source code (just these precompiled files) so we inquired with [Karl] to see if that is available. He’s reluctant to release the code because it’s “pretty much a mess” and doesn’t live up to his normal standards. If he codes for a living we can see how that may be embarrassing. If you’d like to lend a hand cleaning up the code, let him know by leaving a comment here and maybe he’ll release it for that purpose.

We find this interesting, but it’s tough to get excited about building one of our own. If this has inspired you, we’d love to hear some of your plans in the comments after the break. Perhaps we’d be prodded into another programming adventure based on your enthusiasm.

Arduino BASIC interpreter using LCD, keyboard, and SD

This Arduino BASIC interpreter will make a really fun one-day project if you’ve already got the parts on hand. [Usmar A. Padow] put together an Arduino Uno, SD card, four line character LCD, and PS/2 keyboard. but he’s also included alternative options to go without an LCD screen by using a computer terminal, or without the SD card by using only the Uno’s RAM. As you can see in his demo after the break, this simple input/output is all you need to experiment with some ancient computing.

It’s hard for us to watch this and not think back to an orange or green monochrome display. Just like decades past, this implementation of BASIC has you start each line of code with a line number, and doesn’t allow for character editing once the line has been input. The example programs that [Usmar] shows off are simple to understand but cover enough to get you started if you’ve never worked with BASIC before.

Last August we saw another hack which ported Tiny BASIC to the Arduino. You may want to take a gander at that one as well.

[Read more...]

Loading programs onto a TRS-80 Model 100

We’d guess that you don’t have a TRS-80 Model 100 computer sitting around. But we’ve heard that the decades-old hardware is built like a tank so if you search around you can probably get your hands on a working unit. The Model 100 boasted some nice features, one of which was a 300 baud modem allowing you to transfer data onto the device. [MS3FGX] wanted to give it a try but had to do some work to get the Model 100 to communicate with modern hardware.

This could have been a much more involved process, but since the Model 100′s modem uses common communications standards it’s really just a matter of hooking it up and choosing the right COM port settings on a computer. In this example a Linux box is used with the program Minicom. It is configured to communicate at 300 baud 8N1 (8 data bits, no parity bit, and one stop bit).

With software in place you’ll need to make your own cable. [MS3FGX] does this using a DB-25 connector for the Model 100 side, and a DB-9 connector for the serial port on the Linux box. He’s got a pin-out for the cable on the second page of his guide. It sounds like it should be no problem to use a USB-serial converter if you don’t have a serial port.

Once everything is in place you’ll be able to transfer BASIC programs from your computer to the Model 100.

Maximite harkens back to the days of BASIC

Any self-identified geek that spent some time in the 80s will tell you how they used to type out programs into their ‘microcomputer’ with BASIC. It was a simpler time when a computer’s raison d’etre was simply being a BASIC interpreter. These days are long past us now; you can’t simply turn on a computer and have it load a BASIC prompt anymore. This is where [Geoff]‘s Maximite single board computer comes in. It’s a tiny little box that whose only purpose is to play around with BASIC.

[Geoff]‘s used a PIC32MX microcontroller with 128k of RAM for the CPU of his Maximite. Unlike an Apple ][ or TRS-80, the Maximite version of BASIC can do floating point arithmetic out of the box. To connect to the outside world, the Maximite has VGA or composite out to display the BASIC interepreter. A PS/2 keyboard port provides the input, and a USB port and SD card can be used to load and save programs from a PC.

The Maximite includes a 20-pin breakout for whatever IO you can imagine. This is duplicated on [Geoff]‘s mini Maximite that is designed to be the retro throwback of an Arduino. We though those were called BASIC stamps, but if it gets kids programming, we’ll let it slide.

BASIC programming on an Arduino

[Mike] sent in a project he’s been working on – a port of a BASIC interpreter that fits on an Arduino. The code is meant to be a faithful port of Tiny BASIC for the 68000, and true to Tiny BASIC form, it fits in the very limited RAM of the Arduino.

True to Tiny BASIC’s assembler roots, [Mike]‘s C port makes extensive use of the “infinitely-abusable” goto statement. Kernighan and Ritchie said themselves, “code involving a goto can alway be written without one” but [Mike] found that using goto left a lot more room available for BASIC code. The BASIC interpreter eats up around 600 bytes in the Arduino RAM, leaving about 1.4 kB for BASIC code. Not much, but more than the lowest-end BASIC Stamp.

[Mike] says he started this project to see how ‘old bearded ones’ conjured up so many impressive programs with a few kB of RAM. Tiny BASIC was originally conceived for the Altair 8800 that shipped with 256 bytes of RAM stock, so it seemed like a perfect fit. Right now, all we know is we’ll be spending the weekend digging through our copies of Dr. Dobb’s Journal.

Dedicated hacker adds USB capabilities to his Commodore 64

usb_basic_commodore_64

To say that Commodore 64 aficionados are a dedicated group would be quite the understatement. There are still quite a few individuals that spend all sorts of time building and programming for the C64 in order to make using them enjoyable, and to keep up to date with current technologies.

[Luigi] is one of these people. He wanted a way to easily transfer files between his PC and his C64 that was fast but cheap. To [Luigi], this meant USB file transfers, which would take quite a bit of work to implement. He started out by rolling his own BASIC interpreter which could eventually be extended to support USB. Using his BASIC-Plus interpreter, he was able to implement a USB Kernel, which could transfer files at 1.2 KB/s via a USB to serial adapter. Wanting faster file transfers, he built a USB to parallel adapter, which resulted in a nearly 8-fold increase in speed.

So, if you have been dying to have USB capabilities on your C64, look no further, [Luigi] has just what you need!

Continue reading to see a quick video of USB-64 in action.

[Thanks, Matt]

[Read more...]

Build a standalone BASIC interpreter

Here’s a photo of the circuit board for the Maximite, a BASIC interpreter that [Geoff] built. The design idea was sparked when he was exploring the possibilities of the PIC32 family of chips. [Geoff] wanted to write about the hardware for a magazine article but needed an actual product to really show it off.

The design can utilize one of two microprocessors, a PIC 32MX795F512H or 32MX695F512H. The 32-bit chip has more than enough power to emulate BASIC, and even allows for floating point calculations. It’s VGA compatible and has a jack for a standard PS/2 keyboard, which makes it a standalone device. You can store programs on an SD card, or it can be interfaced with a computer via the USB-B port that you see next to the power jack. The microprocessor is a surface mount chip, but the rest of the components are through-hole, making this an easy kit to assemble. But if you’re not afraid to etch your own 2-layered PCBs there is board artwork available in [Geoff's] download package.

[Thanks Bill]