Hello,
In the mikromedia HMI 7", FT900Q is the used MCU and it has it's UART0 RX and TX pins (GP48 and GP49) going out through the main connector. We do not have UART0, so we named it as UART1.
So UART0 on the schematics is actually UART1 in the compiler's library. Now as for your code, it should look like this - I have tested it and it works:
Code: Select all
char output;
void main() {
UART1_Init(9600);
while (1) {
if (UART1_Data_Ready() == 1) { // checks if there's something in the UART rx buffer
output = UART1_Read(); // reads one char off the buffer
UART1_Write(output); // sends it back
}
}
}
I will attach the project files here as a .ZIP file, so you can test it yourself. Also I don't know why did you use that baudrate, it's not one of the standard baudrates. Also I couldn't see your IF statement inside a loop, else it will just check once and exit, before you had a chance to send some data through...
If you have more questions regarding this, feel free to ask
Best regards