PDA

View Full Version : 16f886



Larry
- 3rd November 2008, 19:48
I'm trying to put a display on an LCD using the '886. and am using a 4MHZ internal clock. I can't make it work. I can substitute a '876 in the same circuit with a Xtal osc. and it works fine. Any ideas? My display is a LM044L, 20X4.

mister_e
- 3rd November 2008, 19:52
Could you post your whole code including your Configration Fuses?

tenaja
- 4th November 2008, 03:40
I'm trying to put a display on an LCD using the '886. and am using a 4MHZ internal clock. I can't make it work. I can substitute a '876 in the same circuit with a Xtal osc. and it works fine. Any ideas? My display is a LM044L, 20X4.

You need to read the datasheet regarding all of the PORTs used to control your LCD. The PORTs on the '88x line have new features, requiring new register settings. Unfortunately, the default register settings make them incompatible with old code without edits. I can't remember the settings off-hand, but I do know from experience that reading and setting each and every register setting will get it to work.

Larry
- 4th November 2008, 16:53
Thanks for the input on my last post. The port used to control the LCD was not set-up properly. I did a Trisb=0, making it all outputs, but apparently you have to set the ANSELH register to 0, which I interpreted as strictly for configuring the port for inputs. Setting the port for digital I/O is required. Again, thanks for the input.

mister_e
- 4th November 2008, 16:57
Keep this link handy
http://www.picbasic.co.uk/forum/showthread.php?t=561

I also recommend you download the document i'd suggest at the above link too.