![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
I'am trying to modify this code for my 1x16 display but can only get the first 8 characters to light up, i think it must be something in the function set but i cant realy find out, so if someone can take a look at the code and datasheet??
|
|
|
|
|
|
|
(permalink) |
|
am on my cell so can't really look into it, but I believe a 16x1 display is basically an 8x2 with the 8s side by side. So to address the 2nd 8 characters you need to issue a second line command
|
|
|
|
|
|
|
(permalink) |
|
To add to what Norlin said, to write to characters 8 to 15 send command 0xc0. The second line (or in your case the right hand side of the display) starts at address 0x40 and the command to set address is 0x80 - combined is 0xc0.
Mike. |
|
|
|
|
|
|
(permalink) |
|
I have tryid over and over now but still not got the second 8 characters to light up, so i am not shore where i need to add the second line command.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
You write the start location of the left handside to the LCD, using the control cmd, [0x00] just before you start writing the data to the LCD, then after the 1st 8 characters, write the righthand start address [0x40], then continure with the data write. Code:
hallo write the LCD location 1 here use movlw '0x80' Call OutLcdControl movlw 'H' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'a' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'l' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'l' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'o' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw ' ' movwf LcdDaten ;LCD data call OutLcdDaten ;Ud data LCD movlw 'O' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'Y' write the LCD location 1+8 here use movlw '0xC0' Call OutLcdControl movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw '2' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out movlw 'L' movwf LcdDaten ; LCD data call OutLcdDaten ; LCD data out Do you follow.? EDIT: LCD display addrees from your datasheet. EDIT: Corrected addressing with bit7
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 11:23 AM. |
||
|
|
|
|
|
(permalink) |
|
Thanks Eric
Have just try it, but still not working, so i think now i change over to use a 2x16 lcd, i know a 2x16 works with this program, i have try it before. But the program anyway just use the first line of the lcd |
|
|
|
|
|
|
(permalink) |
|
Eric,
You forgot the command bit, it should be, Code:
;write the LCD location 1+8 here use
movlw '0xC0'
Call OutLcdControl
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
OY2L they do work I have used then often in the past, unless you have a defective one.?
__________________
Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ Last edited by ericgibbs; 7th July 2008 at 11:23 AM. |
||
|
|
|
|
|
(permalink) |
|
I wonder if you couldn't design a somewhat 'generic' PutLCD routine that could keep track of and increment a Tab variable and automatically issue the position control command when needed? Perhaps using assembler equates for determining 1x16, 2x16, 1x20, 2x20, 4x20, etc., display types?
Mike |
|
|
|
|
|
|
(permalink) | |
|
Quote:
Mike. |
||
|
|
|
|
|
(permalink) |
|
I suspect you could too Mike (Pommie) but who's got time (grin)...
I did just get a couple 2x20 displays and a single 4x20 display recently but not sure when I'll get a chance to 'play'. The new 128x64 GLCD with touchscreen and RGB backlight has higher priority for me right now. I'm going to use an 18F4431 with its multiple PWM outputs as a high performance controller and I only just finished writing and testing a bootloader for that device so it's going slowly. Take care my friend. Mike |
|
|
|
|
|
|
(permalink) |
|
There's too many Mike's in those last few posts?
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
Pommie Bruce. |
||
|
|
|
|
|
(permalink) | |
|
Quote:
Edit: Thinking on, a line from that seems to fit? "Just seen a Pommie streaker in the Earl's Court Road" "Must have looked like a bald wallabie, Bruce!" |
||
|
|
|
|
|
(permalink) |
|
Wow! I just found my very first LCD display from many years ago. It's a very large 2x16 display without a backlight. It's really physically huge compared to the compact 2x20 and 4x20 backlit units I received recently.
I remember stopping by a new (at the time) local company called Optrex and speaking with one of their engineers and he gave me this particular display as a sample which I then used it in an EPROM/EEPROM programmer project of my own design which used a Motorola 68HC11FN1 controller. Nigel, Do I need to change my name too Sir? |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Latest |
| LCD Monitor Problem | dimper129 | General Electronics Chat | 3 | 1st April 2008 08:35 AM |
| Scrolling readout on LCD? | karenhornby | Electronic Projects Design/Ideas/Reviews | 0 | 4th March 2008 08:20 PM |
| PIC18F2620 not being able to self-execute control code | ssylee | Micro Controllers | 20 | 19th October 2007 04:58 AM |
| PIC to LCD wiring problem ? | pasanlaksiri | Micro Controllers | 28 | 4th October 2007 10:29 AM |
| Nokia 7110 LCD + questions regarding code and behaviour of LCD. | MrNobody | Micro Controllers | 2 | 19th September 2007 07:50 AM |