PDA

View Full Version : PIC16F690 LCDOUT problem



JohnWakeTech
- 25th April 2012, 02:45
Have no problems displaying text with the following

DEFINE LCD_DREG PORTC
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_REBIT 6
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 7
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 1640
DEFINE LCD_DATAUS 44

But this won't work

DEFINE LCD_DREG PORTC
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTC
DEFINE LCD_REBIT 1
DEFINE LCD_EREG PORTC
DEFINE LCD_EBIT 0
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 1640
DEFINE LCD_DATAUS 44

Any ideas?

Demon
- 25th April 2012, 03:00
Port C has analog features, try setting them to digital.

http://www.picbasic.co.uk/forum/showthread.php?t=561

Robert

JohnWakeTech
- 25th April 2012, 03:10
I don't understand why I can send out data on RC4-RC7 without setting to digital, but not E and RS on RC0 and RC1? I thought setting to digital was only needed for input on pin that was also A/D input.

JohnWakeTech
- 26th April 2012, 01:35
Robert, you were right. Setting ANSEL and ANSELH fixed it. Thanks.