- This topic has 2 replies, 2 voices, and was last updated 9 years, 11 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › Make a half duplex IR data modem – using obstruction sensors
I need to make this project . Kindly help and tell me how to proceed.
Hi Harsha,
Kindly share maximum details about your project including circuit diagram and working details.
I am planning to make modem prototype using 2 obstacle sensors. One I will be using as receiver and other one as transmitter
PORTA- ADC
Transmitter code-
DDRA|=0xff;
while(1)
{
sbi(PORTA,0);
_delay_ms(1000);
cdbi(PORTA,0);
_delay_ms(1000);
}
RECEIVER
int main(void)
{
int c=0;
uart_init(UART_BAUD_SELECT(9600,F_CPU));
sei();
uart_puts(“initialized”);
DDRA|=0x00;
while(1)
{
c=bit_is_clear(PINA,0);
if(c==1)
{
uart_putc(‘A’);
uart_puts(“hello”);
}
else
{
uart_putc(‘B’);
}
}
}
Is it right?