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.

keeping and displaying time of a signal that present pic

Status
Not open for further replies.

engineer khan

Member level 3
Joined
Aug 31, 2012
Messages
66
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,833
the circuit is very simple PIC18f gets signal from external world and displays its presence time duration on hyperterminal or lcd how to do that, if it is software based that will be better
 

if the PIC18 has an internet connection (wired ethernet or WiFi) you can connect to a time server to get the date and time or if you have a modem use that
 

You may use an internal timer to count how much time the signal has been there. You may need to adapt the signal values to a digital one, and to determine when the signal value is 'useful' for your application.

When the PIC detects a signal it starts to count, and when it doesn't you finish the count. When a simple mathematical operation you can calculate the time the signal has been there.

I hope you found this useful.
 

Your requirement is somewhat unclear. Do you want the pic to work as an RTC, with the actual time being set automatically?

In that case, a cheap gps module would be your best bet; also, since you are not interested in locating information, the gps would output a time signal even when it sees just one satellite, so it should work indoors as well.
 

That depends of the external circuit. The current to measure must go through a resistor so it generate a potential difference between its terminals. Something to take into account is that the resistor voltage is not referenced to ground (GND) so you must use a differential amplifier and then measure its output with the ADC.

The resistor value depends of the current you want to measure, but it shouldn't be above 1 ohm (remind that current is measured in series with the circuit, so a high resistance could make it to work differently).

I think that a instrumentation opamp should be used because its high input impedance and precision.

Then, whatever you get from the A/D convertion will be directly proportional to the current flowing through the resistor. Depending of that resistor value you make a simple and well known count: I=V/R.

If your resistor is a 1 ohm one and you get 1024 as A/D conversion a 5V voltage (if VREF+ = 5V) should be measured between the resistor terminals, and making the count you will obtain a 5A current trough the resistor.

I know that you won't measure such a high current, but it's for you to see how a resistor can affect a circuit.

Think about the measuring range so you can adjust the reference voltages to get the more accurate measurement. 10-bit conversion is better than 8-bit one because you get more 'possible values', but it depends of your necessities.

About the graphical part, it depends of you, it can be in 7seg displays, LCD, PC (via USB or RS-232), GLCD, etc.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top