1 Attachment(s)
LCDOUT custom commands - how to?
Hello,
I just bought a LCD from ELECTRONIC ASSEMBLY http://www.lcd-module.de/deu/pdf/doma/dog-m.pdf. It is a ST7036 (HD44780 compatible) controlled display.
After I made all required connexions, it doesn't work but I think I need to initialise the display since some settings like "Display ON/OFF" and "Contrast" are set by software (no cabling).
I've got the initialisation codes in this table (see attachment) but... I don't really know how to use them.
I declared all DEFINEs and wrote to switch the display on? Nothing happens - must be wrong.
The "$FE" must be wrong. I found also the documentation about the controller that pilots this display here http://www.lcd-module.de/eng/pdf/zubehoer/st7036.pdf.
It's surely not complicated, nevertheless I'm a little lost...
Time to go back to basics I think
There are basically two things that could be stopping you display from working.
1. a problem with the PIC
2. a problem with the display.
To test 1....
I would assign an entire 8 bit port for the LCD eg PortB (just for test purposes) and connect LEDs to each bit. Also put LEDs on the pins of another port that you will use for the control lines.
Have a count run from 0-255 and output that to port B and observe that the LEDs count up correctly.
Likewise output all possible combinations on the pins you use for the control lines just to ensure that all your output pins are correctly configured and can successfully light the LEDs.
to test 2......
Once you know that you PIC is capable of driving all the required lines, connect up the LCD display in 8 bit mode and then try all the commands to get it working. Once you have it working it should be simple to change to 4 bit mode.
As far as I can see the only difference between 4 and 8 bit mode is in the initialisation which tells the LCD how it is connected. All subsequent commands should be the same, the only difference being that instead of sending a byte you have to send two nibbles instead which obviously takes twice as long.
I have had a further thought about something that caught me out a few weeks ago when changing to a different display. I didnt have the R/W line connected to the PIC, but I also didnt have it tied to anything either. The origianl display must have had some form of internal pullup/pulldown resistor as it didnt mind about the floating pin but the new display would not do anything until correctly terminated.
The second datasheet you mentioned for the actual controller chip has full examples of initialising in 8 and 4 bit mode so all the actual values you need are listed there. Ignore the fact that it is written in 8051 assembler just use the values in your PBP code. Being 44780 compatable means that it should work fine with LCDout so my bet is a misconfiguration of the PIC or a wiring fault unless you are really unlucky and have killed a piece of hardware.
Fuses!!!! yes, it works really :-)
Wow Joe S!!
Yes it works; I'm very surprised indeed. I was told it was not possible with ICProg.
I'm using PBP. Where did you find the correct syntax to use for every fuses?
Keith,
You're right. Let's go on with method. I'm starting to check as you suggest. Will come back when done.
Got so much to learn today...
Thanks Mister_e,
Fuse config is now clear to me ;-)
Back to my display, I did what keithdoxley suggested but still it's not working.
Finally, I connected my usual display on the PIC with an 8 bit data-bus. It works fine so, for sure, the PIC is not the problem.
I have contacted ELECTRONIC ASSEMBLY and asked for more informations. I still can't believe I would have broken both displays...
For normal use, the display must be set in Read or Write (R/W)?
One last thing about the contrast control: would be the syntax to change the contrast's setting "LCDOUT $FE, $74"? According to the table (Initialise_LCD.bmp) in post #10, it should but how to change the amount of contrast???
2 Attachment(s)
Contrast to be set - yes, but how?
I've got an answer from ELECTRONIC ASSEMBLY (EA). They say this display is fully HD4470 compatible.
So, until the contrast (all the display in fact) is not initialised properly, nothing will happen on the display.
I've got this table extracted from the PDF file I inserted in my first post:
http://home.citycable.ch/flotulopex/...ialise_LCD.bmp
This example is for a 8 bits display. I would prefer to use it with 4 bits but if it is easier to start this way...
Can somebody tell me what syntax I have to use to modify the contrast settings?
Is it LCDOUT $FE, $74? I tried this already but nothing happened.
I don't understand how to use this table. Could somebody explain me please?
BTW, EA also sent me some assembly examples (see attachments); for those who understand this, it may help, maybe. Unfortunately, I don't know assembler...
Mister_e, see the picture? Thanks you, again ;-)
LCDOUT xx, xx explanations needed PLEASE
Until I can try all what you suggest, I would like to understand how you Guys read and interpret the codes in the Initialisation Table I put in my post #19. It looks so obvious to you, unfortunately it is not to me...
As an example, I would like to know how you come to a LCDOUT $FE, $0C to switch On the display.
In the table the line sais Display ON/OFF, you see the bits RS(I don't even know what this one is for) and R/W, and then you have for each DB7...0 a value (0 or 1). Finally you've got this $0F value which appears to me as coming from nowhere.
I admit that the $FE is a standart value for sending datas to the display.
But, in this example, where comes the $0C from? I'm lost...
I'm missing this very basic stuff and bothering you with stupid questions so was this discussed in antoher thread already?
Hardware issue now: LEDs....
I must wait unil tomorrow morning: missing a few LEDs...