Electronics prototyping was taken to new heights by the introduction
of arduino. The small board could do many wonderful things,but the
beauty that makes it stand apart from others is it`s versatility and
easiness.
Most of us while doing our projects would have searched for a communication method with PC, and ended up using USART by level converters (MAX232) or perhaps a USB-Serial cable.Serial ports are disappearing from systems these days. Obviously USB is the only choice..So what to do? First thing you would say is to use a USB to serial converter cable that is cheap to buy. Unfortunately as many of you would have observed these are not reliable many a times. next option is to use a FTDI breakout boards like this https://www.sparkfun.com/products/9115. So if you can`t reach out for an FTDI board or any of those serial converter cables, you`l think you are doomed just like i did at that time.So no way out? Nope there is a way!
Do you have an arduino sitting around idle?, Well then your`e in luck! This little thing could save you from the problem!. Arduino has an inbuilt USB communication mechanism built in as most of you would be knowing by means of Atmega16U2 (Atmega8U2 up to version R2). So i was thinking how to use the chip for our needs? say while using a bigger powerful micro controller or an ARM processor?
Answer is simple just make sure on board Atmega328p doesn’t interfere the port and use Tx,Rx pins for communication! simple as that!
void setup()
{
pinMode(0,INPUT); //make Tx Rx pins as inputs so that it won`t be interfered by the chip
pinMode(1,INPUT);
}
void loop()
{ //nothing to do!
}
That`s it! connect wires or jumpers to Tx,Rx pins from your device and you`re good to go. I personally have used this setup to establish USART communication with my STM32F4 Discovery board.
Hope this helps.
Most of us while doing our projects would have searched for a communication method with PC, and ended up using USART by level converters (MAX232) or perhaps a USB-Serial cable.Serial ports are disappearing from systems these days. Obviously USB is the only choice..So what to do? First thing you would say is to use a USB to serial converter cable that is cheap to buy. Unfortunately as many of you would have observed these are not reliable many a times. next option is to use a FTDI breakout boards like this https://www.sparkfun.com/products/9115. So if you can`t reach out for an FTDI board or any of those serial converter cables, you`l think you are doomed just like i did at that time.So no way out? Nope there is a way!
Do you have an arduino sitting around idle?, Well then your`e in luck! This little thing could save you from the problem!. Arduino has an inbuilt USB communication mechanism built in as most of you would be knowing by means of Atmega16U2 (Atmega8U2 up to version R2). So i was thinking how to use the chip for our needs? say while using a bigger powerful micro controller or an ARM processor?
Answer is simple just make sure on board Atmega328p doesn’t interfere the port and use Tx,Rx pins for communication! simple as that!
void setup()
{
pinMode(0,INPUT); //make Tx Rx pins as inputs so that it won`t be interfered by the chip
pinMode(1,INPUT);
}
void loop()
{ //nothing to do!
}
That`s it! connect wires or jumpers to Tx,Rx pins from your device and you`re good to go. I personally have used this setup to establish USART communication with my STM32F4 Discovery board.
Hope this helps.
Comments
Post a Comment