Nice work! The software looks relatively straightforward if you can program it from BASIC like that.
Derek - good luck with sorting out the I2C interfaces, especially if it means we can use them on Q68 one day!
Component Advice Please?
-
- Font of All Knowledge
- Posts: 4692
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Component Advice Please?
Hi Dilwyn,dilwyn wrote: Tue May 20, 2025 1:21 pm Nice work! The software looks relatively straightforward if you can program it from BASIC like that.
Derek - good luck with sorting out the I2C interfaces, especially if it means we can use them on Q68 one day!
I hope that the TF Services I2C interfaces can resurrected and made available.
But as time marches on the same interfaces can be made with smaller parts and maybe off the shelf. Whether they would work with the TF Servicex code, I have yet to look into.
Regards,
Derek
Derek
Re: Component Advice Please?
I kept looking at the code and couldn't understand why it needed to send 4 times for each byte to display (instead of 2 x 4bits), so have edited out the send at lines 100/120 & deleted line 220 and it still works finedilwyn wrote: Tue May 20, 2025 1:21 pm Nice work! The software looks relatively straightforward if you can program it from BASIC like that.
Am trying to find some kind of command specification for the PCF8574 to understand what the config routine does and what other options are available
I think it would be nice to create something like an "LCD(<line>,<row>,<text>) " extension for BASIC (which may also improve the speed if it's in assembler)
Code: Select all
30 PROC_INIT
40 DIM M$(40) : M$="SINCLAIR QL Minerva v1.98 Mk2"
50 FOR C=1 TO LEN(M$)
60 D$=M$(C TO C)
70 C%=CODE(D$)
80 H%=(C% && HEX('F0')) || HEX('09')
90 L%=((C%*16) && HEX('F0')) || HEX('09')
100 D%=H%
110 PROC_EN
120 D%=L%
130 PROC_EN
140 NEXT C
150 STOP
160 DEFine PROCedure PROC_INIT
170 DATA HEX('38'),HEX('38'),HEX('38'),HEX('28'),HEX('28'),HEX('88')
175 DATA HEX('08'),HEX('88'),HEX('08'),HEX('18'),HEX('08'),HEX('68')
180 DATA HEX('08'),HEX('E8'),HEX('88'),HEX('08')
190 RESTORE 170
200 FOR D=0 TO 15
210 READ D%
230 PROC_EN
240 NEXT D
250 END DEFine
260 DEFine PROCedure PROC_EN
270 D%=D% || HEX('04')
280 I2CTXB(D%) : REMark *I2CTXB 3F D%
290 D%=D% && HEX('FB')
300 I2CTXB(D%) : REMark *I2CTXB 3F D%
310 END DEFine
500 DEFine PROCedure I2CTXB(D%)
510 LOCal r$
520 r$=I2C_IO(CHR$(164) & CHR$(D%) & CHR$(255),0,HEX('27'),1)
530 END DEFine
Re: Component Advice Please?
With regards to attaching the LCD to a MK2 Remake the vBat (not used for LCD) is the pin on J2 nearest the crystal
The LCD seems happy to draw it's power from the 5v pin
The LCD seems happy to draw it's power from the 5v pin