I am trying to create a project in which I am required to make Arduino and Atmel 89C52 talk to each other.
I know this can be achieved via UART but the problem is my Arduino is already using its TX/RX ports. Is there a way to make them talk by any other means? Like I2C or SPI interface? Would soft UART suffice? The whole project depends on then talking to each other effectively.
Answer
It is absolutely possible to make them talk :) Arduino has a feature for multiple RX/TX communications. It can be accomplished with Software serial. As far as connecting Arduino with 89c52 with I2C is concerned, it is only possible when you write I2c protocol from 89c52 side (AT89C52 doesnot have hardware I2C port).
So if your Serial port of Arduino is occupied by any other device, you could change that pin to software serial (meaning transfer the purpose to other pins) and use that serial port for making communication with 89c52.
EDIT
Yes you can use SPI interface, but that is not my choice ;) since it requires 3 wires and is only intended for short distances. And also you need to have At89s52 not at89c52.
No comments:
Post a Comment