nooobboy4321
Junior Member level 1
Hello Everyone, I have a question about Microcontrollers ability about sending and receiving data using I/O Ports only. My goal is to keep a synchronous sending and also receiving a data from MCU1 to MCU2. The logic is like this.................
---** LOGIC **---
*MCU1*
If RB0 is High
-- RD0 will output------------ 10011001,10011001,10011001,10011001,........
If RB0 is Low
-- RD0 will output------------ 01000010,01000010,01000010,01000010,........
*MCU2*
*The role of MCU2 is to check if RB0 receive a data in an array form and display the equivalent action of the array *
*For Example : A_ON[8] = {1,0,0,1,1,0,0,1} and A_OFF[8] = {0,1,0,0,0,0,1,0} *
If RB0 receives A_ON
-- UART will display output " A ON"
If RB0 receives A_OFF
-- UART will display output " A OFF "
---- I've tested it but I fail because of some delay. My question is, is there a way to fix this? By the way I'm using MikroC Pro and Proteus ISIS for simulations. If you have question about my problem, don't hesitate to ask me..... Thanks...
---** LOGIC **---
*MCU1*
If RB0 is High
-- RD0 will output------------ 10011001,10011001,10011001,10011001,........
If RB0 is Low
-- RD0 will output------------ 01000010,01000010,01000010,01000010,........
*MCU2*
*The role of MCU2 is to check if RB0 receive a data in an array form and display the equivalent action of the array *
*For Example : A_ON[8] = {1,0,0,1,1,0,0,1} and A_OFF[8] = {0,1,0,0,0,0,1,0} *
If RB0 receives A_ON
-- UART will display output " A ON"
If RB0 receives A_OFF
-- UART will display output " A OFF "
---- I've tested it but I fail because of some delay. My question is, is there a way to fix this? By the way I'm using MikroC Pro and Proteus ISIS for simulations. If you have question about my problem, don't hesitate to ask me..... Thanks...