News:

;) This forum is the property of Proton software developers

Main Menu

Peripheral Pin Select Wizard

Started by JohnB, Feb 02, 2023, 10:48 AM

Previous topic - Next topic

JohnB

I have developed a PPS wizard which can be used to set up the PPS commands for 8 bit devices.
This is very much a beta program but I need feedback from anyone who is using the PPS facilities of  the 8bit devices.

If you are interested please download the trial from here

PPSScreen Shot.png

This uses device information which comes with the MPLABX suite.  This data has been extracted and is provided in 2 directories in the downloaded Zip file. 
JohnB

JonW

Nice work John

I had a quick look at the 16F15376 and the code generated has the lock and unlock the wrong way round.

Proc InitPPS()
   PPS_Lock()
   CCP1PPS = 0x13   'CCP1(Pin 18) input RC3 to Module CCP1
   PPS_Unlock()
EndProc

tumbleweed

What are the minimum requirements for the program?

I tried it on win7 x64 and it'll run but there's nothing in the title bar (no device, pkg, gear menu, etc)

John Lawton

Hi John,

many thanks, this looks potentially very useful, I usually struggle with getting PPS working.

I still run Windows 7 64bit so I hope it will run on my machine, I am hoping to avoid Win 10/11 for a bit longer.

John

JohnB

@JONW - I'll update the Lock/Unlock Duh!!!
@tumbleweed - click on the Settings and browse each Folder to the correct location on you system. Then restart the app.
JohnB

JohnB

JohnB

JonW

some unlock & Lock procs for 16F15xxx

; PPSLOCK

(***************************************************************************************************
* PROC      :  UNLOCKPPS
* Input     :  NONE
* Output    :  NONE
* Notes     :  UNLOCK PHERIPHERAL PIN SELECT
***************************************************************************************************)

 PROC UNLOCKPPS()
        GIE = 0:PPSLOCK = $55:PPSLOCK = $AA:PPSLOCK.0 = 0
 EndProc

(***************************************************************************************************
* PROC      :  LOCKPPS
* Input     :  NONE
* Output    :  NONE
* Notes     :  LOCK PHERIPHERAL PIN SELECT
***************************************************************************************************)
 PROC LOCKPPS()
       PPSLOCK = $55:PPSLOCK = $AA:PPSLOCK.0 = 1
 EndProc

tumbleweed

Quote@tumbleweed - click on the Settings...
That's the thing... there are no 'settings' visible. No drop-down device or pkg controls, no gear icon, no help.

What controls does it use? I'm running win7 x64.

JohnB

#8
@tumbleweed  - You need windows Style Manager installed - not sure you can do this with Win 7 I think it first came out with Win 8.

@JONW  PPS_UNLOCK and PPS_LOCK should be $defines which are in the .def file for the device so these should be expanded into the full code by the preprocessor.
extract from 18F47K40.def
'[PPS Defs End]---------------------------------------------------------------------
'
'-----------------------------------------------------------------------------------
' Macro         : PPS_Unlock
' Overview:     : Unlock Peripheral Pin Select
' Parameters    : None
' Notes         : None
'
$define PPS_Unlock() '
    Set_Bank PPSLOCK '
    PPSLOCK = $55    '
    PPSLOCK = $AA    '
    Clear PPSLOCKbits_PPSLocked
'
'-----------------------------------------------------------------------------------
' Macro         : PPS_Lock
' Overview:     : Lock Peripheral Pin Select
' Parameters    : None
' Notes         : None
'
$define PPS_Lock()   '
    Set_Bank PPSLOCK '
    PPSLOCK = $55    '
    PPSLOCK = $AA    '
    Set PPSLOCKbits_PPSLocked
'
'-----------------------------------------------------------------------------------
JohnB

JonW

 ;D ah, I didn't know they were there!

TimB


Is there a preferred location for the files and exe? I loaded them into Positron Studio in Program files but it says I cannot find load the files. I made sure it was pointing to the right location and shut down but then complained it could not write to xxxx.ini

JohnB

Don't use that area, create a folder in documents and expand to that folder.
JohnB

TimB


Just some comments as feed back

1 The text is very small and despite my eyes being not to bad these days I have to get very close to read them on my 14" lap top
2 The device I selected PIC18F27Q10 as a SSOP displays a QFN, this may be deliberate to save displaying more than QFN's but is confusing
3 The Unlock issue still seems to be there and I followed the link to down load Lunch time
4 Always on top is OK some times but when I want to refer to my schematic its awkward to shift it around and there is no minimise button


 

JohnB

The problem is I have to cater for devices ranging from 8 pin to 100 pin without making the whole app huge.
Take a look at the PIC18F67K40 for example. I am looking at adding a scrollbar which you can use to resize the image which might be helpful for packages with few pins.

W.r.t. package outline.  I could present QFN packages with the pad inside the outline but that makes it more difficult to cram in Pin the numbers. The important point wrt PPS is that the pin numbering/function reflects the specific package as it can vary between packages.
JohnB

keytapper

Quote from: JohnB on Feb 04, 2023, 10:37 AMcater for devices ranging from 8 pin to 100 pin without making the whole app huge
Is there an option to use zoom in/out, by any chance?
Ignorance comes with a cost

TimB


Rather than try and simulate a chip layout to select the pins. Just a list in order would be fine

RA0
RA1
RA2
RA3

JohnB

I created the outline as a new VCL control and it writes everything directly onto the canvas.
At present size of outline is determined by the font size so a larger font produces a larger outline.
I am currently trying to get a zoom working at the moment.
JohnB

trastikata

#17
Hello JohnB,

is it possible to add some structure to the drop-down list? It would be more convenient when browsing through the list looking for the PIC of interest.

Maybe a sub-list by families? Or if I can type the PIC it would be also fine, but currently I can't type anything in the drop-down menu so I have to scroll through the entire list, which is showing only  several devices at the time, so scrolling up and down and following the list is also not easy.

Another thing is that some devices are missing (or at least I can't find them) like the 18F2xJxx family or 33EP256MU806 family - those are some that I am working with and I am certain they have PPS option.

JohnB

@trastikata Although I list 16 bit device and can display them, I don't have the code there yet to generate the compiler directives. 

The files I have distributed with the app are a couple of years old so it is quite probable that some devices are missing.  I will generate a new set from the latest version of MPLABX but at the moment I just wanted to see whether it is in fact generating the correct code.  I only have one physical PPS device I can do this test on.

If you include the device in the command line when starting the app it will open that device.  I will extend the device selector so that you can start entering the device name to narrow the search.



JohnB

JohnB

There is a new version of the PPS Wizard with a much improved UI and usability.

You can download it from here

Please read the ReadMe file before using.

PPSScreenShot.jpg
JohnB