Page 1 of 1
Pic 16F877 LCD 16X2 v2.0
Posted: Fri Aug 05, 2016 9:07 am
by dedajozo
Hello all,
I made few projects with pic 12 series and all are good.
Now I'm triing to interface pic 16F877 to lcd 16X2 v.2.0. I cant start it, can somebody help help me.
It is just simple project with lcd and one led blinking.
Schematics in proteus and flowcode project is in attachment.
Thank you in advance.
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Fri Aug 05, 2016 10:43 am
by medelec35
Hi dedajozo,
There should be two caps connected to the crystal:
- Sim1.png
- (42.6 KiB) Downloaded 6051 times
In the real world you will also require a pull-up resistor from MCLR (pin 1 16F877) to +supply.
I would do that via a 10K resistor.
Martin
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Fri Aug 05, 2016 11:01 am
by dedajozo
Thx Martin,
I wil try that.
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Sat Aug 06, 2016 10:46 am
by dedajozo
Thank you again Martin, it works fine.
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Tue Aug 09, 2016 5:16 pm
by dedajozo
I tried to put lm35 temperature sensor on same program. On proteus simulator everything works fine but in the real world the temperature on display varies a lot, on the lm35 out I have stable voltage,
Any suggestions.
thx
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Tue Aug 09, 2016 6:51 pm
by Benj
Hello,
In the ADC component properties try changing the conversion speed to FOSC/8 or /32 and aquisition cycles can probably be a bit lower, say 10 or 20.
Hopefully this will improve things.
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Wed Aug 10, 2016 4:21 pm
by dedajozo
Hello,
i tried to change properties and also I replaced pic with 16F877a but same thing .
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Thu Aug 11, 2016 3:09 pm
by Benj
Maybe placing a cap 100nF - 10uF on the power rails near the LM35 would help. The LM35 datasheet may have more info on what the sensor needs.
A pF/nF cap between the analogue pin and ground can also act as a low pass filter if you want to get rid of some excess ripple.
Does the analogue signal run near to any potentially noisy or high frequency digital traces?
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Fri Aug 12, 2016 1:39 pm
by dedajozo
Everything is on experimental board, maybe there is some noise. What do you think is it problem with crystal? Voltage on pic pin from lm is ok and stable it seams that pic is making confusion. Also crystal is 10 mhz I think. On crystal writes 10.0M440.
Re: Pic 16F877 LCD 16X2 v2.0
Posted: Wed Aug 17, 2016 1:57 pm
by dedajozo
Hello,
the solution for my project is voltage regulator 7805. Everything works fine fine without variations.
thx