2011-01-22 04:34 PM
STM32 - Serial Comms with 9 bit data PLUS parity - How to go about it..
2011-05-17 05:22 AM
clive1:''try connecting it to your PC''
Of the schemes that I've seen for doing 9-bit comms on a PC, they all rely upon ''tweaking'' the parity bit - so none of them would be able to give 9 bits plus parity! Again, it would be strictly either 9 bits or parity! As you say, the ATMega does seem to be very much ''an outlier not the norm'' in this respect. Maybe this display thing is specifically designed for use (only) with AVRs? Is it, perhaps, an Arduino (sp?) thing...?2011-05-17 05:22 AM
PICguy:''I’ve used RS-232 for at least 30 years''
Note that this has nothing (specifically) to do with RS232. In fact, most 9-bit networks are multi-drop - so they cannot use RS232! (unless they are unidirectional, I suppose) Multi-drop is specifcally what this 9-bit scheme is designed for.
2011-05-17 05:22 AM
2011-05-17 05:22 AM
''Straight away onto
http://www.nxp.com/documents/user_manual/UM10360.pdf
...same for thehttp://ics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc13xx.pdf
...'' If they do what you require, then use them! There is no point fighting the STM32 if it doesn't (quite) do what you need! NXP have some very low cost boards available - so it should be easy enough to try one to confirm that it actually does what you need... An alternative, as you already have this working on an AVR, might be to use the smallest AVR you can just for the comms, and have an STM32 (or whatever) do all the ''Heavy Lifting''...2011-05-17 05:22 AM
2011-05-17 05:22 AM
The SPI solution would be kind of kludgy. You could get close to 9600 by using the APB1 bus (ie SPI2 or SPI3), and tuning the AHB, APB1 prescalers, and running the STM32 at about ~39.32 MHZ. I don't think running the APB1 at 2.4576 MHz would be a problem, but depends what else you plan on doing. A 4.9152 MHz crystal is available, and would be compatible with the PLL 4-16 MHz input requirements.
You could also perhaps program a USART at 9600 and synchronous, and use it's clock feed back as a slave SPI clock. The TIM's could also generate a 9600 Hz with minimal effort. Much of this depends how creative/out-of-the-box you're willing to get.2011-05-17 05:22 AM
If you're going to get THAT creative, why not just write a software UART dirving a GPIO pin directly? It looks like the application doesn't need to send data all that often.
2011-05-17 05:22 AM
Just out of interest, do you know if the NXP parts do support both parity and 9-bit together?
2011-05-17 05:22 AM
2011-05-17 05:22 AM
@digi-picavr
Hi, do you have any new information related to your problem with the jeti box ? I have now exactly the same problem ;) At the moment I think I must generate the signal by hand without hw support.