UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Other Discussions > Homebrew Equipment

Notices

Homebrew Equipment A place to show, design and discuss the weird and wonderful electronic creations from the hands of individual members.

Closed Thread
 
Thread Tools
Old 4th Apr 2022, 11:10 am   #21
KeithsTV
Nonode
 
KeithsTV's Avatar
 
Join Date: Aug 2007
Location: South Bradford, West Yorkshire, UK.
Posts: 2,574
Default Re: 16x2 LCD problem?

I've noticed that the read/write input is grounded meaning it's write only. this means the processor cannot read the busy flag which indicates that the display is writing to the LCD. the software will have to "guess" when the write to the LCD has finished. If it gets it wrong nothing will be displayed.

Keith
KeithsTV is online now  
Old 4th Apr 2022, 11:28 am   #22
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

I haven't looked too carefully but I think the odd assignment of port pins to display pins is because the uP chosen has relatively few pins and it is using the secondary 'special function' of some of them, particularly analogue input.

It looks like the 'ordinary' digital I/O lines to the display are picked from those which are left over. As you say you'd normally pick four side by side port pins like PA4-PA7 or PB4-PB7 for the 4 x data lines, if only to make it easier for you to wire them up.

Not using the read / write pin is an accepted technique which saves one microprocessor I/O line but the microprocessor then has to insert a minimum delay to allow the display to complete the last operation it was asked to do before asking it to carry out a new one. The datasheet for the original HD44780 controller IC which is the basis for all of these has a table showing how long each operation takes to complete.

Not using R/W is also used as a method of allowing these natively 5V devices to be driven by 3V3 chips (and Raspberry Pis) because you can't allow the display to output 5V levels to the micro, which it would, in read mode. In write mode the 3V3 'high' levels are just enough to get over the logic 1 'bar' for the display's 5V logic inputs.

Last edited by SiriusHardware; 4th Apr 2022 at 11:34 am.
SiriusHardware is online now  
Old 4th Apr 2022, 12:43 pm   #23
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

This is odd. I've been looking for the data sheet (I'm at work so looking on-line) and if I look at Microchip's website for data for the 18F1847, as specified in the circuit diagram, they don't offer me that part, only the 16F1847. I now need to check the device at home and see which it is. I must also look at the original article and check there.
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 12:58 pm   #24
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

I'm having the same trouble and yet I was sure I had successfully found a datasheet for the 18F1847. Maybe I only saw what I wanted to see? (May have been the datasheet for the 16F1847). I'll have to check my history when I get home.

And yet, MPLAB IPE did allow me to choose 'PIC18F1847'. Or did it?
SiriusHardware is online now  
Old 4th Apr 2022, 1:02 pm   #25
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Ahem, mole, your first post does actually say 16F1847. How did we get onto 18F1847?
SiriusHardware is online now  
Old 4th Apr 2022, 1:12 pm   #26
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Quote:
If anybody has a collection of Elektor, the project is in the March/April 2017 edition
That seems too new to have found its way to the World Radio History site which only currently goes to 2015. Could you (or anyone with that issue) take a shot of the relevant bit of the diagram and post it?
SiriusHardware is online now  
Old 4th Apr 2022, 2:11 pm   #27
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

Quote:
Originally Posted by SiriusHardware View Post

Could you (or anyone with that issue) take a shot of the relevant bit of the diagram and post it?
That's what I did in post #8
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 2:13 pm   #28
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

Quote:
Originally Posted by SiriusHardware View Post
Ahem, mole, your first post does actually say 16F1847. How did we get onto 18F1847?
That's what's specified on the circuit diagram.
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 2:18 pm   #29
Trigon.
Hexode
 
Trigon.'s Avatar
 
Join Date: Jun 2018
Location: Buckinghamshire, UK.
Posts: 387
Default Re: 16x2 LCD problem?

Whole magazine:

https://tuxdoc.com/download/elektor-...emagsccpdf_pdf

Extracted article:

Pages 120-127.pdf

Cheers
Trigon. is online now  
Old 4th Apr 2022, 2:18 pm   #30
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Quote:
That's what I did in post #8
Oh, sorry, it looked like something you had drawn yourself in a CAD package. It's been so long since I saw a copy of Elektor that I don't know their circuit diagram drawing style now. They used to have a very distinctive, recognisable style.

Quote:
That's what's specified on the circuit diagram.
So I see, and yet neither of us can find an 18F1847 datasheet on Microchip's own website, unless maybe it comes under the heading of 'PIC18F1xxx' or something similar.

So what is it you think you actually have in the circuit, 16F or 18F?
SiriusHardware is online now  
Old 4th Apr 2022, 2:20 pm   #31
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Just saw Trigon's very helpful post. So it's a 16F in the original article, in fact.
SiriusHardware is online now  
Old 4th Apr 2022, 2:25 pm   #32
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

It's most peculiar, I have to check the source for the part circuit that I posted and see if there are any other differences!
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 3:03 pm   #33
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Just to make things a bit more baffling for you, some of the parameters which are set in the hex file wouldn't normally apply to the 16F 'Mid Range' series. Things like the 4 x PLL clock multiplier for example... I can only remember seeing in the 18F series onwards.
SiriusHardware is online now  
Old 4th Apr 2022, 4:39 pm   #34
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

I've just looked through my browsing history on the main desktop here and the 18F1847 data sheet I thought I had been looking at was in fact the 16F1847 datasheet. And the PIC18F1847 I thought I had selected in MPLAB X IPE... was also the 16F1847.
SiriusHardware is online now  
Old 4th Apr 2022, 5:51 pm   #35
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

Straight away when I got home I checked the sources I have. The only reference to an 18F1847 is on a circuit diagram which has the Elektor "E" logo in the corner, and a filename of "L:\Projects\16xxx\160064 Battery activator\02_lab\hardware\160064 battery activator.SchDoc" dated 11-8-2016. Therefore any reference to 18F1847 is spurious and should be regarded as a typo. I apologise for misleading information.

I have checked the three circuits I have, the one referenced above, the one in the Elektor article from March & April 2017 and the one I drew in KiCAD dated 24NOV19. All have the same connections and use the same pins on the 16F1847 and the display. I also checked the drawing for the PCB that I laid out and had made by JLCPCB and that uses the same connections as all three circuits.

I am left with two possibilities in addition to the possible failure of the 16F1847 chip that I'm using - one, that there's a flaw in the construction of the board and two, that there are multiple versions of the ubiquitous 2x16 LC display in the world. I'll put the board under the microscope later to try and rule out possibility No.2 and I can order another 16F1847 to check that possibility No.1 is ruled out.

Possibility No.3 is feasible. I've recently been involved in a project that used a fairly common driver board to use a composite video signal and control a 7" LCD. That board is the PCB800099. I have two versions that look the same but behave differently so I can quite believe that, although both versions of the 2x16 LCD that I have work in the semiconductor tester that I have and neither work in the Elektor battery activator, there may be other versions out there that would work.
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 6:07 pm   #36
Trigon.
Hexode
 
Trigon.'s Avatar
 
Join Date: Jun 2018
Location: Buckinghamshire, UK.
Posts: 387
Default Re: 16x2 LCD problem?

The Flowcode listing contains:-
Quote:
target='PIC.16F.16F1847'
The 'Fuses' text file is named "160064-11 PIC18F1847 fuses.txt" and contains:-
Quote:
Microcontroller: PIC18F1847-I/P (DIP18)
On this page:-

https://www.elektormagazine.com/labs...ulators-160064

- the author states:-
Quote:
Three analog inputs of the PIC18F1847 are used to measure the three voltages from the dividers..
-whilst in the parts list on the same pages he states:-
Quote:
IC1 = LP2950ACZ-5.0, LDO, 5 V, 0.1 A
IC2 = PIC16F1847-I/P EPS 160064-41
IC3 = DC/DC converter 5V -> 15V RO0515S/P
So the author himself was clearly confused...

Cheers
Trigon. is online now  
Old 4th Apr 2022, 8:38 pm   #37
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

Quote:
Originally Posted by Trigon. View Post

So the author himself was clearly confused...

Cheers
Thank god it’s not just me!
__________________
Richard

Index:
recursive loop: see recursive loop
mole42uk is offline  
Old 4th Apr 2022, 10:55 pm   #38
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

After looking at the article I was interested to notice that the one-second interval is just down to what the unit does when it thinks the battery is open circuit (it flashes a LED at one second intervals).

If we assume that the chip is correct, it is not faulty, is programmed correctly, is wired up correctly (all to be ascertained) then about the only thing left would be the timing of the communications with the display. The intervals between commands / data being sent to the display may have been very closely matched with the original specified display and might not be long enough for other generic displays.

If we had the source we could try to lengthen the inter-display-command delay - If I wasn't so rusty I would try disassembling the code far enough to encounter the first call to the delay subroutine - it won't be far in because it will be called by the delay setup subroutine.
SiriusHardware is online now  
Old 5th Apr 2022, 8:48 am   #39
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,587
Default Re: 16x2 LCD problem?

Duh, I meant the DISPLAY setup routine.
SiriusHardware is online now  
Old 5th Apr 2022, 9:19 am   #40
mole42uk
Nonode
 
mole42uk's Avatar
 
Join Date: Aug 2010
Location: Resolven, Wales; and Bristol, England
Posts: 2,614
Default Re: 16x2 LCD problem?

Quote:
Originally Posted by SiriusHardware View Post
Duh, I meant the DISPLAY setup routine.
This project is confusing all of us it seems!

Looking at the magazine article again this morning, I notice that the start-up sequence for the micro includes flashing all three battery voltage LED indicators which doesn't happen with mine - only one of them lights. I am beginning to think there may be a hardware fault so I'll split the circuit down to bare bones and see if anything is revealed.
__________________
Richard

Index:
recursive loop: see recursive loop

Last edited by mole42uk; 5th Apr 2022 at 9:33 am.
mole42uk is offline  
Closed Thread




All times are GMT +1. The time now is 6:26 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.