I may not be looking at it correctly and I think LCDOUT over rides it???
The TRISA posted has your LCD pins set for input?
I may not be looking at it correctly and I think LCDOUT over rides it???
The TRISA posted has your LCD pins set for input?
Dave
Always wear safety glasses while programming.
I see no LCD defines in your code... please put them in.
They are in the PICBASIC manual and tons of examples on this forum. Set them up for the way you've got your LCD wired.
Yes, contrast works on three different (brand new) LCD's. All LCD defines are now at default which is:
PORTA.0 =Data bit 4
PORTA.1=Data bit 5
PORTA.2=Data bit 6
PORTA.3=Data bit 7
PORTA.4=R/S
PORTB.3=Enable
R/W is grounded
I Disabled MCLR to eliminate the need for pull-up and hassle. I also tried TRISA=%00000000 and TRISB=%00000000. I will post anything you need. Pictures, or anything else. I can even switch to a breadboard and eliminate possibility of circuit board issues (proto board) although I have spent literally 20 hours soldering and de-soldering an looking at every little solder joint, then using PWM and other commands to make sure the chips are good and working properly.
Thanks for your help on this. Very, very much appreciated...
Last edited by LetTheSmokeOut; - 7th June 2008 at 07:21.
Melanie is asking to see the part of your code that looks something like this;
Code:DEFINE LCD_DREG PORTB define LCD_DBIT 4 DEFINE LCD_RSREG PORTB DEFINE LCD_RSBIT 1 DEFINE LCD_EREG PORTB DEFINE LCD_EBIT 0 DEFINE LCD_BITS 4 DEFINE LCD_LINES 2 DEFINE LCD_COMMANDUS 2000 DEFINE LCD_DATAUS 50
Dave
Always wear safety glasses while programming.
Yes indeed. I am using the defaults explained in the PicBasicPro manual. It states that you don't need any defines if you are going to accept the defaults which are what I stated above. Is this not the case? I've used the program with LCD defines and without, but I can put them back into the program just to make sure. I have also used defines for a different pin setup that allowed PORTB.3 to be used as PWM output while the other pins ran the LCD.
This should be what I have setup at the moment:
(CODE)
DEFINE LCD_DREG PORTA
define LCD_DBIT 4
DEFINE LCD_RSREG PORTA
DEFINE LCD_RSBIT 4
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 3
DEFINE LCD_BITS 4
DEFINE LCD_LINES 1
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
(/CODE)
Bookmarks