RS485 bus connected devices share two cable (A,B), and they communicate in a half-duplex manner, which means while a slave or the master talks the others should listen. You use a 75LS176 or equivalent RS485 transceiver ic with each slave. This IC contains a receiver and transmitter, and you select which one is active with the direction signal. the IC outputs the A,B signals and you connect this outputs to a two cable bus. The data is transferred as the voltage difference between A, B and this brings great noise immunity, since the aritmetic (A+noise)-(B+noise) results in noise cancellation at microcontroller datarates (100kbps) you can have a 1km bus.For more information make a google search. I can provide you a very efficient c source code if you need further help. Murat Karadeniz --- ckbanner <kcbanner@inbox.lv> wrote: > HOw do I connect more than one mega8 slave to one > master? I know rX > and TX, but what do you mean by direction pin? I > thought serial prot > was for connecting two micros together. What do you > mean by onboard > comm? > > Thanks for the fast reply! > > -Kc > > > > --- In AVR-Chat@yahoogroups.com, MuRaT KaRaDeNiZ > <karademu@y...> wrote: > > mega8 has serial port, why not use RS485 > communication > > bus. Single Master, multiple slaves (32 directly > > supported, 128 possible with better driver ic's), > > minimal IO requirements (TX,RX,direction pin). One > > question however, are you doing onboard comm.? > > > > Murat Karadeniz > > > > > > > > --- ckbanner <kcbanner@i...> wrote: > > > Hello, > > > > > > I am doing a project where I need multiple mega8 > > > avrs sending sensor > > > data to another controller. The other > controller is > > > an OOPic-R. The > > > OOPic has built in functions for SPI, i2c(twi), > and > > > serial > > > communications. What is best for a multiple > slave, > > > single master > > > system? I can make code for the OOPic, but need > > > some slave code for > > > the avrs. I am using Codevision and the help > file > > > doesn't have that > > > much information about how to use i2c or SPI in > > > slave mode. > > > > > > Thanks, > > > Kc > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Free Pop-Up Blocker - Get it now > > http://companion.yahoo.com/ > > __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/
Message
Re: [AVR-Chat] Re: mega8 SPI problems
2003-12-06 by MuRaT KaRaDeNiZ
Attachments
- No local attachments were found for this message.