Post Reply 
Recreating a HP-25
07-09-2016, 04:40 AM (This post was last modified: 07-09-2016 04:44 AM by Alejandro Paz(Germany).)
Post: #10
RE: Recreating a HP-25
I've been working lately on the code quite a bit and on a prototype board with keys and 7-segment displays. The code runs till the entry loop at 0742..0745. I have to implement keyboard scanning now. Debouncing seems to happen entirely on hw. If this where some microprocessor, I'd just use some software counters to scan the matrix and store key changes. I'd like to avoid using one counter per key, because I don't think that it was done like that. There is enough logic in this chip, I just think that is a waste of logic to do it like that....
I had some problems with the carry. It gets set and cleared in the same instruction, not a behaviour I have to reproduce,... on the 1LF2 I used an extra register for the comparison result. Here I used the carry, but it resulted in awkward code. There is a bit to improve. I follow the principle: make it work, make it fast, make it good Smile. The 1LF2 has hw registers and the ws has memory-mapped registers, there is not enough logic for all the muxes one needs in a 8x64 bits register file with two access ports. Two R/W ports are not really needed, they are just convenient. It is a behavioural model after all, not a gate-level model (one could also do this but... why ?).
The code posted to github is up-to-date. There is a stream of serial data, pc, opcode and P register coming out of the FPGA (numbers in octal except P). I'm using a MachXO2-1200ZE breakout board, it has a TTL33 to USB adapter built in. It is clocked from the internal 2.08 MHz clock, serial data is output at 500 kbps, no problems for the FT2232, they can also have 2 Mbps Smile.
I'll post a couple of pictures of the prototype once I've finished soldering the keys to the connectors, and the displays... quite a bit of wiring going on.

If you study a bit the code, there is another surprise there Smile, it only needs another row of keys Smile.

Code:

0000 1173 0
0236 1160 0
0237 1260 0
0240 0756 0
0241 0752 0
0242 0762 0
0243 0572 0
0244 0410 0
0245 0432 0
0246 0610 0
0247 0310 0
0250 1410 0
0251 0072 0
0252 0032 0
0253 1710 0
0254 1605 0
0341 0032 0
0342 0662 0
0343 1672 0
0344 0662 0
0345 0662 0
0346 0136 0
0347 1610 0
0350 1474 0
0351 1102 0
0352 1157 0
0353 0116 0
0354 0056 0
0355 1020 0
0255 0510 0
0256 0256 0
0257 0012 0
0260 0264 0
0261 1017 0
1203 1614 0
1204 1152 0
1205 1053 0
1212 1152 0
1213 1427 0
1305 0710 0
1306 0516 0
1307 1504 0
1310 1705 0
1361 0774 0
1362 0656 C
1363 1673 C
1356 1116 C
1357 1657 C
1353 0344 C
1355 0620 C
1356 1116 B
1357 1657 B
1353 0344 B
1355 0620 B
1356 1116 A
1357 1657 A
1353 0344 A
1355 0620 A
1356 1116 9
1357 1657 9
1360 1723 9
1364 0032 9
1365 0246 9
1366 0526 9
1367 1773 9
1376 0156 9
1377 1020 9
1311 1512 9
1313 1401 9
1300 0420 9
1301 0006 9
1302 1106 9
1303 1410 9
1304 1020 9
1314 0116 9
1315 1074 9
1316 1502 1
1320 1116 1
1321 1527 1
1322 0016 1
1323 0116 1
1324 1247 1
1251 0262 1
1252 0110 1
1253 0514 1
1254 0524 1
0274 0134 1
0072 0334 1
0074 0164 1
0075 0727 1
0565 1114 1
0566 1214 1
0567 1353 1
0672 1614 1
0673 1645 1
0751 0210 1
0752 0341 1
0470 1714 1
0471 0274 1
0472 0620 7
0473 1354 6
0472 0620 6
0473 1354 5
0472 0620 5
0473 1354 4
0472 0620 4
0473 1354 3
0472 0620 3
0473 1354 2
0472 0620 2
0473 1354 1
0472 0620 1
0473 1354 0
0475 1724 0
0477 1020 0
0753 1760 0
0754 0324 0
0742 0314 0
0743 0334 0
0745 1734 0
0742 0314 0
0743 0334 0
0745 1734 0
0742 0314 0
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Recreating a HP-25 - walter b - 06-09-2016, 09:10 AM
RE: Recreating a HP-25 - Thomas Radtke - 06-09-2016, 10:41 AM
RE: Recreating a HP-25 - PANAMATIK - 06-09-2016, 11:37 AM
RE: Recreating a HP-25 - Thomas Radtke - 06-09-2016, 03:38 PM
RE: Recreating a HP-25 - Guenter Schink - 06-09-2016, 07:57 PM
RE: Recreating a HP-25 - Guenter Schink - 06-10-2016, 09:13 PM
RE: Recreating a HP-25 - Alejandro Paz(Germany) - 07-09-2016 04:40 AM
RE: Recreating a HP-25 - PANAMATIK - 07-10-2016, 10:26 AM
RE: Recreating a HP-25 - PANAMATIK - 10-26-2016, 09:56 PM



User(s) browsing this thread: 1 Guest(s)