In this lesson, we 'll learn to use the PIC 16F84A to generate a sine wave signal using lookup table method .
These are pre-calculated values of a certain signal ( here will be a sine wave ) , then the signal is transmitted at execution time . You can consider this an inverse process of the digitization . At execution time, the signal is sent to the output port of the Microcontroller at the rate you determine. You then get the original signal.
Attached a text file that explains how I calculated the values.
The hardware circuit is very simple. It is called Resistor Ladder Network.
When you configure and run your program , you should get an output signal like this
You can get the circuit for Proteus ISIS 7 and the code from here.
If you need any help for configuring the simulator , check my older posts.
You can also contact me directly if you need any further help.
If you like this blog you can support us by many ways:
1. Leave comments stating your point of view about this article.
2. Buy our book on Amazon Learn By Making.
3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free.
Amazon.com - Read eBooks using the FREE Kindle Reading App on Most Devices
Join Amazon Kindle Unlimited 30-Day Free Trial
Try Amazon Prime 30-Day Free Trial
Shop Amazon - Give the Gift of Amazon Prime
Try Audible and Get Two Free Audiobooks
Thank you for visiting our blog.
3 comments:
hi hugo,
in the lookuptable
u say
we add half this value 128.
128
150.2269667
171.7785783
192
how do u get these figures?
add 128 to what numbers?
Thanks
Hi . Thank you for commenting. I first multiplied numbers by 128 . Then added 128 to them to prevent having negative values. You can find the updated file in the link.
Thank you, hugo.
I understand it now.
:)
Post a Comment