Ayusha - controller on the 6502 processor

Arduino, RaspberryPi, ... These words are increasingly found on the Web in the context of creating controllers for any application, from a smart home to flashing LEDs. Despite the technical trick, these glands are terribly boring. Judge for yourself: filed power, downloaded the program, ... and that's it! And what is being done inside the silicon mounted on the printed circuit board is not known to us. Or uninteresting?
The reason for solving the “uninteresting” problem was a love for the 6502 processor, on which the first apples and some other “Agates” were collected, as well as a bunch of chips lying around idle. There are many circuits on this processor on the Internet, but there are practically no ones that could be useful in the household. The result of work is the Ayusha controller, ready to capturemanage the world, help us in an amateur laboratory, the circuitry of which we know, we can change according to our whims, and which in most cases replaces * duins and similar boards.
image


And why exactly 6502? There is 580VM80, Z80 ... VM80 is not technically comfortable - three power supply voltages, the second applicant is confusedly programmed ... 6502 is very simple in low-level programming, although it has some “unusual” features, such as paging memory and mapping input / output ports to main memory . However, at the same clock frequency, 6502 overtakes the Z80, and the BM80, moreover, has 258 registers (yes, 256 external, with simplified addressing) and a lot of something tasty and interesting, including the developed software.
So, why didn’t the published circuits suit us? Most importantly, they all did not have I / O ports through which they could sense the outside world and somehow control it. So we add such a chip to the circuit. The choice is wide, but since the microprocessor set 63xx / 65xx / 68xx is somehow unlucky in 1/7 of the land, we stop at the 580VB55 chip, which has three eight-bit ports, to which you can connect almost any sensors or control the relay unit or other switching circuits .
Further, in an amateur laboratory you need a sound and radio frequency generator. For sound applications, we recall the 580VI53 three-channel timer. Now we can even play music or use the generated pulses to synchronize the high-frequency synthesizer.
Since we still do not know when the modernization or its filling with other nodes will end, we supplement the circuit with bus buffers. Oh yes, they forgot about the connection with the owner, but we must somehow take commands from him and answer him that he is somewhere wrong. To do this, we use a serial port chip, in our case, 6850 was lying around at our fingertips, but 580BV51 could also be used. Using the COM port, the controller can be connected to any terminal (even with a teletype device) or controlled by a terminal program from any computer (Hyperterminal from the WindowsXP kit). Through the serial port, the controller receives commands from the keyboard of the external device, throws its messages to the external monitor, and through it the programs for the further functioning of the controller are downloaded. And if you use the COM-> Ethernet converter, then you can control "Ayusha" from any part of the world. But it is, dreams ...
All! We decided on the scheme, and since we had to think a lot and get nervous, we need to calm our nerves by knitting with MGTF ... We
image

insert the finished controller into the case. Of course, there is room for further expansion of the apparatus.
image

We take out the main connectors and control knobs on the face of the device. We have three parallel ports, two channels from the VI53 timer, and one channel can be controlled by the other, if necessary, a COM port for the terminal, power output of the terminal or external devices, a hardware reset button, a power indicator and a ROM firmware selection switch.
image

What did we get for iron? So, the processor 6502.1 MHz clock (it is planned to upgrade the processor 65С02 with a clock frequency of up to 5 MHz - it is possible and more, but, unfortunately, 580VB55 will stop responding to irritants), 47K RAM, 64K ROM, divided into 4 pages of 16K. All this in a small case and is powered by a three-ampere five-volt adapter from the well-known D-company.
image

Well, we decided on the iron, it remains to revive "Ayusha" using the built-in software. Since the duins mentioned at the beginning of the article * use a dialect of the C language, then the creator himself ordered, in honor of his fiftieth birthday, to use the BASIC programming language. Since there are links on the Web that allow you to create your own dialect of the language, we use them, and now Ayusha communicates with us in normal Old English.
image

That's all for starters, now we can “pull the pins” using the POKE command, find out what happened with the REEK command, save the results of work to the “big brother” and assign some functions to the controller, simplifying our life.
The next step of the project will be the creation of a simple “iron” terminal (after all, it is somehow uninteresting to use a powerful computer for working with a baby) with the ability to save and load programs onto a tape / recorder / cell phone. Also, this terminal can be useful to us for working with other devices programmed or communicating with users through the serial port. But this will be a different story ...

You can see the full description of Ayusha on the project page, www.qsl.net/rw6hrm/html/6502.htm. There, his modifications, new nodes and programs will be laid out. The sources of information for those who like the 6502 processor are also indicated, where to get the initial information from. And if someone decides to repeat the scheme, then please treat it as a collection of ideas, and not as a final decision.

The second part is located here .

Also popular now: