Jellis,
I think the problem is your Line 1 and 2 start address. "$80 $C0"
Try $00 - Line 1 and $40 Line 2
Hope this helps
Jellis,
I think the problem is your Line 1 and 2 start address. "$80 $C0"
Try $00 - Line 1 and $40 Line 2
Hope this helps
Are you doing something different?Code:' LCD DEFINES FOR USING 2x16 LCD with PortA in EASYPIC6 DEFINE LCD_DREG PORTA ' Use PORTA for LCD Data DEFINE LCD_DBIT 0 ' Use lower(4) 4 bits of PORTA ' PORTA.0 thru PORTA.3 connect to ' LCD DB4 thru LCD DB-7 respectively DEFINE LCD_RSREG PORTA ' PORTA for RegisterSelect (RS) bit DEFINE LCD_RSBIT 4 ' PORTA.4 pin for LCD's RS line DEFINE LCD_RWREG PORTC ' LCD read/write port DEFINE LCD_RWBIT 2 ' LCD read/write bit DEFINE LCD_EREG PORTA ' PORTA for Enable (E) bit DEFINE LCD_EBIT 5 ' PORTA.5 pin for LCD's E line
The EASYPIC6 schematic says the LCD is on PORTB.
<br>
DT
Yes, Darrel, I have the LCD hooked up to PortA in my development setup on the EasyPic6 via a Port expander with a ProtoBoard.
I also have the prototype PCB board laid out so that the LCD is connected to PortA in the same way as I have it working on the EasyPic. So my LCD DEFINES are correct (at least for the WINSTAR) and work on the EasyPic configuration with the WINSTAR LCD, but they don't on the prototype PCB with the NEWHAVEN display. Hope this makes it more clear.
NEWHAVEN tech support told me that as long as I saw the character dot matrix blocks on Line 1 of the display whenever it is powered up but with contrast to a minimum, it means the module is alive. That is my situation, but still can't get characters to display. I have sent this posting to NEWHAVEN to see if they can tell me why my PBP initialization isn't working, but doubt they will since their examples for their module are all in C.
RA4 is connected in both my EasyPic6 development configuration and in my PCB prototype to the RS pin of the LCD. No Pull-up resistor is used in either case, and why do you ask?....from LCD data sheet the Register-Select is either 0 for command or 1 for data and therefore I didn't think it should have a pull-up resistor but should float free....am I wrong?
On many chips, RA4 is Open-Collector and won't drive the pin high on it's own.
I'm assuming you're still using an 18F4550.
The datasheet doesn't specify, but in ISIS with an 18F4550, the LCD won't initialize without a pull-up.
It could just be a simulator thing.
Try it.
Stick a pull-up in there.
<br>
DT
Tried a 10K pull-iup on RA4 and still no characters appearing on LCD. Going to hook up oscilloscope next to the various LCD interfaces to see if I can figure out what is going on.
I don't know what ISIS is or what you mean by it could be just a simulator thing. Is ISIS a simulator?
For your info I asked Microchip tech support about whether RA4 on 18F2550/4550 is open-collector or not and whether there should be any problem of it driving RA4 high with an LCD interface and here is their response:
----
Hi,
Thank you for contacting Microchip Technical Support.
RA4 can drive the pin High, please configure all the Port pin of PortA to digital by setting the bit in PCFG0-PCFG3 in ADCON1 Register.
For further assistance, do write to us with the following details.
1) Please attach your code along with MPLAB IDE workspace.(MCP and MCW files)
2) C18 -Version?
3) MPLAB version?
4) Screen shot of the disassembly listing in the view tab.
Awaiting for your reply
Thanks & Regards,
Microchip Technical Support
I tried that, Mark, and it didn't make any difference.
Where did you get the info of start of line 1 at $00 and start of line 2 at $40 for the NEWHAVEN LCD? I went through the data sheet for the NEWHAVEN display very throroughly and couldn't find anywhere that it specifies the 1st character address in Line 1 or Line 2. For that matter, I also went through the data sheet for the WINSTAR LCD and it doesn't show $80 or $C0 either.
I found the line address in the Newheaven data sheet. The bottom of
page 6. But it could be something else?
Bookmarks