Syn Serial Com
Naphtali Moore
Posts: 42
Hey I just got a Tri-Axle Accellerometer and an digital compass. Can they share the same clock and DataIO lines?
Comments
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bruce is right, I'll add that if they use an I2C protocol, they can also use the same two lines.
What units did you buy?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
It's quite unfortunate that the seperate Parallax documentation·packages are·inconsistant in the naming of the chip select pin (EN - Enable, CSI - Chip Select), which could easily cause confusion. Regardless, they both have separate chip select pins, so I would suspect that you can share the clock and data_out lines. Just make to to enable only one chip at a time, otherwise the data will be garbled, and useless.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 5/2/2007 10:26:20 AM GMT
There are two things to consider…First of all, if the Chip Select pins had the same names for two devices then when a novice programmer tried to “merge” the two programs they might miss duplicate constants if the pins had the same name. The pins are given meaningful names that make it clear what that pin’s function is.
When I write code I often have the chip datasheet in front of me and will use the same or similar designations that the manufacturer used in the datasheet for a given pin. Given that there is no “standard” and manufacturers will often use different designators for pins it stands to reason that these will be inconsistent when using the manufacturer names. My point is that we recommend using meaningful names over trying to conform to a standard. The freedom of the programmer to choose his variable and label names can be a good thing or a bad thing. It’s all up to the programmer. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
It is the fact that they HAVE two diffferent names that is confusing to anyone who reads it. I have no idea why you're trying to justify something so blatently confusing.
These are educational documents as well as "datasheets" in their application. Do you think any instructutor worth his/her salt would call a finger a finger in one text, and in a similar or companion text call it a digit? I think not.
Are you unnecessarily defensive because you wrote these documents?
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I do not believe I wrote any of the mentioned code/documentation you are referring to (although since you gave no examples it is hard to tell). Nor was I trying to be defensive. I was just trying to help you (and anyone else who wanted to know) understand that there are no set conventions for naming the pins of various IC’s. They could be anything. If you feel our documentation is in error and/or could be improved then I would recommend sending an e-mail to editor@parallax.com and give an example of the document you are referring to. If there is a problem we will try to address it. It would help to be specific about the documentation and/or code you are referring to.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support