EasyPIC v7 problem with RA0

General discussion on mikroElektronika development boards.
Post Reply
Author
Message
kiril_k
Posts: 1
Joined: 29 Jan 2022 15:24

EasyPIC v7 problem with RA0

#1 Post by kiril_k » 29 Jan 2022 21:17

I wrote a small test program which toggles RA0 in a loop:
-----------------------------------------------------
LowInt:
movff STATUS,STATUS_TEMP
movff WREG,WREG_TEMP
movff BSR,BSR_TEMP

btfss PIR1, RCIF
bra Low_end
movf RCREG,0
movwf prihvat
bsf SEM, 0
Low_end
movff BSR_TEMP,BSR
movff WREG_TEMP,WREG
movff STATUS_TEMP,STATUS
retfie

W_to_TX macro ;Send via UART
btfss TXSTA, TRMT
bra $-2
movwf TXREG
endm

Main:
movlw 0x77
movwf TXREG
nop
nop
nop
Main_loop:
btg LATA, 0
btfss SEM, 0 ;SEM is register in ACCESS BANK
bra ML_end
bcf SEM, 0
swapf prihvat, 0 ;Just swap nibbles
W_to_TX ;Send back to PC
ML_end
bra Main_loop
END
-----------------------------------------------------
I noticed the following, this is the oscilogram of LATA0:
Image
In this case, UART doesn't work.

When I toggle LATA2 I get this oscilogram:
Image
In this case, UART works properly.

I use PIC18F4550, and all jumpers are correctly set. I spent many hours to find out what the problem is unsuccessfully. I tried using a different MCU, however, the result was the same. At the end I pulled out the MCU, I twisted RA0 so it wouldn't go into the socket and I put the MCU back. In this case I get the oscilogram for RA0 as when I toggled LATA2, and UART works properly. I came to the conclusion that the problem lies within the development board. Does anyone know if this happens on all boards or just mine?

Post Reply

Return to “Development Boards”