https://www.circuitointegrato.com/en/um ... 42969.html
Since there is not mlx90615 library in Proteus we simulate the sensor with one another micro which sends the code's similar to the sensor in Proteus.
but the problem is here which we could not communicate between two mikros in mikroc software and in Proteus.
we working on a simple communication between two mikros, one is sending "Z" Character and receiver send the received character after reading on in RX line.
the Transmitter is here:
Code: Select all
// main function: entry point of program
int main (void)
{
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{
// If the previous data has been shifted out, send next data:
if (UART_Tx_Idle() == 1) {
UART_Write(0x5A);
}
}
return 0;
}
Code: Select all
char uart_rd ;
// main function: entry point of program
int main (void)
{
UART1_Init(9600); // Initialize UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
UART1_Write_Text("Init");
UART1_Write(13);UART1_Write(10);
while (1)
{if (UART1_Data_Ready()) { // If data is received,
uart_rd = UART1_Read(); // read the received data,
UART1_Write(uart_rd); // and send data via UART
}
}
return 0;
}
the simulation files is here:
https://www.4shared.com/zip/RLFINQ7Zca/New_folder.html
thanks a lot.