RAM loading issue pic18f27Q10

Discussion on both general simulation and Proteus VSM microcontroller simulation.
Post Reply
TimBox100
Professional User
Posts: 87
Joined: Wed 2019-03-13 13:26

RAM loading issue pic18f27Q10

Post by TimBox100 »

This an update to a post I deleted so if you saw that sorry I found the issue now and its not what I originally thought

Basically
There seems to be a section of Ram at the bottom that is not being written to. I wrote some ASM that wrote from 0x01 - 0x05 and none of the methods I can see saw the ram locations change

This is explains my delay issues in that the a delay value is being loaded into ram at 0x01 and some maths performed on it a BTFSS was done on the carry flag and as the ram is reading Zero it returned prematurely. Delays under 254 are passed in the wreg so were ok

ram write issue.png
ram write issue.png (96.67 KiB) Viewed 675 times
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: RAM loading issue pic18f27Q10

Post by Ettore »

No, you need to use the General Purpose Register area. Open the Memory GPR pop up window to get access to this area.
The issue with Delay_ms(1000) is more complex than that. It is because ADDWFC instruction that gives wrong results in some combination of data and adversely affects the state of the Carry bit. I have fixed this but I'm still testing.
Kind regards,
Ettore Arena - Labcenter Electronics.
TimBox100
Professional User
Posts: 87
Joined: Wed 2019-03-13 13:26

Re: RAM loading issue pic18f27Q10

Post by TimBox100 »

Thanks Ettore

In my first post on this, (that I deleted) I thought it was ADDWFC or BTFSS but after doing a lot of checking and looking at the carry flags on the 2 devices I was testing I was not sure and that lead me off into the weeds that the ram.

There are a lot of memory options I tried a few and thought I had the right one

Tim
Ettore
Labcenter Staff
Posts: 2932
Joined: Fri 2006-03-03 11:56
Location: Milan
Contact:

Re: RAM loading issue pic18f27Q10

Post by Ettore »

Confirmed that issue about long delays - DelayMs(1000) - was because some bugs with arithmetic instructions, as for instance ADDWFC.
The fix is scheduled for the next service pack or release.
Kind regards,
Ettore Arena - Labcenter Electronics.
Post Reply