This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/MSP430F2471: Use UART With 9 Bit Mode

Part Number: MSP430F2471

Tool/software: Code Composer Studio

Hi,

I have used uart function with MSP430 for a lot of product in our company.

We always use 8-N-1-9600 as the communication format.

But now, there is a customer of our company use 9 bit uart with 8051 series chip.

Can I set uart of MSP430 to 9 bit mode?

Or are there any posts or information can offer me for solving this issue?

BR,

Yu-Chuan Chen

  • Yu-Chuan%20Chen said:
    Can I set uart of MSP430 to 9 bit mode?

    From a quick look at the MSP430x2xx Family User's Guide the USCI_Ax modules in the MSP430F2471 support Address-Bit Multiprocessor Format in which a 9th bit is used as an address bit to indicate that a character is an address.

    Is that what you mean by 9 bit mode?

  • Hi

    Thanks for the replying.

    Actually, I have no idea what the 9-bit mode meant in 8051 series chips.

    This project is for our customer, and his project is created several years ago by their old engineer.

    But now he wanna make it into standard product that can fit all the status.

    I have searched the datasheet of 8051 series chips and I get the information for what the 9-bit mode is.

    The figure is the data format of 9-bit mode.

    Now I am not sure if the ninth bit is the address bit or not.

    I will try today.

    BR,

    Yu-Chuan Chen

  • Yu-Chuan%20Chen said:
    Now I am not sure if the ninth bit is the address bit or not.

    On a quick look, I think the 9th bit in the 8051 UART is intended for a parity bit, which the software is responsible for generating on transmit and checking on receive. It appears that the 8051 UART doesn't support inserting and checking a parity bit by itself.

    Whereas the USCI_Ax modules in the MSP430F2471 already support parity bit generation / verification in the hardware.

    Since the 8051 datasheet doesn't seem to clarify what the 9th bit is used for, you need to see what the existing 8051 based application is using the 9th bit for.

  • Hi,

    Thanks for the advice and I have got your information.

    I have tried to set UCMODEx of MSP430F2471 as "10" (enable address bit), but it didn't work.

    ("It didn't work" means 8051 can not do the operations after receiving the UART data)

    I also tried to set the parity bit today, it didn't work, either.

    Thus, I asked the customer to offer a test board, I will test then.

    To be truth, the ninth bit has no use in the product but they have sold lots of the products and can not change easily.

    They can only change the setting of 8051 UART in the brand new product or the latest version.

    Now we need to created a product to fit in their current settings.

    It makes a lot of troubles...

    BR,

    Yu-Chuan, Chen

  • Hi Yu-Chuan

    Only 7- or 8-bit data is support F2471 UART.

    I agree the comment from Chester Gillon there are 2 possibility: (1) address-bit mode (2) parity bit.

    If these 2 possibilities don't work, please consider software UART solution to match 8051 UART requirement.

    UART-to-UART Bridge Using Low-Memory MSP430™ MCUs is the software UART reference.

    At the same time, you can find the source code in this page: https://www.ti.com/tool/MSP430-FUNCTION-CODE-EXAMPLES

  • Hi,

    Thanks for the answer.

    Finally, I captured the signal and this is the signal figure from the oscilloscope.

    If I can not use F2471 chip to set the data format, are there any chips that I can use?

    Or how can I set to let F2471 communicate with this format?

    I need two ports of USCI_Ax.

    The data are 1FD+000+055+020+000+000+000+072

    It only need the data FD+00+55+20+00+00+00+72

    So I can ignore the 9th bit first.

    BR,

    Yu-Chuan, Chen.

  • Yu-Chuan%20Chen said:
    Or how can I set to let F2471 communicate with this format?

    It looks to be 8 data bits (lsb first), one address bit, no parity.

    Yu-Chuan%20Chen said:
    So I can ignore the 9th bit first.

    Actually, think the transmission is that the 9th bit (the address bit) is transmitted last. It is just the scope trying to decode 9 bits as least significant bit first.

    If you set the UART to Address-Bit Multiprocessor Format with UCMODEx = 10 and UCDORM=0, you should be able to ignore the 9th address bit by just reading the 8 data bits from UCAxRXBUF.

**Attention** This is a public forum