View Single Post
  #4   Report Post  
forTe
 
Posts: n/a
Default I/O-ing Frequencies on ATMega8

Ok, so I now realize that I need to be a bit more specific.

So let me clarify the purpose. Basically what I am trying to do is have
the ATMega8 output a square wave from two pins at a frequency (the
frequency does not matter as I'll explain in a minute). One pin needs
to output a low and one pin a high (Low being 0 Volts, High being 5
Volts) so that I have at each time a single pin giving a high and a
low. Both signals are sent to an IC that will process the signal (the
way it processes it does not matter) and send a signal back to the
microcontroller hopefully at the same frequency (thats what I am
testing). I will then need this signal coming from the IC to be used as
input to the microcontroller via one pin and output yet again via
another pin to another IC. This will happen for 3-4 ICs, and I will
analyze the frequency at certain points at calculate signal loss as a
percentage (assuming there is signal loss, since that is the point of
doing this test) compared to the number of ICs. If perhaps I run out of
room on my single 28 pin ATMega8, then I will have to move to another
ATMega, but I am hoping to keep it on one ATMega.

So basically here is what has to happen on the Microcontroller:
I generate an identical original signal from two different pins on the
controller.
I then have to receive a signal and output the received signal from a
different pin.

Hopefully that clarifies the purpose/procedure.

Rich Webb:
I doubt very much that there's pre-written code.


I was afraid of that since my google searches turned up very little. I
need to go back and look more closely at the AVRFreaks website and
forums and see If I can turn up something. However now that I've
explained it a little better perhaps somebody can point me towards some
pre-written code that has bits and pieces of what I am trying to do. I
really need some good sources to some Assembly or C code that contain
things like input output and generating with PWM or internal clocks.

And just so nobody worries- I have the IC/analog portion of my circuit
already planned out so I don't think I need much help there. Its just
in the coding of the uC that I need a little push in the right
direction.

Thanks

ForTe