Connect with us

Micro-controller programming

Discussion in 'Electronics Homework Help' started by exiton12345, Jan 19, 2013.

Scroll to continue with content
  1. exiton12345


    Jan 19, 2013
    Hello friends,

    I have a project to do for one of my exams.

    I have to program a micro-controller to convert (translate) a digital signal (pulse waveform) to binary in real time.

    For instance I see the signal waveform on the oscilloscope and I also want to see it's binary translation on my computer. (i have attached a print screen of the signal seen on my oscilloscope)

    Can someone, please, give me an idea of how to write the micro-controller software? or give me some references?


    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    Nov 17, 2011
    Before you sit down to write code, you first have to know the algorithm that's to be implemented in software. From your sparse description I have no idea what you want to display in binary in response to that signal.
    The duty cycle?
    The average level?

    Once you know what to display in response to the signal, find a way to extract that information from the input. For example, since your input signal is digital, you will need a digital input port and some way to measure the desired quantity. THis could be a capture-compare timer for extracting timing information. Or you could use polling by software, if the input signal is slow.

    Once your algorithm is clear, programming that in SW is generally straight forward.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day