I thought OK, perhaps it is taking more time to transmit the characters, but during this time the processor can be doing something productive other than idly polling the ACIA status byte. So, overall we're going to win.
If we were able to do productive process things whilst the ACIA did its work unaided, we would see that more sets of characters could be transmitted.
Specifically the rate of character sets are transmitted should increase.
But, the transmission rate has actually decreased from 929Hz to 720Hz.
But, unfortunately that doesn't seem to be the case. So we're not winning there either.
So that leads me to conclude that the Z80 processor at 7.68MHz is just too slow to take advantage of an interrupt based 115,200 baud serial transmission capability.
Unless, I've got this wrong, and I'm missing something obvious?
Any thoughts? Let me know please.
Following up with some simple testing of the Microsoft Basic PRINT function, it seems that there is a net loss of throughput, mainly due to the amount of time spent processing the interrupt.
But, the transmission rate has actually decreased from 929Hz to 720Hz.
So that leads me to conclude that the Z80 processor at 7.68MHz is just too slow to take advantage of an interrupt based Tx at 115,200 baud.
II've done a "rewrite" of the original "Nascom Basic Manual" (attached). Please update the manual as you add/remove functionality to the BASIC code :-)
/Jan
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/5bab447f-d1d5-4682-baa4-ddd1f4c20b7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<Nascom Basic Manual Rewrite.docx>
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/edb30ad1-6c94-4817-9ea8-e2e907bfc2f8%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/CAO93Ptet3agqDae5nLzvoscWX-Td52dOJGoi%3Dhyud8Uip6Fr9A%40mail.gmail.com.
Following up with some simple testing of the Microsoft Basic PRINT function, it seems that there is a net loss of throughput, mainly due to the amount of time spent processing the Tx interrupt.
But, the transmission rate has actually decreased from 929Hz to 720Hz.
With the optimisations, the rate has increased to 729Hz. But it is still slower than Tx polling at 929Hz.
The image shows that the timing has returned to the former rate, and that twice (in a 7 byte transmission) the CPU had to use the Tx buffer. The CPU is slowed down generating the CR and LF characters, so the Tx buffer is emptied before they are output.
This can be seen in greater detail when a longer text string is output, as the CPU is regularly interrupted to produce the next character.
There remains a 239 byte Rx buffer, so substantial pieces of BASIC (three full length lines of code) can be pasted into the RC2014 before the buffer overflows.
The Tx buffer is only 15 bytes, but that seems a sufficient trade off.
I've put the code in Github in the same place, my NASCOM BASIC Repository.
Enjoy.
Perhaps is a personal thing, but when something is left not quite right, I have to come back to it to make it right.And so in that spirit I've had another crack at the interrupt driven Tx code I wrote back in November.
On Saturday, 26 November 2016 23:10:55 UTC+11, phillip.stevens wrote:Following up with some simple testing of the Microsoft Basic PRINT function, it seems that there is a net loss of throughput, mainly due to the amount of time spent processing the Tx interrupt.
notFull: LD HL,(serInPtr)
INC HL
LD A,L ; Only need to check low byte because buffer<256 bytes
CP (serBuf+SER_BUFSIZE) & $FF
JR NZ, notWrap
LD HL,serBuf
notWrap: LD (serInPtr),HL INC HL ; 6 T States
LD A,L ; 4
CP (serBuf+SER_BUFSIZE) & $FF ; 7
JR NZ, notWrap ; 12
; 29 T States Total inc hl
ld a, l
cp (serRxBuf + SER_RX_BUFSIZE) & $FF
jr nz, rxa_no_wrap
inc l ; move the Rx pointer, just low byte along - 4
ld a, SER_RX_BUFSIZE ; load the buffer size, power of 2 - 7
and l ; range check - 4
ld l, a ; return the low byte to l - 4
- 19 T States Total inc l ; move the Rx pointer, just low byte along - 4Which interrupt mode are you using to talk to the ACIA?
I've just been reading about Mode 2 and the 8 bit vectors and it opens up possibilities for sharing the interrupt line with other devices.