Maker Pro
Maker Pro

Micro-controller programming

exiton12345

Jan 19, 2013
2
Joined
Jan 19, 2013
Messages
2
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?

Thanks!!
 

Attachments

  • untitled.PNG
    untitled.PNG
    4.2 KB · Views: 136

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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?
Frequency?
...

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.
 
Top