Florentin von Frankenberg

MC9s12dt256 serial communication newbie

Discussion created by Florentin von Frankenberg on May 21, 2008
Latest reply on Jun 28, 2008 by Nick Xanalatos
I am trying to use the hcs12 microcontroller to read data from another device, do some calculations based on the data, and send a reply to the device. The data stream is from a DB9 serial connector, 115200 bits/second, 8 bit data width, no parity, no flow control.
I began two weeks ago with absolutely no background knowledge on serial communication, or the microcontroller. So far I've made little progress, but here is what i've tried.
I've tried to use the SCI 0 port (connecting through the pins on the 60 pin J1 connector). I connected leads from the other device's transmit and ground pins to the appropriate pins on the microcontroller. I added a processor expert bean AsynchroSerial, and picked a baud rate of 125000 (P.E. rounds up?) Input and output buffer size 128. There are other options, but as I don't really understand what's going on so I think it doesn't warrant going through everything.
I copied an example I found online which stores received characters in a variable "temp", using the function AS1_RecvChar(&temp). I connected the other device while it was sending data, and watched the variaable "temp" in the debugger. No signs of life. The variable stays at "0" no matter what I do.
If I could have some help troubleshooting, it would be greatly appreciated. I have checked all the relevant jumpers (such as Com_Enable) and they appear to be set properly.