Hi Ralph,
Nope...![]()
![]()
Best regards
Richard
Richard,
could you post a schematic?
(just the connections between the PIC and LCD)
Last edited by NavMicroSystems; - 2nd August 2005 at 18:08.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hi Ralph,
Sorry, but I don't really have the tools to do a quick schematic.
I have the PIC + LCD + Voltage regulator on a breadboard at the moment.
The lines are as follows:
data: pin portb.2 --> LCD data pin
clock: pin portb.4 --> LCD clock pin
chip select: pint portb.0 --> LCD CSB pin (LOW = selected)
command: pin portb.1 --> LCD RS pin (LOW = command, high = data)
The voltage regulator is a ultra-low dropout 5V +/- 0.025V and can supply
enough current. It has tant caps on both sides of it of the correct size, and has been used for other projects.
The LCD backlight is not connected (it is actually a seperate part), and the LCD uses 0.25mA when powered according to the spec sheet.
Best regards
Richard
Richard,
that looks good so far.
How about the other pins on the LCD controller?
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Hi Ralph
The other pins are tied to either GND, or 5V as per the circuit drawing that comes with the LCD. The LCD pdf can be downloaded here:
http://www.lcd-module.de/eng/pdf/doma/dog-me.pdf
I am using 5V, SPI interface, as every other pin on the PIC will be used (eventaully). At the moment, the extra PIC pins are not connected.
Best regards
Richard
Sorry to butt-in here, but I noticed a few things that might cause you problems.
Change OSCCON = %01101110 to OSCCON = %01101100. This jives with your particular oscillator configuration.
You're writing to SSPCON configuring it for "SPI Master", but you're not using this hardware with shiftin/shiftout. Don't setup SPI hardware if you don't use it. This affects RB1, RB2, and RB4.
Hi Bruce
I was originally using SEROUT, but then it was pointed out that for SPI mode, I should be using SHIFTOUT. I have since corrected it, and resposted the code.
Later, I will attach a A/D on the SPI bus, so it is important to get these things right !
Best regards
Richard
Richard,
Bruce is absolutely right regarding the OSCCON and SSPCON settings.
The latest code you have posted still contains incorrect values.
(I had mentioned OSCCON earlier)
I'm not sure if writing to SSPCON would have any negative effect, but as you are not using the MSSP module it doesn't help either, so just remove that line.
To help any further I would have to have a closer look to the datasheet.
(I will when I find time to)
P.S.
There is one more thing you could try:
run some loops that set "contrast" and "bias" vlaues from $00 to $FF
at some point "black boxes" should appear on the LCD.
regards
Ralph
_______________________________________________
There are only 10 types of people:
Those who understand binary, and those who don't ...
_______________________________________________
Bookmarks