tag:blogger.com,1999:blog-5983110881018172452.post343112870801701978..comments2023-03-25T02:55:49.760-06:00Comments on Bot Thoughts: Logging Data to SD CardsMike Shimniokhttp://www.blogger.com/profile/17602015624941667574noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5983110881018172452.post-41353304851502080482011-01-28T22:09:00.116-07:002011-01-28T22:09:00.116-07:00Thanks for the post!
I know you know this but f...Thanks for the post! <br /><br />I know you know this but for others who might read the comments...<br /><br />The rule is that if it's DCE (modem) to DTE (PC) then RX goes to RX and TX goes to TX. A DCE (e.g., modem) will transmit data on RX and receive data on TX.<br /><br />So in a sense the DTE is the master and the DCE is the slave and the connection is simple.<br /><br />But with RS-232 it's possible for two DTEs to talk. In that case, you have to swap the RX and TX lines because, of course, each DTE sends data on TX and receives on RX.<br /><br />It always takes me awhile to figure it out when I'm in the middle of hacking together hardware on a protoboard. This was particularly maddening when I was trying to do serial comm with an AVR using, alternately, a Sparkfun FTDI breakout (DTE) *and* a BlueSMiRF Bluetooth modem (DCE). I built a board that accepted either but it took awhile ... and I still goofed it up a couple times and had to hack the PCB :)<br /><br />I found this link that has some good drawings in case it helps anyone out there. <br /><br />http://www.bb-elec.com/tech_articles/db9_db9_signal_directions.asp<br /><br />Take it easy,<br />MichaelMike Shimniokhttps://www.blogger.com/profile/17602015624941667574noreply@blogger.comtag:blogger.com,1999:blog-5983110881018172452.post-86462001362052473892011-01-28T13:30:04.040-07:002011-01-28T13:30:04.040-07:00SPI has a master and a slave, so that's why it...SPI has a master and a slave, so that's why it can use names like MISO which stands for "Master In, Slave Out".<br /><br />I don't see any way to avoid the mind-bending craziness of RX and TX. If you're just using those two lines, then RS-232 serial is a symmetric protocol: there is no master and no slave. Just remember that any line labeled "TX" should be an output (as far as I know), and don't connect two outputs together.David Graysonhttp://www.davidegrayson.com/noreply@blogger.com