Hi, I recently accidentally fell into the hands of such a piece of iron:
Well, a piece of iron and a piece of iron, I thought ... There is a PBE035 microcontroller on the board, an IO m5l8243p extender, an IR12 between RF5 and the controller, and there is somewhere else LN1 on the side dangles. I immediately liked the good rare ROM on 2KB RF5 in the socket in gold. I think I'll take it off, and the rest boldly in the scrap, more, the whole board is covered with varnish for the most unbeatable .. And then all the same it became interesting, but what is it all about?
It turned out that this is a control board from the Soviet microwave type Electronics 23 (aka BUVI-2 aka Fairy aka Dnepryanka). On the Internet, even the device scheme was quickly found: http://www.elremont.ru/small_rbt/bt_rem32.php Now that it became clear what it is, one hand confidently reached for the trash, and the other inadvertently hammered in Google “035” and ... And I became interested and carefully looked at the fee. Once there is a controller, it means you can write programs for it. There is also a kind of screen directly on the board (4 digits) where you can display all sorts of swear words (BABA, SISI, well, you understand). There is also a piezo element here, which means you can squeak. Everything else you can connect 4x4 keyboard. This is just some kind of devboard, I was delighted!
As already mentioned, the PBE035 controller is installed on the board. In Russia, it is better known by the name of KR1816BE35, but in general, this is the great and terrible Intel 8035 MSC-48 series. The first copies began to be produced in 1976, that is, about 40 years ago. The controller does not have its own memory for programs, so it communicates on the external bus with the ROM, from which it reads the instructions for execution. But there are 64 bytes of RAM, of which about 32 bytes can be used as you like, and the rest are for registers and the stack. There is a timer, there is an interrupt from the timer, there is an external interrupt, there is a system of priorities. In short, the normal old-school controller, not like bold PICs. What the Bolsheviks had been waiting for so long. Immediately I wanted to code something under it.
')
But first they had to solve one difficulty, namely, to connect the board. As can be seen from the diagram, the power supply for the digital part requires just + 5V, while for the indicator powering it is necessary 2.5V and 30V of alternating voltage.
By the way about the indicator - it's a lamp! Yes, a warm lamp radio tube, and not some kind of pop-up LEDs. And like a lamp, it has a cathode anode and a grid. This type of indicator is called fluorescent vacuum indicator. After thinking a bit about the circuit, I saw that 30V breaks go to the diode bridge, which means they straighten up. And even 2.5V also go to the diodes and then to the grid, which means they, too, straighten. So you can try to connect the board to a constant voltage. Instead of 30V, I filed 12V, instead of 2.5V, I filed 3.3V from a standard ATX format power supply. To do this, solder the wiring to the board. It turned out like this:
But having turned on the board, I was at first disappointed. Some segments on the display did not glow. At first, I thought that 12 volts was not enough, but then after carefully examining the board, I found it was not in two places near the indicator. Rang, disappeared. The board started up, numbers appeared on the screen to set the time and select the program mode. So, I wanted to throw it out, but in the end I fixed it. It's time to fry.
I used the free cross-platform assembler Asm48 . Cool, that there is a version for MacOS, apparently the authors are not deprived of a sense of humor, at least I appreciated. Well, it means downloading the assembler, everything is simple there: ASM48 <filename.asm> The first thing I did was “blink the LED”, but instead of the LED I was jerking the leg of the speaker (piezoelectric element) in an endless loop with a delay. Speaker is connected to port 1, high bit:
Having compiled the program and stitched it on the programmer in ROM 2716, I launch the board and hear periodic clicks at intervals of about a second. Works! Now I had to deal with the screen. The scheme shows that the “mask” of the ABCDEFG symbol is connected to port 1. Moreover, the signal is inverted, that is, when 1 - the wand does not light, when 0 - it is lit. In order to set the mask of the letter “H”, see the picture:
We begin to bypass the letter from G to A, since here the order of the bits is reversed: G is shaded, it means 1; F is shaded, it means 1; E is shaded, it means 1; D is not painted over, it means 0 and so on. The result is: 1110110b. We remember that the signals are inverted, so you need to invert the mask itself: not 1110110b = 0001001b. Or 9h. Sending this number to port 1 we will set a mask for the letter. Harder to choose a character. Here is applied dynamic display. In short, the essence comes down to the fact that we constantly have to set a mask, light the first character, set a mask, light the second character, and so on. For the resolution of the luminescence of the symbol, the second port is responsible, which is extended to 4-four four-bit ports with the help of the m5l8243p microcircuit. To access these ports, use the MOVD command, while the ports themselves are numbered P4, P5, P6, P7. P4 according to the authors is responsible for scanning the keyboard, but P5 just sets one of four characters to display.
At first I tried to make a dynamic indication in the main program loop, but then I used a timer for this. And in the main cycle of the program, the indicator buffer changes, displaying at intervals of 1 second the inscriptions “HELO” and “2014”
An inquisitive habrauser probably noticed a bug at the end of the video when, instead of HELO, not exactly what was needed was highlighted. I noticed him too, yes. And all because when the main program is sending the display buffer, I forgot to stop the timer. Before call copy_buf you need to do DIS TCNTI and after EN TCNTI. So that!
Now it only remains to play on the device "a Christmas tree was born in the forest" and I will consider the mission successfully completed. All good!
Literary:
1) MCS-48 AND UPI-41 ASSEMBLER LANGUAGE MANUAL 1976
2) Volume 2 of the Shakhnov Reference Book (Microprocessors and integrated circuit microprocessor sets)
3) Stashin V.V. and others. - Designing digital devices on single-chip microcontrollers
4) Signs Synthesizing Indicators: A Handbook / Ed. V.P. Balashov
5) Bystrov Yu.A. One hundred charts with indicators