Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] PIC16F84A-based LCD timer need help

Status
Not open for further replies.

su1c1d4l

Newbie level 6
Joined
Feb 18, 2010
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Philippines
Activity points
1,372
hello, can you help me out with this one? im trying to make a LCD timer with PIC16F84A that could control the operation of four relays at a given time you choose. but i don't know how to program timers that much. :|

it will be a 24-hour clock,that would start at 00:00 when it is powered on. then it will ask for the time in which the relays would be active.
Heres the schematic:
**broken link removed**
 

Basically, set up the TMR0 to generate periodic interrupts, you might have to do some software post-scaling to get realistic timing intervals. You could use seconds or even minutes depending on the accuracy you need. Count the intervals, carrying minutes to hours to maintain a real time clock.

With all of that handled in interrupts, you can loop code checking for the switches being operated without worrying about the clock missing counts. The clock will always be correct (subject to the crystal accuracy) no matter what else you do in the program so you can code the time selection and saving (to EEPROM?) in any way you want.

The way you have the reset switch connected is suspect. It will certainly reset the circuit but probably not in the way you intended. :D

Check the capacitor values around the crystal too. Should they be pF not µF ?

Also add decoupling capacitors across the supply.

Brian.
 
Hi,

What can also be done is make a 1 minute delay and use switches to set the amount of time delay required and set according, so if you need 10mins, call the 1min delay 10 times. The switches can be used to generate interrupt by using the RB change on interrupt function. (But this would require a little bit of change in your hardware.)

You could also do as betwixt has mentioned.

Hope this helps.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top