I'm using SimulIDE-0.4.15-SR10.appimage in ubuntu 18.
I have assembled the code bellow using gpasm 1.4.0.
It's supposed to copy the content from inputs in pins B0 to B4 from PORTB and copy to outputs in pins A0 to A4 from PORTA.
The MCU Monitor shows that the code is executing okay.
The TRISA and TRISB is correctly configured (setting every pin in PORTA as output and every pin in PORTB as input).
The value recorded in register PORTB corresponds to the electrical levels driven to the pins and is correctly copied to PORTA.
Thus, I'm able to change the value of the A4 bit in PORTA register by changing B4.
Nevertheless, A4 electrical voltage keep stuck in 0V, no matter the value in the register PORTA.
I have assembled the code bellow using gpasm 1.4.0.
- Code:
list P=PIC16F84, R=D
include "p16f84.inc"
temp1 equ 0Ch
temp2 equ 0Dh
count equ 0Eh
org 0000h
goto start
org 0008h
start bsf STATUS,RP0
movlw b'00000'
movwf TRISA
movlw b'11111111'
movwf TRISB
bcf STATUS,RP0
main movf PORTB ,W
movwf PORTA
clrwdt
goto main
end
It's supposed to copy the content from inputs in pins B0 to B4 from PORTB and copy to outputs in pins A0 to A4 from PORTA.
The MCU Monitor shows that the code is executing okay.
The TRISA and TRISB is correctly configured (setting every pin in PORTA as output and every pin in PORTB as input).
The value recorded in register PORTB corresponds to the electrical levels driven to the pins and is correctly copied to PORTA.
Thus, I'm able to change the value of the A4 bit in PORTA register by changing B4.
Nevertheless, A4 electrical voltage keep stuck in 0V, no matter the value in the register PORTA.