The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Design Languages >> Verilog-AMS >> Convert binary analog outout to dec https://designers-guide.org/forum/YaBB.pl?num=1302145251 Message started by Streamcx on Apr 6th, 2011, 8:00pm |
Title: Convert binary analog outout to dec Post by Streamcx on Apr 6th, 2011, 8:00pm I have 8 inputs. Each input represents discharge in binary. For example: In0 - LSB, ..., In7 - MSB. I have 1 output. I want that to out decimal code. And i want change period optionally. I want know how to use "analog begin", and timer to write my code, because I don`t know how it works jointly. I have write some code, that works but I have one's doubts about correct work. Is this works only when binary digit grows up? I need this to work when binary digit downs (or grows). But I don`t know how this works, beacuse I do not know how timer works. Is decimal out refresh out digits depending on timer or decimal out saves constantly his digits? Code:
|
Title: Re: Convert binary analog outout to dec Post by boe on Apr 7th, 2011, 2:25am Streamcx, Your code constantly updates the output; it also creates a discontinuity every time the input changes. If you want to change it at the timer events, you should convert your input inside the timer event and then assign it to the output through a transition filter. B O E |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |