According to my reading of the "Examples of Baud Rate Setting", Table 82 in the version of the ATMEGA manual that I have, the UBRR value should be somewhere between 1 and 5, depending on the crystal used and a divider setting. Not 23 as you have... I don't have the will power to look up what crystal is being used in the micaz so you need to do some more archeology to find the right value.
You can look at the UART output with a scope and see what pulse width you get to try to tune it correctly. You may also need to figure out stop bits and parity for your device, and verify that it doesn't use DTR and all the other useless RS232 sync signals. MS Asier Arruti wrote: > Hi all, > > I am using the SP03 text-to-speech synthesizer and I want to control it > with the MicaZ mote. The possible ways are UART and I2C communications. > I want to use the UART option, but the speed must be 38400 bauds, which > does not appear as a possible speed to be selected . > Is it possible to configure it? > I have tried with the code below, adding it to HPLUART0M.nc: > > case 38400u: > outp(0,UBRR0H); > outp(23, UBRR0L); > break; > > I know the byte sequence I must send, but the device does not work as > expected (It does not speak). > > The other way is to use the I2C bus, and I have used the code available > in the following thread: > http://mail.millennium.berkeley.edu/pipermail/tinyos-contrib-commits/2004-September/000187.html > > But it does not seem to work; the result is that the events are not > called, except for the sendStartDone() event. > > Has anybody used this device with MicaZ? What can I try? > > Thanks in advance, > > > Asier > > > ------------------------------------------------------------------------ > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
