thank you for your appreciated effort.I don't see the power/ground connections for the PIC in the schematic. The board layout appears to have them connected and bypassed, though. How does your schematic capture tool specify power pins on these kinds of parts? Are they hidden pins that have to be set via a text box?
In proteus simulator they are connected by default to power and ground terminals ^^
You might want to bypass the power/ground pins on your display -- remember, it's got a microcontroller in it, too.
You have unconnected data lines on your display. Unless the datasheet specifically says that this is acceptable, this is almost always a bad idea.
would be better to connect them ?
i saw a lot of lcd circuit most of them leave unused data line unconnected ^^
i used 1602A lcd.
I don't know enough about your design goals to know whether doing things like tying the RW line on the display hard LO is a good thing or not.
Overall, the board layout looks pretty clean. You might flip the orientation of R1 and move it slightly so that the track from Pin 1 of the PIC goes straight out to it. The fewer jogs and turns the less opportunity for fab issues.
The sizing of the thermal relief tabs on your power connect seem odd -- different sizes on different sides. I'd probably want to make all of them the size of the larger ones.
Hello,
PORTB[4:5:6:7] have internal weak pull-up resistor, as these pin have IOC. Check the datasheet TABLE 4-3 at pag. 47.
So you don't need external pull-up resistors.
thank you
what is the best ? use internal or external ?
simozz
Make sure you include switch de-bouncing logic in your code.
thank you
what i did
read the switch
20ms delay
read switch
if(switch...)
Add a 1N4148 or 1N914 diode from the LCD contrast pin (Vee) cathode to ground. That is the way I've used them for many years. Of course you could use a trim pot if you really want to.
Also check that you don't need a current limiting resistor for the LCD back light.
how to check that.. i connect it directly on breadboard without any problem
I'd put one in and you can use a link if it is not needed. We have used them with the R/W permanently wired too as we have never read the LCD. The other 4 data pins can be left nc.
Does the relay module have a built in FET or transistor? It is a good idea to have a pull down resistor on the relay output so if the PIC resets or crashes and switches to default inputs on the ports, the pump relay does not come on. In fact, on our designs, there is a PIC pin that pulses and drives a capacitively coupled charge pump to supply the output drive so if the PIC is not running, the outputs turn off. That is a good idea when you are driving things in the real world. Loss of control automatically means off.
i dont understand this point ^^
the relay module which i used like in this link
what are the advantages of using internal pull-up compared to externalHello,
I would use internal.
simozz
Internal: Reduced parts count, simpler layout, you have some control over behavior via software.what are the advantages of using internal pull-up compared to external![]()
thank you WBahnInternal: Reduced parts count, simpler layout, you have some control over behavior via software.
External: You have greater control over pullup strength, you don't have to worry about behavior during power-up or unusual operating conditions.
You don't need to place RC filters at the buttons if you're already doing that in code.thank you WBahn
should i connect capacitor with buttons ?
what is the type of decoupling capacitor ?
what is the problem in using programming pins as sw inputs ?By the way, why do you wanna use the programming pin as the sw inputs ?
You can use PORTA or C as Switch inputs.![]()
No problem. It's up to you to do what u prefer but I always try to free the program pins if I can, so I can do debugging without disabling any codes that uses the program pins as IO's.what is the problem in using programming pins as sw inputs ?
![]()
thank you R!f@@No problem. It's up to you to do what u prefer but I always try to free the program pins if I can, so I can do debugging without disabling any codes that uses the program pins as IO's.