I am having problems trying to initialize the input serial port to read information and then output 3.3V to one of the port B on the MCS12 microcontroller.. Does someone have a sample of how i might be able to do this.. My GUI is sending the information via serial port to the controller using the arrow directional pad.. It then sends that signal to the HCS12 which uses 4 ports output... If anybody has a posting let me know.. thanks.
Solved! Go to Solution.
Hello!
The first thing to consider is to know what you're working bus speed. With this informationyou must set the baud rate (for the serial port is 9600) SCI baud rate = BUSCLK / (16 ×BR) where BR is a registrer of the microcontroller. When you are sure you have the correctbaud rate, you can start using the buffers that the module has to send and receive data (the case of JM60 SCIxD)
regards!!!
If anybody can help me here it would be great.. I can attach a file that has some information to review for the following..
Whit this function you can get data(Remember this code if fot the JM60, read about your microcontroller)
byte SCI_GetChar(void){
while(SCI2S1_RDRF == 0);
return SCI2D;
}
Send Data
void SCI_PutChar(byte Data) {
while(SCI2S1_TDRE == 0);
SCI2D = Data;
}
Hello!
The first thing to consider is to know what you're working bus speed. With this informationyou must set the baud rate (for the serial port is 9600) SCI baud rate = BUSCLK / (16 ×BR) where BR is a registrer of the microcontroller. When you are sure you have the correctbaud rate, you can start using the buffers that the module has to send and receive data (the case of JM60 SCIxD)
regards!!!