News:

;) This forum is the property of Proton software developers

Main Menu

Mysteriously missing CM1PSEL SFR on a PIC16F15355 device

Started by top204, Mar 03, 2022, 10:00 AM

Previous topic - Next topic

top204

I received an email via the forum asking a question, so I am replying via the forum:

QuoteHi, I needed to revisit a PIC16F15355 project to alter some code and found a get compile errors (proton 3.7.5.5. and also current Positron 4.0.1.5). Checked back using several .bas versions and they all error out on CM1PSEL = %00000110 saying *** Item CMP1SEL not found! ***, which is unfortunate to say the least. Any thoughts?

It's a bit of a tricky question to answer because, according to the Microchip data files, the CM1PSEL does not exist on the device, and the datasheet does not show it in its SFR section. However in the comparator and DAC sections of the datasheet it has a reference to it!

The compiler's .ppi files are created from the Microchip info files, so if it is not in there, it is not in the compiler, because it should not exist, and the address of it cannot be extracted etc... But references to it in the datasheet seem to show that it should exist!

It also does not exist in the latest Microchip .PIC files or .ini files, so I cannot even give an address for it so it can be placed in the main program's code!

Any ideas?

tumbleweed

It looks like that's a copy-paste error in the datasheet.

The channel select registers shown as CMxPSEL and CMxNSEL are named CMxPCH and CMxNCH in other parts of the documentation and in the device files.

towlerg

Or just mc fucking with your head. They change naming conventions so fast, theyr'e no longer conventions.

top204

Many thanks Tumbleweed. You seem to have hit the nail on the head. :-)

Unfortunately, microchip are getting worse and worse as time goes by, and the old saying "Absolute Power Corrupts Absolutely" always springs to mind. As they get more and more control of the microcontroller market, quality does not matter anymore, because there is very little choice elsewhere. Other companies have done the same. i.e. micro$oft, crapple, intel, ARM, RaspPi, Android, to name but a few! Quality is getting worse and worse in all of them as they are rushing things to market to make as much money as possible, but forget quality or testing etc, because that does not "make" money!!!

You can get knock off, or copied, devices from the "grey" market, but quality with them is even worse!!!

Well said towlerg, my words exactly. :-)

tumbleweed

"Microchip" and "conventions" is an oxymoron.

Or maybe just drop the "oxy" part...

John Lawton

Well we're kind of stuck with them until Les rewrites his compilers for ST and/or ARM devices?

top204

I wish I had the money to do that John. :-( But R&D generates zero money, and with the current obsession with, dreadful, but free!, open source stuff, the chances of it re-gaining the time/money lost writing it, is virtually zero. :-(

I also do not trust the ARM and ST devices much, because when they go out of "fashion", they are dropped like a stone and no longer available, which has happened many, many times with them. So any project using a device that is a few years old cannot be continued, and the newer devices that replace them are nothing like the original types. ARM  devices are dreadful for making, unrequired, changes, which is why there are hundreds, if not thousands, of differrent types of them. And I mean "very" different types, but have the ARM mechanism inside them.