loading

can ATmega and pic microcontrollers communicate with the rx and tx pins?

hi. i am starting a project that will involve about 4 small boxes that have simple switches and led's connected to them. they will then all be linked to an arduino but maybe later on i will replace the arduino with a pcb that has an ATmega chip on. same as my arduino, which has my custom program on.
i would like as least wires as possible. so by using the receive(rx) and transmit(tx) pins i would only need 4 wires. power, ground, rx and tx.
BUT. pic microcontroller chips are alot easier to program and are cheaper too. i would not be able to use a pic microcontroller to control them all at the central hub so i would need the arduino and pic chips to be able to communicate without problems. only sending basic commands like:
0001 0011 or LED 1 HIGH.
i just thought i'd check it could be done before i buy my parts. if it can't be done is there any way to make it work or any cheap alternatives?
thanks, Luke 

If this is bi-directional, its not a good idea at all to connect TX pins in common. You CAN get away with a master CPU talking to slave CPUs but they can't talk back, unless you use RS485 drivers

Steve
ljarrald (author)  steveastrouk6 years ago
okay, it would be on a homemade fire/burglar alarm system, on each floor all the detectors and sounders connect to a box, each box on each floor will connect to the centeral panel, so i would need two way communication. ideally between ATmega chips and PICAXE chips. how would i go about doing this? i don't really know many devices so if theres other things i would need please could you explain them?
thanks
Phew, that's a tall order !! We are talking now about RS485 buses and Master-slave control systems.

Simplex RS485 transmits and receives comms over only two wires. Its faster and more noise tolerant.

This is a good article that explains the beginnings



Read that, and come back with more questions. Steve