[SOLVED] How to generate 16-bit binary values?

Status
Not open for further replies.
Joined
Dec 4, 2012
Messages
4,280
Helped
822
Reputation
1,654
Reaction score
791
Trophy points
1,393
Location
Bangalore, India
Activity points
0
I need to generate 00000000 00000000 to 11111111 11111111. How to do that?

Edit: Just loop values 0 to 65535 and assign it to DAC port?
 

I'm not sure what you mean... do you need to generate random values? And what's the DAC meant to be used for?
 

If DAC o/p is 5V (max) then I amplify it to 50V DC. The issue got solved. I don't need random values. I need sequential values from 0 to 65535.
 

Maybe. I don't know. Somebody on the net asked that he/she wants 50V from a dac circuit and the o/p of dac will be 4.7V. See attached file. I have done something like this.
 

Attachments

  • PIC16F877A_LTC1655.rar
    19.1 KB · Views: 63

Assuming this will be the real circuit you'll be using, you should put a protection resistor up of RV3 to limit the maximum reference voltage value (when I put RV3 full up the voltage on the display continues rising without stopping, getting over 50V).
Anyway, if your purpose was to get sequential numbers (of whatever size), I guess a simple loop would do the trick. Or did we miss something in the middle? Anyway, I'm glad you found a solution
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…