Some experiments on My4TH (3): Faster speed
Working at 20MHz and 22.1184MHz
Tests have shown that My4TH can operate stably at 20MHz (using the 10MHz ROM image file provided by the original author at baud rate 9600) by increasing Vcc to 5.2V with 74HC series logic circuits and AM27H256-45/35DC.
This configuation can work at 22.1184MHz with Vcc=5.4V:
U2 U3 | U4 | U9 | U15 | U16 | Others |
---|---|---|---|---|---|
74F161A(TI)/ 74AC161(TI) | 74LVC541A(TI) | 74ACT08/ 74LVC08 | AM27H256-45/35DC (needs to be selected) | IS61C256AL-12T(L)I/ CY7C199(L)-15ZC | 74HC series |
Higher baud rate
By adjusting the delays in serial subroutines, the system can operate at 14400 baud above 16MHz and 19200 at 22.1184MHz.
Modified firmware and tools can be downloaded here. Major changes:
- Updated 2025-01-19:
M*/
now with 3-cell intermediate results; addFH
and-->
for screen load(see Thinking Forth, Ch.5) - Updated 2025-01-13: fixed a bug in uart_recv at 14400/19200 baud
Firmware:
- Alternative EEPROM search: Consecutive pages on one EEPROM chip (24xx1026/BR24G1MFJ/M24M01 recommended), for external EEPROM cards
- Faster UART: 14400 baud at and above 16MHz, 19200 baud at 22.1184MHz
- Use PLD/PHD in words for performance
- Optimize tab_opcode for BLOAD modules with NFD extension
- Tiny little debugs on PARSE, WORD and ADDRESS-UNIT-BITS in accordance with Forth 2012 standard
- CH453 Keyboard and PCA9557 I2C LCD4004 Driver (will be discussed later)
- Modified key codes for CTRL keys
- Improve LIST for working with other I2C peripherals
- Improve LIST, DUMP and WORDS for auto pause on LCD
- Add word COLD for reset system at command line
- Change line number in EDIT and LIST to 0..15 in accordance with convensions
EDIT for LCD (m4-lcd-edit.bin
):
- Shift+Up: up 4 lines
- Shift+Down: down 4 lines
- Shift+Left: return to line start
- Shift+Right: go to line end
- Ctrl+Enter: insert line after current line
- Shift+Enter: break current line
- Ctrl+C: Copy current line
- Ctrl+K: Delete(cut) current line
- Ctrl+U: Undelete(paste) a line
- Ctrl+Space: Clear current line
- Ctrl+Backspace: merge current line with previous line
my4th-tool
:
- Custom baud rate at transfer and simulation
Stability test at 22.1184MHz
Not all EPROMs can operate stably at 22.1184MHz. To test stability, the EPROM can be placed on a heating plate at a constant temperature of 45°C. After waiting a few minutes for the temperature to equilibrate, perform the following tests:
Test 1,output should be -1000:
: test1 0 1000 0 do 1 2 u< + loop . ; \ should be -1000
Test 2,output should be as expected, no crash/hang:
: test 1000 . ;↵ ok
test↵ 1000 ok
: test 5000 . ;↵ ok
test↵ 5000 ok
forget test↵ ok
test↵ 1000 ok
forget test↵ ok
test↵ ? unknown word test
Test 3,output should be as expected no crash/hang:
: + 0. parse-name >number 2drop d>s + ;↵ ok
3 + 4 + 5 .↵ 12
If not working, try
- Slightly increase the supply voltage by 0.05 to 0.1V (not to exceed 5.5V);
- Replace the EPROM;
- Lower the test temperature to 40°C (it can still work stably at room temperature, but the margin is not as sufficient).
Most AM27H256-35/45DC can work stably at 45°C. however, most AM27H256-45DC cannot work stably at 45°C. By lowering the test temperature to 40°C, some AM27H256-45DC can work.1
Improved SMT versions
-
Since TSSOP packages are not as easy to solder as SOIC packages, a version with all logic circuits in SOIC packages except HC/LVC541, HC574, and HC273 was designed.
-
Since higher supply voltage is required for operation at 20MHz/22.1184MHz, a version with a Boost circuit to raise the supply voltage to the target value was designed based on the above version.
-
For future testing, a version with test points on important signals was designed based on the above version.
-
There was a bug in uart_recv subroutine (
PSH R0
in the “wait for start-bit” loop) in the firmware posted at 2024-12-26. Effects of temperature on the timing can trigger this bug, causing multiple R0s pushed in the stack but only one popped. Fixing this bug increases the percentage of EPROMs that can work stably. ——2025-01-13 ↩︎