Wednesday, August 12, 2015

New Project: Logic Tool

Since my plan to make a wireless breadboard did not work out, I decided to use the MCP23S17 shift registers I bought for it to make something similar. It is similar to a logic analyzer but shows information in real time rather than recording a short period of time at high resolution. It has female headers for 64 pins but so far I have only soldered 32 of them in. As time gets closer to Makevention, I'm trying to save time however I can to get my last few projects working.

With 64 pins I will have enough to monitor all of the lines of my 6502 project. Unlike a logic analyzer, I can
also switch any of the pins to be outputs. Now I am doing this with a simple GUI I made that shows or controls the lines with virtual LEDs. This saves me from hanging loads of LEDs on all the lines of my project. Later I would like to add other forms of input and output that I can drag and drop to the dark gray area in the middle of the form. This could include buttons, sliders or hex readouts like I had for my 6502 Virtual Project. At the moment, only the LEDs work and I am using them to drive the address and data lines of the 6502 socket for my graphing calculator project. This lets me check the control signals of the CPLD fairly quickly.

In the end I think this project will work out better than the plan I had for the Wireless Breadboard. When I tried the breadboard I was going to use with another project, it showed a big voltage drop across the rails. I did not know this could happen and it would have been unfortunate to build the whole project and then find out the board was not very good.

Tuesday, August 11, 2015

New Project: 6502 Graphing Calculator

One of the last things I want to make progress on before Makevention in a few weeks is a graphing calculator I have been planning for quite a while. It will use a 65C02 and is the main reason I started on my 6502 Virtual Trainer last year. Most models of Texas Instrument's graphing calculators use a Z80, which was a competitor to the 6502 in the past. Those models have a 6 or 15MHz clock. The Z80 needs roughly three times more cycles than a 6502 to accomplish the same task, so running this calculator at 5MHz should be as fast as one of those calculators at 15MHz. At the maximum speed of 14MHz, it should be nearly three times as fast. Interestingly, Hewlett Packard did produce several non-graphing calculators like the HP-35S, which used a 8502 chip based on the 6502. Later models of TI calculators used the Motorola 68000 and the latest use ARM processors. These will certainly outperform anything I could make with a 6502. My hope is to make something in power between the Z80 and 68000 series with a few added features.

So far I have finished most of the decoding logic in the ATF1508 CPLD I have been working on. It has 57
IO pins and I have managed to use them all without finishing all the functionality I need. My plan is to use a 512KB SRAM chip with the first 2KB of address space always mapped to the first 2KB of the SRAM. The next two 30KB chunks of address space will point to two windows in the SRAM controlled by the CPLD. This will let me copy large chunks of data between two parts of the SRAM without changing the window between copies. Hopefully 30KB is enough for any single program the calculator will need to run. The last 2KB will be the EEPROM. This is hopefully enough space for a small bootloader that will copy firmware from an SD card and into the SRAM banks. The peripherals like the keyboard and LCD are mapped into the last few bytes of the first 2KB of SRAM.

For the LCD I found a fairly cheap 3.2 inch 320x240 color LCD on eBay. It is the perfect size for a calculator like this. It was also easy to get working with an MSP430 and some shift registers. The only downside is that I did not get an SPI version and I do not have enough CPLD pins to drive the 16 bit data port. The good news is that the LCD seems to expect 3v signals, so I will need some shift registers for level shifting anyway, which frees up a lot of pins. I don't think I will be able to finish very much more of this project for Makevention but I would like to get it drawing to the LCD from a program stored on an EEPROM by then. If I do have extra time, I will work on getting it to read a keypad.