not work UART

Discussion on projects that are created by users and posted on mikroElektronika website.
Post Reply
Author
Message
Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

not work UART

#1 Post by Lin1959 » 19 Aug 2020 09:04

not work UART, library UART connected, terminal on.

program uart

dim i as word

main:
UART1_Init(9600)
for i=1 to 1000
Delay_ms(100)
UART1_Write(i)
next i

end.

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: not work UART

#2 Post by Lin1959 » 19 Aug 2020 17:34

Conversions Library+
dim str as string[5]
WordToStr(i, str)
UART1_Write_Text(str)

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: not work UART

#3 Post by stefan.filipovic » 20 Aug 2020 14:12

Hi,

Welcome to the MikroE forum.

Could you tell me which development board/MCU do you use?
Make sure to set the clock configuration properly.
Also, the UART1_Write function's input parameter is a byte data type (0-255).

Kind regards,
Stefan Filipović

Lin1959
Posts: 15
Joined: 18 Aug 2020 17:38

Re: not work UART

#4 Post by Lin1959 » 20 Aug 2020 17:29

Thanks, already working.

Post Reply

Return to “User Projects”