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: 4693
- 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
-
- Font of All Knowledge
- Posts: 4693
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Component Advice Please?
Hi,
The VBAT is not part of the I2C Interface, but Voltage BATtery
I have ordered a similiar LCD, which has anArchino s8oldered to the back of the LCD, where the I2C Interface is connected.
I assume yhe I2C Address is setup in the Arduino.
I will try it on a Q68 I2C, which can use 5v I2C devices.
The VBAT is not part of the I2C Interface, but Voltage BATtery
I have ordered a similiar LCD, which has anArchino s8oldered to the back of the LCD, where the I2C Interface is connected.
I assume yhe I2C Address is setup in the Arduino.
I will try it on a Q68 I2C, which can use 5v I2C devices.
Regards,
Derek
Derek
Re: Component Advice Please?
I don't know the Q68. For QL the LCD only needs the PCF8574 control board, but not an Arduino.Derek_Stewart wrote: Wed May 21, 2025 4:18 pm Hi,
The VBAT is not part of the I2C Interface, but Voltage BATtery
I have ordered a similiar LCD, which has anArchino s8oldered to the back of the LCD, where the I2C Interface is connected.
I assume yhe I2C Address is setup in the Arduino.
I will try it on a Q68 I2C, which can use 5v I2C devices.
I mean you only need the LCD with PCF8574 for QL with Minerva Mk2 (or any I2C connection I believe)
Edit: most of these devices are made FOR USE with arduino, which is fine
Last edited by t0nyt on Wed May 21, 2025 5:55 pm, edited 1 time in total.
Re: Component Advice Please?
The I2c address of the PCF8574 is defaulted to either $27 (TI make) or $3f (NXP make) but there are 3 jumpers that can be soldered to change the address if needed (so you can have multiple LCD's on same I2c BUS)
Re: Component Advice Please?
A slight code mod to make use of all 4 rows (note that the order of the text is line 1, line 3, line 2, line 4)
Code: Select all
40 DIM M$(80) : M$="SINCLAIR QL Minerva v1.98 Mk2 Line 2 Line 4"