Can i use an IO pin to communicate using SCI at 5 baud

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i use an IO pin to communicate using SCI at 5 baud

Jump to solution
1,139 Views
changebusclock
Contributor I

I want to transmit 0x33h from the MC9S12XDT512 microcontroller using SCI to an automobile for communication initiation. (communication is half duplex) Immediately after transmitting the  above said value,  SCI  baud rate has to be changed to  10.4kbaud 

 

Inorder to achieve the above said

Can i use an IO pin and a timer to transmit UART data 0x33h at 5 Baud (ie 1 start bit, 8 bits , 1 stop bit => 10 bits total ie 2000 milliseconds 1 bit has to be transmitted) start bit is low and stop bit is high in UART. 

Then on can i program SCI baud registers to 10.4 kbaud and continue the communication.

Will this work?

Am i correct ?

Can you through more light on the above said requirement. 

 

When we consider baud rate , is it including the start and the stop bits or not.

Do we have to give same duration of time for both data and (start & stop) bits

Labels (1)
Tags (1)
0 Kudos
1 Solution
280 Views
bigmac
Specialist III

Hello,

 

Each bit will need to be of 200 miliseconds duration, including start and stop bits, so the whole character will take 2 seconds to send.  During this period, the SCI module should remain disabled so that there will be functionality of the underlying GPIO pins, and you can manipulate the pin corresponding to TXD.

 

Once the character send is complete, the SCI module would be enabled and initialised for 10,400 baud operation.  The SCI functionality will then override the GPIO pins.

 

Regards,

Mac

 

View solution in original post

0 Kudos
2 Replies
280 Views
peg
Senior Contributor IV

Hello,

 

Baudrate is the number of signals per second. "signals" includes the bits of a byte and start/stop and parity etc. So in order to convert to other rates you need to know whether a parity is being indicated and how long the stop is etc.

 

281 Views
bigmac
Specialist III

Hello,

 

Each bit will need to be of 200 miliseconds duration, including start and stop bits, so the whole character will take 2 seconds to send.  During this period, the SCI module should remain disabled so that there will be functionality of the underlying GPIO pins, and you can manipulate the pin corresponding to TXD.

 

Once the character send is complete, the SCI module would be enabled and initialised for 10,400 baud operation.  The SCI functionality will then override the GPIO pins.

 

Regards,

Mac

 

0 Kudos