Thread: Convert bits to voltage levels...

  1. #1
    Registered User
    Join Date
    Feb 2008

    Convert bits to voltage levels...

    Hello. Im new to C/C++ programming. I would like to know if it is possible to convert bits ( user input or via file) to voltage levels? what i mean is assigning bit 1 +5v and bit 0 -5v .. and then output it for display ( graphical format mayB).

    Does C or C++ allows me to do this?


  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Uh yeah. You can make data represent anything you want. Data is only meaningful in the context of a program that knows how to utilize it.

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Note that if there is an easy part and a hard part, the easy part is to read the data (bits) and make them voltage levels (+5, -5). The hard part would be diplaying them nicely in a window.

    If you want a simpler format you can diplay it on the command-line with something like this:

  4. #4
    Registered User
    Join Date
    Oct 2008
    Choose whatever encoding scheme you like as long as it doesn't conflict with the internal workings of the chip. Because inside the machine bit 0 is 0V and bit 1 is +5V ( it is actually a discreet range) so what matters is how you want it displayed. Is it just to plot a graph of points representing voltage levels or do you want to see the output on an oscilloscope?

  5. #5
    Registered User
    Join Date
    Feb 2008
    @ C_ntua .. Yes thats the hard part indeed. I know how i will be converting and assigning voltage levels but to display them is the problem.. If i want it to be on a graph, then how can i concatenate all the outputs for specific bits? is this worthwhile to do in C/C++ ?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to convert to left justified bits?
    By Subsonics in forum C Programming
    Replies: 18
    Last Post: 02-18-2009, 07:16 PM
  2. How to convert binary number to 8 bits
    By aloy in forum C++ Programming
    Replies: 1
    Last Post: 04-16-2008, 03:42 AM
  3. SDLKey to ASCII without unicode support?
    By zacs7 in forum Game Programming
    Replies: 6
    Last Post: 10-07-2007, 03:03 AM
  4. trying to convert system bytes into bits and nibbles.
    By kraze_505 in forum C Programming
    Replies: 11
    Last Post: 01-25-2006, 02:27 AM
  5. convert 4 bits Hex to decimal
    By demo2000 in forum C Programming
    Replies: 4
    Last Post: 12-12-2005, 10:44 AM