how to send 9-bit data to SCI in Microcontrollers_Debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to send 9-bit data to SCI in Microcontrollers_Debugger

733 Views
phantomgz
Contributor III

I just test my project in codewarrior software simulator, I want to simulate SCI transmission.

the help said module including:  8- or 9-bit length data codes, 

I send data with "scdi 1aa", but I never read SCIxC3.R8 being set.

 

Cai.

Labels (1)
Tags (1)
0 Kudos
3 Replies

417 Views
AirDragon
Contributor III

Please note that if you have parity enabled, your 9th bit is used for parity (and the rest are data bits).

 

Took me a while to figure that out when trying to interface with HyperTerminal... :smileyhappy:

0 Kudos

417 Views
phantomgz
Contributor III

thanks for reply.

 

 

and again I don't have a real hardware board, just run in full chip software simulation. 

 

9-bit wasn't use for parity check, it's use for address mark,

I want to send some data in "Real-Time Debugger" at "Command" window to test my program.

I can send a data with "SCDI $aa" now , but I want to something like "SCDI $1aa" to active 9-bit I can read in SCIxC3_T8 in my

program.

 

and my PE component setting: 

 Parity = none;

 Width = 9bits;

 Stop bit =1; 

 Wakeup condition = Address mark wakeup

 ...

 

Cai.

0 Kudos

417 Views
bigmac
Specialist III

Hello Cai,

 

The ninth data bit (bit-8) for sending is determined by the bit setting for SCIxC3_T8.  The register SCIxD contains only 8 bits.  To send the 9-bit value 0x01AA from the MCU, you would use the following code.

 

SCIxC3_T8 = 1;

SCIxD = 0xAA;

 

For both 9-bit send and receive, 9-bit mode is enabled by setting the control bit SCIxC1_M.

 

Regards,

Mac

 

0 Kudos