1bit on a time of 372 clock pulse with a clock at 1MHz
To communicate with this module I have two wires, one used by Arduino to provided an external clock to the module, this clock indicates the speed of the IO, and the second wire used as IO half duplex.
I'm working on a project with an Arduino Mega2560, and another module.
... two lines one for the clock one for io.
Quote from: quertyn on Jan 14, 2013, 08:07 am... two lines one for the clock one for io.A clock line and a data line is closer to SPI (or I2C) than async serial used by a USART.The USART basically uses data at a pre-clocked rate (the baud rate) so trying to use async serial and adjusting its rate to match an incoming clock pulse is mis-using it.
The USART can also be used in Master SPI mode, see "USART in SPI Mode" on page 206. ThePRSPI bit in "Minimizing Power Consumption" on page 43 must be written to zero to enable SPImodule.
... how can I compute the correct baud rate ...
I realize that, and indeed have an example of doing just that here:http://www.gammon.com.au/forum/?id=10892&reply=3#reply3However the fact remains that this is really using SPI and not async serial in this case. The original post asked:Quote... how can I compute the correct baud rate ...... which suggests s/he is trying to use async serial to solve a problem with something that has a clock signal.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16