Searching \ for '[PIC]: Reading output into makeshift data logger' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/memory.htm?key=data
Search entire site for: 'Reading output into makeshift data logger'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Reading output into makeshift data logger'
2001\06\07@120124 by Drew Vassallo

picon face
People,

I have the need to record the pulse width and duty cycle of a square wave
output of one PIC pin (using the 16C71), but I am really short on
sophisticated instrumentation, analyzers, etc.  My idea is to hook the
output pin into the joystick port on a standard PC, which accepts up to 5V
input.  Reading the port is trival and should be able to be done at quite a
rapid sampling rate.  My intent is to record the elapsed time between pulses
and output it to a file for later analysis.

My only question (not being an EE, myself) is what I should watch out for in
terms of rise/fall times in driving the joystick port?  Should I measure
anything first to make sure that it's possible?  Impedance?

I'd like to get as accurate a pulse width measurement as possible, but would
also like to make it as simple as possible.

Thanks for any advice.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@125913 by Mark Newland

flavicon
face
Being that the PC is running software and that software has a delay from the
time a signal is present till the time that the software can detect it and
respond to it, you will have a delay.  Is that delay consistant enough for you
would be my question.

Drew Vassallo wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@131339 by Mike Mansheim

flavicon
face
> I have the need to record the pulse width and duty cycle of a square
> wave output of one PIC pin (using the 16C71), but I am really short
> on sophisticated instrumentation, analyzers, etc.  My idea is to hook
> the output pin into the joystick port on a standard PC, which accepts
> up to 5V input.  Reading the port is trival and should be able to be
> done at quite a rapid sampling rate.  My intent is to record the
> elapsed time between pulses and output it to a file for later analysis.

Can't help with the pc interface, but have a suggestion for a different
approach.  I would hook the output pin to another pic, and use that pic
to process the information & then send it to the pc.  Since the second
pic has only this function, you could even consider transferring the info
parallel instead of serial.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@135353 by Mark Newland

flavicon
face
Why need a 2nd PIC.  Since all the information is in the 1st PIC, just send
that information out as digital information to the PC directly.

Mike Mansheim wrote:

{Quote hidden}

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@174713 by Mike Mansheim

flavicon
face
> Why need a 2nd PIC.  Since all the information is in the 1st PIC,
> just send that information out as digital information to the PC
> directly.

My first thought was that the first pic was being fully used.  I also
assumed he wanted an "independent" monitor, like a piece of external
lab equipment.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@184344 by Drew Vassallo

picon face
> > Why need a 2nd PIC.  Since all the information is in the 1st PIC,
> > just send that information out as digital information to the PC
> > directly.
>
>My first thought was that the first pic was being fully used.  I also
>assumed he wanted an "independent" monitor, like a piece of external
>lab equipment.

This is correct.  The first PIC has absolutely no room to transmit any
additional data.  However, even the 2nd PIC would require some time delay to
transmit the information via parallel, and this might not be acceptable.
I'd like to keep my resolution (sampling rate) as fine as possible.

Still in need of suggestions,

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\07@185218 by Bob Ammerman

picon face
Use a 2nd PIC with a CCP module to capture to high resolution. Send
resulting info via USART to a PIC.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Original Message removed}

2001\06\07@203609 by Drew Vassallo

picon face
>Use a 2nd PIC with a CCP module to capture to high resolution. Send
>resulting info via USART to a PIC.

I'm with you up until the last word: PIC.  So I need 3 PICs now?

I still need the continuous stream of data being logged somewhere so that I
can use it on a PC.  I still don't see how this helps me.  Sorry if I'm
missing something.

--Andrew
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\06\08@015749 by Kevin Moll

picon face
> Being that the PC is running software and that software has a delay from
the
> time a signal is present till the time that the software can detect it and
> respond to it, you will have a delay.  Is that delay consistant enough for
you
> would be my question.
>
What sort of frequencies are you talking about ?  I don't know what input
voltages are used on an audio line-in, but you could use a voltage divider
and your sound card.  As long as your signal doesn't exceed 20 kHz, it
shouldn't pose a problem.  This way, you also wouldn't have the problems
w/the delay in Windows because blocks of  information are buffered by the
hardware.  You could then easily parse the generated *.wav file to find
freq/duty-cycle.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\08@083608 by Bob Ammerman

picon face
From: "Drew Vassallo" <spam_OUTsnurpleTakeThisOuTspamHOTMAIL.COM>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Thursday, June 07, 2001 8:36 PM
Subject: Re: [PIC]: Reading output into makeshift data logger


> >Use a 2nd PIC with a CCP module to capture to high resolution. Send
> >resulting info via USART to a PIC.
>
> I'm with you up until the last word: PIC.  So I need 3 PICs now?

No, you need two PIC's. The last word should have been PC (not that I
consider a PC to be the last word in computing ;-)

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level
software)

{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\08@140641 by Olin Lathrop

face picon face
> Can't help with the pc interface, but have a suggestion for a different
> approach.  I would hook the output pin to another pic, and use that pic
> to process the information & then send it to the pc.

I would especially recommend a PIC that has a CCP module for capturing the
pulse (or maybe two if you need both edges) and a UART for sending the
result to the PC.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, olinspamKILLspamembedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\06\09@021837 by Peter L. Peres

picon face
Imho the joystick port is a poor choice for this. It is a part of a
monostable and it expects to see a resistor there. Worse, all modern
joystick ports and built into the motherboard silicon and you will
definitely run the risk of burning the motherboard chips if you play with
this.

You can measure period by running a tight constant speed poll loop on any
parallel port input pin (there are five or 13 to choose from). This will
be upset by the realtime and interrupt routines of the OS. They will
disturb your activity at least once per second and much more if you write
or read to disk, or for no other reason.

That being said, there is a way to set the serial port for the highest
available speed (115k usually) and send your unknown period on RxD while
sending 0xFF at 8n1 continuously with a simple AND gate wired at the input
(silicon diode between TxD and RxD and resistor to your data source).
Software will be able to extract the edges and measure them with some
(haha) accuracy like this, especially if you can integrate for some time
(hundreds of edges).

If you have a soundcard then you could ac couple yoiur signal to it and
run a Fourier analysis from which you should be able to tell the period
and the duty cycle after some calculations and figuring.

Finally you could wire a PIC as period measuring device with serial ouput.

hope this helps,

Peter

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body


2001\06\09@075423 by Alexandre Domingos F. Souza

flavicon
face
>Imho the joystick port is a poor choice for this. It is a part of a
>monostable and it expects to see a resistor there. Worse, all modern
>joystick ports and built into the motherboard silicon and you will
>definitely run the risk of burning the motherboard chips if you play with
>this.

       Of course he can buy a joystick card...

>If you have a soundcard then you could ac couple yoiur signal to it and
>run a Fourier analysis from which you should be able to tell the period
>and the duty cycle after some calculations and figuring.

       Math, math, math, math... :oO


---8<---Corte aqui---8<----

Alexandre Souza
EraseMEtaitospam_OUTspamTakeThisOuTterra.com.br
http://planeta.terra.com.br/lazer/pinball/

---8<---Corte aqui---8<----

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email listservspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...