detecting and creating sine waves
Here is an example of creating a sine wave. http://www.picbasic.co.uk/forum/cont...-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/id...pnote=en011071
To measure the sine wave, you could use a zero crossing detector such as this: http://www.picbasic.co.uk/forum/cont...tant-Interrupt
Or an simpler way: http://ww1.microchip.com/downloads/e...tes/00521c.pdf
http://www.scalerobotics.com
Bookmarks