SMART Response XE Tiny Basic Port
Introduction: SMART Response XE Tiny Basic Port
My love of retro computing has sent me on the journey to have a small handheld device that runs a BASIC interpreter. I was so happy to run across the SMART Response XE!
This was a popular classroom device that allowed teachers to setup lessons, quizzes, whatever into a program and then the students would use these devices to interact with the curriculum. The advent of wide spread cell phone use has made these devices obsolete. However, they are rugged, excellent on battery life, and best of all, COMES WITH AN ARDUINO PROCESSOR!!!
Yes, this humble device includes the Atmel ATmega128RFA1 processor with 128k RAM, 4k EEPROM, and external 1Mbit memory chip. It also includes an RF transceiver, but unfortunately, doesn’t use a common BLE or Zigbee interface.
In the battery compartment there are interestingly placed holes. When you crack one of these open, you will find programming pads that align with the holes allowing the units to be programmed without removing the case. This is good, because these units were meant for the classroom and are really hard to open.
Supplies
- SMART Response XE (found on eBay and others)
- SMART Response programming adapter (prototyping board, pogo pins, and wire)
- JTAG Programmer (I used the AVR ISP MkII)
- Tiny Basic Plus for SMART Response HEX file (in the GitHub repository)
Step 1: Make a Programming Adapter
You can construct a programming adapter by using a prototype board and some pogo pins to line up with the holes in the back of the unit. The photos shows the position of the JTAG programming pads. You can then insert the pogo pins in the associated holes and connect to a JTAG programmer. I used two protoboards sandwiched together which allowed the pogo pins to stay relatively vertical. I also soldered one end of wire to each pin and the other had a male header pin connector. I then used a solderless breadboard to connect each wire to the corresponding programming connection.
Step 2: The Software
I was thrilled to discover that <PERSON> had crafted an
Arduino library for interfacing with the keyboard, screen, and external memory.
SmartResponseXE Arduino Library
Then there is the awesome BASIC interpreter available called Tiny Basic Plus. The code was based off of the Tiny Basic Interpreter by <PERSON> for the 68000 computer. 1003
It was modified for Arduino by <PERSON>, <PERSON>, and others and made available to the community. There are some great projects out there that use it with a PS/2 keyboard and an oled display. I have made these in the past. But when I saw the SMART Response XE I knew my destiny.
Tiny Basic Plus
Using the code for Tiny Basic Plus and incorporating the Arduino library, I have been able to port this software to the device. There were some challenges.
1) I am not a good programmer and the guys who wrote these programs knew what they were doing. It took a while to figure out the code and conform it to the hardware of the XE.
2) The way the display is hooked up on the board you cannot read from the display RAM. This meant I either had to have a large buffer to mimic the display so scrolling or formatted display options were available, or just use the hardware functions of the display itself to plainly show the text.
3) The external memory can have its memory read by single address, but could only be written to in 256 byte blocks.
I was able to overcome these issues and come up with an implementation that creates an adequate user experience.
I have significantly modified the Tiny Basic and library code so these are not replaceable by the originals. I tried to comment code when I modified it to help you interpret my changes in case you want to take this further.
The code preserves all of the original commands from Tiny Basic and adds or modifies the following:
LIST: The list command will list the program by page. Click any key to continue paging through. If you want to list to the end, press the space bar.
BYE: Bye will shut down the computer and display, and put the processor to sleep. In this state it consumes very little power. To wake it up, press the power button on the top of the unit.
BATT: The <PERSON> command will return the battery voltage in millivolts.
WAIT: This command waits for a key to be pressed to continue program execution.
MSAVE: This will save the current program into external memory. You must follow the command with the data slot you want to use. There are 10 slots labeled 0 through 9. 991