Hi,
I am using pic18f67k40 microcontroller. MCU clock frequency 64Mhz.
I want to print entered number on UART terminal, It can be any number(only positive number: 0,1,20,4560,123124,123143235435, ..... any ).The entered number can be print any number of times. Whenever I want to change printing number from new entered number, It should print that(new entered number) any number of time.
Regards,
Kumar
How to print received number on UART terminal
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: How to print received number on UART terminal
Hi,
As I understand you, you want a UART echo.
There are examples of Uart echo in the MikroC compiler. Regards,
Ivan.
As I understand you, you want a UART echo.
There are examples of Uart echo in the MikroC compiler. Regards,
Ivan.
Re: How to print received number on UART terminal
Thank you the problem has been resolved.
Re: How to print received number on UART terminal
Hi Stickwimp,
Did you use same approach that I have mentioned :
I will read any number and print, it works fine.
Code:1
but it does not work for this below code:
Code:2
In code :2 If I entered any number(like:12, 10,234235, ......) first time it get stuck, in second time if I entered it print duplicate of that entered number(1212,1010,234235234235).
Regards,
Kumar
Did you use same approach that I have mentioned :
It works for this below code:I am using pic18f67k40 microcontroller. MCU clock frequency 64Mhz.
I want to print entered number on UART terminal, It can be any number(only positive number: 0,1,20,4560,123124,123143235435, ..... any ).The entered number can be print any number of times. Whenever I want to change printing number from new entered number, It should print that(new entered number) any number of time.
I will read any number and print, it works fine.
Code:1
Code: Select all
While(1){
if(UART1_Data_Ready()== 1){
UART1_Read_Text(input, ";", 255);
UART1_Write_Text(input);
}
}
Code:2
Code: Select all
While(1){
if(UART1_Data_Ready()== 1){
UART1_Read_Text(input, ";", 255);
UART1_Write_Text(input);
}
else {
UART1_Write_Text(input);
}
}
Regards,
Kumar
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: How to print received number on UART terminal
Hi,
I answered in the forum in the link below:
viewtopic.php?f=88&t=80482&p=318143#p318143
Regards,
Ivan.
I answered in the forum in the link below:
viewtopic.php?f=88&t=80482&p=318143#p318143
Regards,
Ivan.
-
- Posts: 1
- Joined: 22 Feb 2024 09:27
Re: How to print received number on UART terminal
It work for me.IvanJeremic wrote: ↑25 Jan 2024 12:03Hi,
I answered in the forum in the link below:
viewtopic.php?f=88&t=80482&p=318143#p318143
Regards,
Ivan burrito craft
Re: How to print received number on UART terminal
Hi dylandaviss123@gmail.com,
Could you share some snap shot or code, so that I can get some Idea. how to introduce external interrupt in code.
I am newbie in interrupt.
Regards,
kumar
Could you share some snap shot or code, so that I can get some Idea. how to introduce external interrupt in code.
I am newbie in interrupt.
Regards,
kumar
Re: How to print received number on UART terminal
Hi rudolffw,
Not like this.
you can refer this link for better understanding-viewtopic.php?f=88&t=80482&p=318143#p318143
Regards,
Kumar
Not like this.
you can refer this link for better understanding-viewtopic.php?f=88&t=80482&p=318143#p318143
Regards,
Kumar