News:

Let's find out together what makes a PIC Tick!

Main Menu

Positron Studio Update

Started by JohnB, Jul 29, 2021, 08:11 AM

Previous topic - Next topic

tumbleweed

It may not be that bad... even though there are multiple vectors you still only have two interrupt priority levels.
QuoteInterrupts defined with the same software priority cannot preempt or interrupt each other.
Concurrent pending interrupts with the same user priority are resolved using the natural order priority.
(when MVECEN = ON) or in the order the interrupt flag bits are polled in the ISR (when MVECEN =OFF).

There are also now two levels of hardware context support (one for each priority level) which, unlike on the standard 18F devices, save pretty much all of the core registers with the exception of the TBLPTR registers.

Each vector would only have to save the system variables used by that vector, so it can actually end up being faster.

I found that the only real trick is with locating the interrupt routines themselves. Due to the way addresses are stored in the interrupt vector table the ISR code has to be located on an address evenly divisible by 4.
 

Pepe

#341
I could upload an installer that does not check the operating system, because otherwise I cannot install it on my windows 11 arm pc

JohnB

Positron Studio is written for Windows OS for the Intel Architecture. If you have windows running on ARM I will try and generate a new Install Script but will be no guarantee that it will work on ARM as I have nothing to test it on.
JohnB

Pepe

I have W11 on a Macbook Air and positronstudio64.exe works but I had to create the folders that I couldn't find.

JohnB

@Pepe Could you try this installation - should allow install on arm PC.  Its completely untested as I don't have a suitable setup.  If it works there is an additional test I have to add before making it part of the installer as at present it should install on any arm/windows machine not just Windows 11 or later.
JohnB

Pepe

#345
It allowed me to install it but the 32-bit version and I have 64-bit w11

JohnB

I have updated the file under the previous link - please try this one.  It should install in 64 bit.
JohnB

Pepe

Thank you, it was installed correctly.

joesaliba

#348
John,

Updated to Positron Studio to 2.0.3.14, and now PPS wizard is greyed out. Any suggestion what it could be please?

EDIT: - Latest version will allow only PPS Wizard if device have PPS.

Thank you

Joe

joesaliba

But still there is something else.

In AppData > Roaming > Positron Studio > PlugIns > PPSWizard > Devices

I can that there is the PIC18F06Q40, but device is not listed in PPS Wizard.

It says that 18F06Q40 does not support PPS but it do!

Regards

Joe


JohnB

I have build 14 running here and it is supporting PPS on the 18F06Q40.
If you can see it in the PPS Wizard devices list then check it is in PPI files.

 
JohnB

JohnB

When I tested I realised while I was on build 14 I was using 15 data files.
Please do a new installation of build 15

Download build 15 from here
JohnB

joesaliba

Still missing something.

Under Tools > Peripheral Pin Select is now active, meaning that Positron Studio is recognizing the 18F05Q41, however, PPS does not.

Build 15.

Thanks

Joe


JohnB

Go to C:\Users\<user>\AppData\Roaming\Positron Studio\PlugIns\PPSWizard
and delete LocalCache.dat then restart PPSWizard - it should build a new cache which I hope will include the correct data.
JohnB

joesaliba

Thanks John,

That did the trick!

Kind regards

Joe

joesaliba

John,

Running 2.03.15.

I think that there is a bug within the Peripheral Pin Select Wizard.

I am using a PIC18F05Q41, and I posted here that I could not make to work INT0.

I never played with PPS, so I did long hours trying to solve the problem.

Using the PPS Wizard, and reading the datasheet, I did the following code: -

Proc InitPPS()
    PP_UnLock()

    RA5PPS  = 0x5   'INT0(RA5) Input to EXT_INT
    RA4PPS  = 0x10  'TX1(RA4) Output from UART1
    U1RXPPS = 0x15  'RX1(RC5) Input to UART1
    RC2PPS  = 0x13  'TX2(RC2) Output from UART2
    U2RXPPS = 0x10  'RX2(RC0) Input to UART2
    PP_Lock()
 EndProc

 '--------------------------------------------------------------------------------------------------

 proc PP_Lock()
    INTCON0bits_GIE = 0         ' Suspend interrupts
    PPSLOCK = 0x55              ' Required sequence
    PPSLOCK = 0xAA              ' Required sequence
    ppslock = 0x1
    'PPSLOCKbits_PPSLOCKED = 0   ' Clear PPSLOCKED bit
    INTCON0bits_GIE = 0         ' Restore interrupt
 endproc

 '--------------------------------------------------------------------------------------------------

 proc PP_Unlock()
    INTCON0bits_GIE = 0         ' Suspend interrupts
    PPSLOCK = 0x55              ' Required sequence
    PPSLOCK = 0xAA              ' Required sequence
    ppslock = 0x00
   ' PPSLOCKbits_PPSLOCKED = 1   ' Set PPSLOCKED bit
    INTCON0bits_GIE = 0         ' Restore interrupt
 endproc

But, INT0 was being triggered from somewhere I don't know.

Then I thought that it might be the PPS wrong, and after further testing I came to the conclusion that indeed it is a PPS Wizard problem.

For now I only played with INT0, I still have to figure out the rest of the pins I am changing for my needs, but it looks that: -

RA5PPS  = 0x5   'INT0(RA5) Input to EXT_INT
must be changed to: -

INT0PPS = 0x05
Am I correct that from the datasheet, 0x05 is referring to the PORT?

Within the same PPS code produced, I can notice that U1RXPPS and U2RXPPS are correctly done. However for TX1 and TX2 these are incorrectly listed.

Thank you
Kind regards

Joe

JohnB

I had already spotted this see post
JohnB