PIC18F97J94 UART-INPUT ERROR

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
FahriSnl
Posts: 2
Joined: 01 Dec 2022 08:45

PIC18F97J94 UART-INPUT ERROR

#1 Post by FahriSnl » 01 Dec 2022 13:30

HELLO.
I'm currently working on a project with 18F97J94. My design was working perfectly, then I added a discrete LCD module to the project which I communicate via eusart and it works fine as well. but then I noticed when I use " UART4_INIT(115200) " somehow RH4 PIN is stops working as input. But when I define it as output there is no problem. The thing that I don't understand is RH4 pin doesn't have any connection with EUSART registers. Does anyone have an idea what's wrong with it?
(I also manually disabled CCP2,AN12 and LCD registers)
Attachments
RH4.PNG
RH4.PNG (37.18 KiB) Viewed 870 times

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: PIC18F97J94 UART-INPUT ERROR

#2 Post by filip » 02 Dec 2022 09:17

Hi,

If I'm correct, UART4 initialization maps RC4 and RC5 pins, there is no mention of RH4 pin there.

Can you go through debug and see what is going on with the PORTH,LATH,TRISH register ?

Regards,
Filip.

FahriSnl
Posts: 2
Joined: 01 Dec 2022 08:45

Re: PIC18F97J94 UART-INPUT ERROR

#3 Post by FahriSnl » 02 Dec 2022 10:31

filip wrote:
02 Dec 2022 09:17
Hi,

If I'm correct, UART4 initialization maps RC4 and RC5 pins, there is no mention of RH4 pin there.

Can you go through debug and see what is going on with the PORTH,LATH,TRISH register ?

Regards,
Filip.
Hi Fillip, thanks for your reply.
Yes I use C4-C5 pins for UART, and I tried to set the TRIS register for the RH4 pin as input after UART_INIT but it is still no use. I also just checked for input in while(1) but it's not responding.

Post Reply

Return to “PIC PRO Compilers”