this might help - untried by me
EDIT: My uploads do not appear to work?? - I put the file here as well
http://www.cruxanalysis.com/temp/softwarereset.pdf
this might help - untried by me
EDIT: My uploads do not appear to work?? - I put the file here as well
http://www.cruxanalysis.com/temp/softwarereset.pdf
Last edited by paul borgmeier; - 18th October 2006 at 04:27.
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Brian,
Which model LCD do you have from Densitron? They list 20 diffeent 2x16's.
How long is the cable to the LCD?
I looked at a couple of the desitron datasheets, they seem to be within the spec's for PBP's LCDOUT timing.
And, RS can be either high or low during a write. It would be 0 for a command such as Clear Screen, or 1 to write data to memory.
<br>
DT
Hi Darrel,
I do not have any Densitron LCDs, The LCDs I am using (I have 3) have data sheets viewable at
https://secure4.vivid-design.com.au/...ed/QP-5515.pdf
They are Chinese as are most things these days. The supplied documentation is pretty sparse. I only mentioned Densitron as they were the first appnotes I found with any discussion of setup lines and handshake timings.
I have tried all three LCDs and they all behave the same. I have tried cable lengths from 35 to 400 mm - no difference. The LCD will work most times after a direct MCLR reset. That is, power up, wait a few seconds then manually ground MCLR.
I tried the following code which sets up the interface with Enable already high, waits a short while then takes Enable low for each of the data states described in the manual. I think I have these correct. This code clears the 'all black' LCD cells shortly after startup but then leaves the LCD bank - as though it is turned off in software despite my having the LCD ON bits enabled (or so I think). I have tried a range of PAUSE times to no avail.
I also tried setting up the interface with Enable low, strobing Enable high for 100 uSecs then moving on to the next setup state. No joy there either.
'attention
for a = 0 to 1 ' call attention mode several times
portd = %00010011 ' attention request
pause 1
portd = %00000011 'drop ENABLE
pause 5
next a
'set 4 bit mode
portd = %00010010 'set 4 bit mode
pause 5
portd = %00000010 ' drop enable
pause 5
'set function
portd = %00010010 'first nibble
pause 5 'allow setup time
portd = %00000010
pause 5
portd = %00011000 'select 2 lines 5x7 character set
pause 5 'allow setup time
portd= %00001000 'low ENABLE
pause 5
'display OFF
portd = %00010000 'first nibble
pause 5 'allow setup time
portd = %00000000 'low ENABLE
pause 5
portd = %00011000 '
pause 5 'allow setup time
portd = %00001000 'low ENABLE
pause 5
'display ON
portd = %00010000 'first nibble
pause 5 'allow setup time
portd = %00000000 'low ENABLE
pause 5
portd = %00010001 '
pause 5 'allow setup time
portd = %00000001 '
pause 5
'set entry mode
portd = %00010000 'first nibble
pause 5 'allow setup time
portd = %00000000
pause 5
portd = %00010110 '
pause 5 'allow setup time
portd = %00000110
pause 5
'display ON
portd = %00010000 'first nibble
pause 5 'allow setup time
portd = %00000000
pause 5
portd = %00010001 '
pause 5 'allow setup time
portd = %00000001
pause 5
I will try with another brand of LCD I have at home tonight.
Driving me crazy.
Brian
Ok. I know the issue.
Are you using 4K7 on MCLR?
If so, change it to 10K first.
Then, as mister_e repeated, change BOD_OFF to BOD_ON. This should take care of your problem.
(fingers crossed).
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
If I read post #7 correctly he already is using a 10K resitorOriginally Posted by sayzer
Crossing fingers didn't work on this occasionI have tried 100 nf, 1uf and 10 uF as the MCLR capacitor with 10k to +5.![]()
Still finger crossed for BOD_ON issue.
Even if it is a must to use, at least he can try and see if it is the issue.![]()
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
I bet on LVP. But i'll have a look to the datasheet of the LCD.
What happen if you use a 4MHZ osc?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks