Hi,
We would like to issue a command serially from master to slave but we don't know how. We are trying to interface a temperature sensor to the board and we got stuck on how to control the clock pulse given by the Master so that we can input 8 bits one at a time. Does this clock pulse have to be controlled by a delay or do we have to use some PWM? Once we establish this, how do we actually indicate that one bit per clock cycle should be processed at a time?
Thanks!
i have same problem.
And both of you seems to have a problem even knowing what protocol(s) you are talking about.
It would be my guess that it's the Dallas/Maxim one-wire protocol. In that case, the hw sensor don't care what peripherial hardware in the microcontroller that generates the pulses. But you need to select a method that guarantees the timing, since that protocol is 100% controlled by time.
Or might you instead be talking about the I2C protocol? Then it's quite common that the processor have hw support, in which case you only need to write a state machine to drive the communication.
For an SPI protoc0l (Dallas/Maxim one-wire protocol), how can one control the timing generated by our SCLK ?
we must use pwm as master?
"we must use pwm as master?"
Why do you feel PWM have anything to do with this? What datasheets have you read that indicates a need for PWM? More importantly - you haven't even mentioned what processor. Don't you think the actual processor will affect any answer of what to use to generate a specific signaling?
Next thing - are you part of a tag team? In that case, you should be able to bounce ideas with your tag team partner. Exactly what conclusions have you come to, after carefully analyzing your situation?
View all questions in Keil forum