Pic 16F877 LCD 16X2 v2.0

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Pic 16F877 LCD 16X2 v2.0

Post 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.
Attachments
Flowcode2.fcfx
(5.4 KiB) Downloaded 446 times
Screenshot (7).png
(122.23 KiB) Downloaded 2724 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Pic 16F877 LCD 16X2 v2.0

Post 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
Martin

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post by dedajozo »

Thx Martin,

I wil try that.

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post by dedajozo »

Thank you again Martin, it works fine.

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post 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
Attachments
Termometar.fcfx
(8.69 KiB) Downloaded 483 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Pic 16F877 LCD 16X2 v2.0

Post 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.

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post by dedajozo »

Hello,

i tried to change properties and also I replaced pic with 16F877a but same thing .

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Pic 16F877 LCD 16X2 v2.0

Post 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?

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post 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.

dedajozo
Posts: 45
Joined: Sun Jan 03, 2016 5:48 pm
Has thanked: 8 times
Been thanked: 6 times

Re: Pic 16F877 LCD 16X2 v2.0

Post by dedajozo »

Hello,

the solution for my project is voltage regulator 7805. Everything works fine fine without variations.

thx

Post Reply