PDA

View Full Version : lcd not working



robertpeach
- 4th September 2009, 13:18
im using a pc1602aru-h lcd with a pic18f2431

ive coded my pic with
define osc 20

Define lcd_dreg portc
define lcd_dbit 4
define lcd_rsreg portc
define lcd_rsbit 0
Define lcd_ereg portb
define lcd_ebit 3
define lcd_bits 4
define lcd_lines 2
define LCD_commandus 1500
define lcd_dataus 44


pause 1000
main:
lcdout $FE,1,"hello"
lcdout $FE,$C0,"world"

pause 1000
goto main

end

there is probably something wrong with my code... but however it doesnt stop the fact that im getting abolsutely nothing coming up on my lcd. its stays as blank as it ever has been.

im pretty sure all my wiring is correct and ive checked there is 5 volts across vss and vdd. anyone help me with this one? dont worry ive checked pretty much every thread i could find on this but to no avail

thanks

Acetronics2
- 4th September 2009, 13:34
IF LCD Blank

1) check supply

2) check there is .5 to.6 v on the contrast pin ...

Alain

duncan303
- 4th September 2009, 13:42
check contrast......... maybe everything is ok.

is there a datasheet for the lcd?

and is it compatable with picbasic -> check melabs site.

could be flogging a dead horse...


.....

robertpeach
- 4th September 2009, 14:28
there is a supply voltage, checked that with multimeter...

im not getting any contrast change at all. whatever voltage i put through the contrast pin. went from 0 - 5 volts and nothing happens.

duncan303
- 4th September 2009, 14:45
Did you check the datasheet yet?

Does it have a 44780 controller or equivalent.


TTHA

..

robertpeach
- 4th September 2009, 15:07
it didnt say anything about the controller apart from lcd controller lsi.
checked the data sheeet before i came on here :P didnt wanna post till i had exausted all other options really

it seems to be pretty much same setup with 4databits default and 14-16 pins etc..

im gonna try and hook it up to a negative voltage across the variable pin to see if it makes a difference,

just wondering... should i be able to see pulses coming out of any of the databits on my pin? if i just hook it up to a thing that shows me pwm etc...

robertpeach
- 4th September 2009, 16:29
being the idiot i was i realised my defines werent in capitals haha...