View Full Version : need help on pic
mohammed omara
- 5th November 2010, 11:38
hello
i need to now if i can compare between two sine wave by pic 16f877A or pic 16f628A?
that the input of pic become sine wave , can the pic read that wave or can generate it?
how i can do this ?
Any ideas?
ScaleRobotics
- 5th November 2010, 12:35
Here is an example of creating a sine wave. http://www.picbasic.co.uk/forum/content.php?r=229-Sine-wave-using-DT-interrupts The first code example uses HPWM, and could be modified for your chip. (The second example uses the PCPWM and can only be used with the 18F2431 family). Here is a microchip application note that it is sort of based on: http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011071
To measure the sine wave, you could use a zero crossing detector such as this: http://www.picbasic.co.uk/forum/content.php?r=230-Zero-Crossing-Concept-Using-Optocoupler-GPIO-Change-Int-and-DT-s-Instant-Interrupt
Or an simpler way: http://ww1.microchip.com/downloads/en/AppNotes/00521c.pdf
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.