Society of Robots - Robot Forum

Mechanics and Construction => Mechanics and Construction => Topic started by: maitkaa on October 04, 2012, 06:19:41 AM

Title: need some help with micro controller connections
Post by: maitkaa on October 04, 2012, 06:19:41 AM
Hello

I need some help with micro controller module.I would like do know how to make a program that will write on screen if i connect 1 adc so it will show on screen that there is a connection .
Here is the site of what i am using : http://home.roboticlab.eu/en/hardware/homelab/controller/atmega128?s=translation_true (http://home.roboticlab.eu/en/hardware/homelab/controller/atmega128?s=translation_true)

i must find out how to make digital or analog connections or something like that
Title: Re: need some help with micro controller connections
Post by: newInRobotics on October 04, 2012, 06:57:38 AM
You can send any data from microcontroller to PC and vice versa using USART feature of microcontroller in conjunction with level shifter and serial port/bus of a computer.

To actually detect that something is hooked up to ADC pin using only ADC pin might be difficult if connected device outputs 0V at certain stages. If output device always output anything above 0V, then detection can be based on that fact, hence:
Code: [Select]
if (detected_voltage > 0V)
{
      something_is_connected_to_ADC_pin = true;
}

else
{
      something_is_connected_to_ADC_pin = false;
}